##// END OF EJS Templates
similar: use common names for changectx variables...
Yuya Nishihara -
r31581:b1528d19 default
parent child Browse files
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 parentctx = repo['.']
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 = [workingctx[fp] for fp in sorted(added)
104 addedfiles = [wctx[fp] for fp in sorted(added)
105 if workingctx[fp].size() > 0]
105 if wctx[fp].size() > 0]
106 removedfiles = [parentctx[fp] for fp in sorted(removed)
106 removedfiles = [pctx[fp] for fp in sorted(removed)
107 if fp in parentctx and parentctx[fp].size() > 0]
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