Mercurial > evolve
changeset 4612:c289f06028d0
evolve: move more of the progress-related variables together
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 25 Apr 2019 13:58:29 -0700 |
parents | c3fb96f9c8de |
children | 30a544904238 |
files | hgext3rd/evolve/evolvecmd.py |
diffstat | 1 files changed, 9 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py Thu Apr 25 14:02:11 2019 -0700 +++ b/hgext3rd/evolve/evolvecmd.py Thu Apr 25 13:58:29 2019 -0700 @@ -1679,15 +1679,6 @@ else: cmdutil.bailifchanged(repo) - # Progress handling - seen = 1 - showprogress = allopt or revopt - - def progresscb(): - if showprogress: - compat.progress(ui, _('evolve'), seen, unit=_('changesets'), - total=count) - revs = _selectrevs(repo, allopt, revopt, anyopt, targetcat) # Case: when wdir parent is obsolete and args passed. @@ -1702,8 +1693,16 @@ if not revs: return _handlenotrouble(ui, repo, allopt, revopt, anyopt, targetcat) - # For the progress bar to show + # Progress handling + seen = 1 + showprogress = allopt or revopt count = len(revs) + + def progresscb(): + if showprogress: + compat.progress(ui, _('evolve'), seen, unit=_('changesets'), + total=count) + # Order the revisions revs = _orderrevs(repo, revs)