[PATCH 4 of 8 git-diff] similar: rename local variable to not collide with previous
Sean Farley
sean at farley.io
Mon Jan 9 14:49:37 EST 2017
# HG changeset patch
# User Sean Farley <sean at farley.io>
# Date 1483850629 28800
# Sat Jan 07 20:43:49 2017 -0800
# Node ID 9af4ef2f80a8c5cb69ad4ff5d291ce81a35e4f39
# Parent 8799dd0f3c4849ab5f468f2343af4c108ed22e72
similar: rename local variable to not collide with previous
Future patches will move the score function to the module level, so
let's not shadow that.
diff --git a/mercurial/similar.py b/mercurial/similar.py
--- a/mercurial/similar.py
+++ b/mercurial/similar.py
@@ -79,12 +79,12 @@ def _findsimilarmatches(repo, added, rem
if myscore >= bestscore:
copies[a] = (r, myscore)
repo.ui.progress(_('searching'), None)
for dest, v in copies.iteritems():
- source, score = v
- yield source, dest, score
+ source, bscore = v
+ yield source, dest, bscore
def findrenames(repo, added, removed, threshold):
'''find renamed files -- yields (before, after, score) tuples'''
parentctx = repo['.']
workingctx = repo[None]
More information about the Mercurial-devel
mailing list