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 _reset Undocumented
Method _should_split Undocumented
Method _add_change Undocumented
Method _collect_changes Undocumented
Method _prune Undocumented
Method _find_exact_renames Undocumented
Method _should_find_content_renames Undocumented
Method _rename_type Undocumented
Method _find_content_rename_candidates Undocumented
Method _choose_content_renames Undocumented
Method _join_modifies Undocumented
Method _sorted_changes Undocumented
Method _prune_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.
ParametersstoreAn 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 _reset(self):
Undocumented
def _should_split(self, change):
Undocumented
def _add_change(self, change):
Undocumented
def _collect_changes(self, tree1_id, tree2_id):
Undocumented
def _prune(self, add_paths, delete_paths):
Undocumented
def _find_exact_renames(self):
Undocumented
def _should_find_content_renames(self):
Undocumented
def _rename_type(self, check_paths, delete, add):
Undocumented
def _find_content_rename_candidates(self):
Undocumented
def _choose_content_renames(self):
Undocumented
def _join_modifies(self):
Undocumented
def _sorted_changes(self):
Undocumented
def _prune_unchanged(self):
Undocumented
def changes_with_renames(self, tree1_id, tree2_id, want_unchanged=False):
Iterate TreeChanges between two tree SHAs, with rename detection.
API Documentation for Dulwich, generated by pydoctor at 2018-11-17 19:05:54.