[PATCH 2 of 4 evolve-ext] evolve: renaming of a variable
Laurent Charignon
lcharignon at fb.com
Tue May 5 12:30:45 CDT 2015
# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1430427607 25200
# Thu Apr 30 14:00:07 2015 -0700
# Node ID 48f78feb0b47b6a9725bbe6b28503b3f65c0cebf
# Parent f113636997660b807c36cf1d0a06b76d53ada1a4
evolve: renaming of a variable
tro was not a really descriptive name, replacing it with nexttrouble.
diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -1252,10 +1252,6 @@
graftcmd = commands.table['graft'][0]
return graftcmd(ui, repo, old_obsolete=True, **{'continue': True})
- tro = _picknexttroubled(ui, repo, anyopt or allopt)
- if tro is None:
- return handlenotrouble(ui, repo, startnode, dryrunopt)
-
def progresscb():
if allopt:
ui.progress('evolve', seen, unit='changesets', total=count)
@@ -1263,14 +1259,20 @@
seen = 1
count = allopt and _counttroubled(ui, repo) or 1
- while tro is not None:
+ nexttrouble = _picknexttroubled(ui, repo, anyopt or allopt)
+
+ # No trouble to resolve
+ if not nexttrouble:
+ return handlenotrouble(ui, repo, startnode, dryrunopt)
+
+ while nexttrouble is not None:
progresscb()
wlock = lock = tr = None
try:
wlock = repo.wlock()
lock = repo.lock()
tr = repo.transaction("evolve")
- result = _evolveany(ui, repo, tro, dryrunopt, confirmopt,
+ result = _evolveany(ui, repo, nexttrouble, dryrunopt, confirmopt,
progresscb=progresscb)
tr.close()
finally:
@@ -1282,7 +1284,7 @@
ui.status(_('working directory is now at %s\n') % repo['.'])
return result
progresscb()
- tro = _picknexttroubled(ui, repo, anyopt or allopt)
+ nexttrouble = _picknexttroubled(ui, repo, anyopt or allopt)
if allopt:
ui.progress('evolve', None)
More information about the Mercurial-devel
mailing list