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.
--- 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"""