From patchwork Mon Jan 9 19:49:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [4, of, 8, git-diff] similar: rename local variable to not collide with previous From: Sean Farley X-Patchwork-Id: 18145 Message-Id: <9af4ef2f80a8c5cb69ad.1483991377@1.0.0.127.in-addr.arpa> To: mercurial-devel@mercurial-scm.org Cc: sean@farley.io Date: Mon, 09 Jan 2017 11:49:37 -0800 # HG changeset patch # User Sean Farley # 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]