class documentation

class RenameDetector(object):

View In Hierarchy

Object for handling rename detection between two trees.

Method __init__ Initialize the rename detector.
Method changes_with_renames Iterate TreeChanges between two tree SHAs, with rename detection.
Method _add_change Undocumented
Method _choose_content_renames Undocumented
Method _collect_changes Undocumented
Method _find_content_rename_candidates Undocumented
Method _find_exact_renames Undocumented
Method _join_modifies Undocumented
Method _prune Undocumented
Method _prune_unchanged Undocumented
Method _rename_type Undocumented
Method _reset Undocumented
Method _should_find_content_renames Undocumented
Method _should_split Undocumented
Method _sorted_changes Undocumented
Instance Variable _adds Undocumented
Instance Variable _candidates Undocumented
Instance Variable _changes Undocumented
Instance Variable _deletes Undocumented
Instance Variable _find_copies_harder Undocumented
Instance Variable _include_trees Undocumented
Instance Variable _max_files Undocumented
Instance Variable _rename_threshold Undocumented
Instance Variable _rewrite_threshold Undocumented
Instance Variable _store Undocumented
Instance Variable _want_unchanged Undocumented
def __init__(self, store, rename_threshold=RENAME_THRESHOLD, max_files=MAX_FILES, rewrite_threshold=REWRITE_THRESHOLD, find_copies_harder=False):

Initialize the rename detector.

Parameters
storeAn ObjectStore for looking up objects.
rename_thresholdThe threshold similarity score for considering an add/delete pair to be a rename/copy; see _similarity_score.
max_filesThe maximum number of adds and deletes to consider, or None for no limit. The detector is guaranteed to compare no more than max_files ** 2 add/delete pairs. This limit is provided because rename detection can be quadratic in the project size. If the limit is exceeded, no content rename detection is attempted.
rewrite_thresholdThe threshold similarity score below which a modify should be considered a delete/add, or None to not break modifies; see _similarity_score.
find_copies_harderIf True, consider unmodified files when detecting copies.
def changes_with_renames(self, tree1_id, tree2_id, want_unchanged=False, include_trees=False):

Iterate TreeChanges between two tree SHAs, with rename detection.

def _add_change(self, change):

Undocumented

def _choose_content_renames(self):

Undocumented

def _collect_changes(self, tree1_id, tree2_id):

Undocumented

def _find_content_rename_candidates(self):

Undocumented

def _find_exact_renames(self):

Undocumented

def _join_modifies(self):

Undocumented

def _prune(self, add_paths, delete_paths):

Undocumented

def _prune_unchanged(self):

Undocumented

def _rename_type(self, check_paths, delete, add):

Undocumented

def _reset(self):

Undocumented

def _should_find_content_renames(self):

Undocumented

def _should_split(self, change):

Undocumented

def _sorted_changes(self):

Undocumented

_adds =

Undocumented

_candidates: list =

Undocumented

_changes: list =

Undocumented

_deletes =

Undocumented

_find_copies_harder =

Undocumented

_include_trees =

Undocumented

_max_files =

Undocumented

_rename_threshold =

Undocumented

_rewrite_threshold =

Undocumented

_store =

Undocumented

_want_unchanged =

Undocumented