comparison mercurial/commands.py @ 20052:79d3b6a45351

bisect: avoid confusing use of variables with same names in nested local scopes
author Mads Kiilerich <madski@unity3d.com>
date Sat, 16 Nov 2013 15:46:29 -0500
parents cd79d9ab5e42
children 1c46b18b0e1c
comparison
equal deleted inserted replaced
20051:b988b3b19303 20052:79d3b6a45351
699 rev = None # clear for future iterations 699 rev = None # clear for future iterations
700 state[transition].append(ctx.node()) 700 state[transition].append(ctx.node())
701 ui.status(_('changeset %d:%s: %s\n') % (ctx, ctx, transition)) 701 ui.status(_('changeset %d:%s: %s\n') % (ctx, ctx, transition))
702 check_state(state, interactive=False) 702 check_state(state, interactive=False)
703 # bisect 703 # bisect
704 nodes, changesets, good = hbisect.bisect(repo.changelog, state) 704 nodes, changesets, bgood = hbisect.bisect(repo.changelog, state)
705 # update to next check 705 # update to next check
706 node = nodes[0] 706 node = nodes[0]
707 if not noupdate: 707 if not noupdate:
708 cmdutil.bailifchanged(repo) 708 cmdutil.bailifchanged(repo)
709 hg.clean(repo, node, show_stats=False) 709 hg.clean(repo, node, show_stats=False)
710 finally: 710 finally:
711 state['current'] = [node] 711 state['current'] = [node]
712 hbisect.save_state(repo, state) 712 hbisect.save_state(repo, state)
713 print_result(nodes, good) 713 print_result(nodes, bgood)
714 return 714 return
715 715
716 # update state 716 # update state
717 717
718 if rev: 718 if rev: