Comments
Patch
@@ -106,14 +106,17 @@ def findrenames(repo, added, removed, th
removedfiles = set([parentctx[fp] for fp in removed
if fp in parentctx and parentctx[fp].size() > 0])
+ pathsorted = lambda s: sorted(s, key=lambda x: x.path())
+ sremovedfiles = pathsorted(removedfiles)
+
# Find exact matches.
for (a, b) in _findexactmatches(repo,
- sorted(addedfiles), sorted(removedfiles)):
+ pathsorted(addedfiles), sremovedfiles):
addedfiles.remove(b)
yield (a.path(), b.path(), 1.0)
# If the user requested similar files to be matched, search for them also.
if threshold < 1.0:
for (a, b, score) in _findsimilarmatches(repo,
- sorted(addedfiles), sorted(removedfiles), threshold):
+ pathsorted(addedfiles), sremovedfiles, threshold):
yield (a.path(), b.path(), score)