evolve: add new variable and comment
authorLaurent Charignon <lcharignon@fb.com>
Mon, 04 May 2015 16:56:05 -0700
changeset 1319 8376fe35ebda
parent 1318 29363f79514f
child 1320 b5cd96395867
evolve: add new variable and comment Add comment and introduce a new variable to keep track of if the progress ui is shown. Later on we will use this variable in the implementation of the --rev option.
hgext/evolve.py
--- a/hgext/evolve.py	Mon May 04 16:09:05 2015 -0700
+++ b/hgext/evolve.py	Mon May 04 16:56:05 2015 -0700
@@ -1246,11 +1246,13 @@
     # Progress handling
     seen = 1
     count = allopt and _counttroubled(ui, repo) or 1
+    showprogress = allopt
 
     def progresscb():
         if allopt:
             ui.progress('evolve', seen, unit='changesets', total=count)
 
+    # Continuation handling
     if contopt:
         if anyopt:
             raise util.Abort('cannot specify both "--any" and "--continue"')
@@ -1286,7 +1288,8 @@
         progresscb()
         nexttrouble = _picknexttroubled(ui, repo, anyopt or allopt)
 
-    if allopt:
+    # Cleanup
+    if showprogress:
         ui.progress('evolve', None)
 
     if repo['.'] != startnode: