Patchwork [4,of,8,git-diff] similar: rename local variable to not collide with previous

login
register
mail settings
Submitter Sean Farley
Date Jan. 9, 2017, 7:49 p.m.
Message ID <9af4ef2f80a8c5cb69ad.1483991377@1.0.0.127.in-addr.arpa>
Download mbox | patch
Permalink /patch/18145/
State Accepted
Headers show

Comments

Sean Farley - Jan. 9, 2017, 7:49 p.m.
# HG changeset patch
# User Sean Farley <sean@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.

Patch

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]