Patchwork [1,of,2,evolve-ext] stablerange: include units in ui.progress() calls

login
register
mail settings
Submitter Anton Shestakov
Date April 12, 2018, 6:21 a.m.
Message ID <ef38b973097170304e7d.1523514106@neuro>
Download mbox | patch
Permalink /patch/30771/
State Accepted
Headers show

Comments

Anton Shestakov - April 12, 2018, 6:21 a.m.
# HG changeset patch
# User Anton Shestakov <av6@dwimlabs.net>
# Date 1523510910 -28800
#      Thu Apr 12 13:28:30 2018 +0800
# Node ID ef38b973097170304e7d4b62c6605d84d73fcc30
# Parent  b36e38e3a1769fb4acf1b3dadcaeec998260113f
stablerange: include units in ui.progress() calls

Patch

diff --git a/hgext3rd/evolve/stablerange.py b/hgext3rd/evolve/stablerange.py
--- a/hgext3rd/evolve/stablerange.py
+++ b/hgext3rd/evolve/stablerange.py
@@ -608,7 +608,8 @@  class stablerange(stablerangecached):
         rangeheap = []
         for idx, r in enumerate(revs):
             if not idx % 1000:
-                ui.progress(_("filling depth cache"), idx, total=nbrevs)
+                ui.progress(_("filling depth cache"), idx, total=nbrevs,
+                            unit=_("changesets"))
             # warm up depth
             self.depthrev(repo, r)
             rangeheap.append((-r, (r, 0)))
@@ -633,7 +634,8 @@  class stablerange(stablerangecached):
                     progress_new = time.time()
                     if (1 < progress_each) and (0.1 < progress_new - progress_last):
                         progress_each /= 10
-                    ui.progress(_("filling stablerange cache"), seen, total=nbrevs)
+                    ui.progress(_("filling stablerange cache"), seen,
+                                total=nbrevs, unit=_("changesets"))
                     progress_last = progress_new
                 seen += 1
                 original.remove(value) # might have been added from other source