--- a/mercurial/cmdutil.py Tue Nov 24 18:21:47 2009 +0100
+++ b/mercurial/cmdutil.py Tue Nov 24 20:40:04 2009 +0100
@@ -290,18 +290,19 @@
equal = 0
alines = mdiff.splitnewlines(text)
matches = bdiff.blocks(text, orig)
- for x1,x2,y1,y2 in matches:
+ for x1, x2, y1, y2 in matches:
for line in alines[x1:x2]:
equal += len(line)
lengths = len(text) + len(orig)
- return equal*2.0 / lengths
+ return equal * 2.0 / lengths
for a in added:
bestscore = copies.get(a, (None, threshold))[1]
myscore = score(repo.wread(a))
if myscore >= bestscore:
copies[a] = (r, myscore)
+
for dest, v in copies.iteritems():
source, score = v
yield source, dest, score