changeset 4601:e5aa1e23d146

evolve: move progress-clearing out of _cleanup() The progress is only used with --all or --rev, so there's no need to clean it in any other case. It's therefore easier to clean it specifically in that case.
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 23 Apr 2019 10:49:47 -0700
parents ef899ea7456d
children 98387ccf0b79
files hgext3rd/evolve/evolvecmd.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py	Tue Apr 23 10:52:33 2019 -0700
+++ b/hgext3rd/evolve/evolvecmd.py	Tue Apr 23 10:49:47 2019 -0700
@@ -1448,10 +1448,7 @@
 
     return opts
 
-def _cleanup(ui, repo, startnode, showprogress, shouldupdate):
-    if showprogress:
-        compat.progress(ui, _('evolve'), None)
-
+def _cleanup(ui, repo, startnode, shouldupdate):
     if not shouldupdate:
         # Move back to startnode, or to its successor if the start node is
         # obsolete (perhaps made obsolete by the current `hg evolve`)
@@ -1759,7 +1756,10 @@
                 evolvestate['orphanmerge'] = False
             seen += 1
 
-    _cleanup(ui, repo, startnode, showprogress, shouldupdate)
+        if showprogress:
+            compat.progress(ui, _('evolve'), None)
+
+    _cleanup(ui, repo, startnode, shouldupdate)
 
 def solveobswdp(ui, repo, opts):
     """this function updates to the successor of obsolete wdir parent"""