Patchwork [7,of,8] bisect: avoid confusing use of variables with same names in nested local scopes

login
register
mail settings
Submitter Mads Kiilerich
Date Nov. 17, 2013, 4:29 p.m.
Message ID <b3be2f364608c950e663.1384705743@localhost.localdomain>
Download mbox | patch
Permalink /patch/3014/
State Accepted
Commit 79d3b6a45351600aa1abf613f8cf8909d3b6529b
Headers show

Comments

Mads Kiilerich - Nov. 17, 2013, 4:29 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1384634789 18000
#      Sat Nov 16 15:46:29 2013 -0500
# Branch stable
# Node ID b3be2f364608c950e663e7db107bebf48f4ab912
# Parent  42bb45f0b844d959b665de133fc95c61b2f214c2
bisect: avoid confusing use of variables with same names in nested local scopes

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -700,7 +700,7 @@  def bisect(ui, repo, rev=None, extra=Non
                 ui.status(_('changeset %d:%s: %s\n') % (ctx, ctx, transition))
                 check_state(state, interactive=False)
                 # bisect
-                nodes, changesets, good = hbisect.bisect(repo.changelog, state)
+                nodes, changesets, bgood = hbisect.bisect(repo.changelog, state)
                 # update to next check
                 node = nodes[0]
                 if not noupdate:
@@ -709,7 +709,7 @@  def bisect(ui, repo, rev=None, extra=Non
         finally:
             state['current'] = [node]
             hbisect.save_state(repo, state)
-        print_result(nodes, good)
+        print_result(nodes, bgood)
         return
 
     # update state