# HG changeset patch # User Martin von Zweigbergk # Date 1556041787 25200 # Node ID e5aa1e23d1464ed2efcbdf39ccfd5cf3ffb1825c # Parent ef899ea7456d1579581e1244b44ad1c80439a66f 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. diff -r ef899ea7456d -r e5aa1e23d146 hgext3rd/evolve/evolvecmd.py --- 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"""