Show More
@@ -95,16 +95,16 b' def _findsimilarmatches(repo, added, rem' | |||||
95 |
|
95 | |||
96 | def findrenames(repo, added, removed, threshold): |
|
96 | def findrenames(repo, added, removed, threshold): | |
97 | '''find renamed files -- yields (before, after, score) tuples''' |
|
97 | '''find renamed files -- yields (before, after, score) tuples''' | |
98 |
|
|
98 | wctx = repo[None] | |
99 | workingctx = repo[None] |
|
99 | pctx = wctx.p1() | |
100 |
|
100 | |||
101 | # Zero length files will be frequently unrelated to each other, and |
|
101 | # Zero length files will be frequently unrelated to each other, and | |
102 | # tracking the deletion/addition of such a file will probably cause more |
|
102 | # tracking the deletion/addition of such a file will probably cause more | |
103 | # harm than good. We strip them out here to avoid matching them later on. |
|
103 | # harm than good. We strip them out here to avoid matching them later on. | |
104 |
addedfiles = [w |
|
104 | addedfiles = [wctx[fp] for fp in sorted(added) | |
105 |
if w |
|
105 | if wctx[fp].size() > 0] | |
106 |
removedfiles = [p |
|
106 | removedfiles = [pctx[fp] for fp in sorted(removed) | |
107 |
if fp in p |
|
107 | if fp in pctx and pctx[fp].size() > 0] | |
108 |
|
108 | |||
109 | # Find exact matches. |
|
109 | # Find exact matches. | |
110 | matchedfiles = set() |
|
110 | matchedfiles = set() |
General Comments 0
You need to be logged in to leave comments.
Login now