changeset 1317:48f78feb0b47

evolve: renaming of a variable tro was not a really descriptive name, replacing it with nexttrouble.
author Laurent Charignon <lcharignon@fb.com>
date Thu, 30 Apr 2015 14:00:07 -0700
parents f11363699766
children 29363f79514f
files hgext/evolve.py
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/evolve.py	Mon May 04 16:01:45 2015 -0700
+++ b/hgext/evolve.py	Thu Apr 30 14:00:07 2015 -0700
@@ -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)