class documentation
class RenameDetector(object):
Object for handling rename detection between two trees.
Method | __init__ |
Initialize the rename detector. |
Method | changes |
Iterate TreeChanges between two tree SHAs, with rename detection. |
Method | _add |
Undocumented |
Method | _choose |
Undocumented |
Method | _collect |
Undocumented |
Method | _find |
Undocumented |
Method | _find |
Undocumented |
Method | _join |
Undocumented |
Method | _prune |
Undocumented |
Method | _prune |
Undocumented |
Method | _rename |
Undocumented |
Method | _reset |
Undocumented |
Method | _should |
Undocumented |
Method | _should |
Undocumented |
Method | _sorted |
Undocumented |
Instance Variable | _adds |
Undocumented |
Instance Variable | _candidates |
Undocumented |
Instance Variable | _changes |
Undocumented |
Instance Variable | _deletes |
Undocumented |
Instance Variable | _find |
Undocumented |
Instance Variable | _include |
Undocumented |
Instance Variable | _max |
Undocumented |
Instance Variable | _rename |
Undocumented |
Instance Variable | _rewrite |
Undocumented |
Instance Variable | _store |
Undocumented |
Instance Variable | _want |
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 | |
store | An ObjectStore for looking up objects. |
rename | The threshold similarity score for considering an add/delete pair to be a rename/copy; see _similarity_score. |
max | The 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 | The threshold similarity score below which a modify should be considered a delete/add, or None to not break modifies; see _similarity_score. |
find | If True, consider unmodified files when detecting copies. |