[PATCH] verify: improve progress descriptions

Steve Borho steve at borho.org
Tue Apr 13 23:12:37 CDT 2010


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1271218343 18000
# Node ID f105e062f515ca31083c9a65bfa7a3790559b475
# Parent  217557b26bc752353f7c4f6e42e71dbdca3d14a5
verify: improve progress descriptions

For GUIs, the progress bar is disconnected visually from the text that
is output by ui.write(), so it's better to be a little bit redundant in
naming the status.  "checking" is redundant, since the user is running
the verify command.  'changesets', 'manifests', etc, tell the user what
is being checked (the entity being counted in the progress bar.

diff -r 217557b26bc7 -r f105e062f515 mercurial/verify.py
--- a/mercurial/verify.py	Mon Apr 12 17:41:32 2010 -0700
+++ b/mercurial/verify.py	Tue Apr 13 23:12:23 2010 -0500
@@ -122,7 +122,7 @@
     checklog(cl, "changelog", 0)
     total = len(repo)
     for i in repo:
-        ui.progress(_('checking'), i, total=total)
+        ui.progress(_('changesets'), i, total=total)
         n = cl.node(i)
         checkentry(cl, i, n, seen, [i], "changelog")
 
@@ -133,14 +133,14 @@
                 filelinkrevs.setdefault(f, []).append(i)
         except Exception, inst:
             exc(i, _("unpacking changeset %s") % short(n), inst)
-    ui.progress(_('checking'), None)
+    ui.progress(_('changesets'), None)
 
     ui.status(_("checking manifests\n"))
     seen = {}
     checklog(mf, "manifest", 0)
     total = len(mf)
     for i in mf:
-        ui.progress(_('checking'), i, total=total)
+        ui.progress(_('manifests'), i, total=total)
         n = mf.node(i)
         lr = checkentry(mf, i, n, seen, mflinkrevs.get(n, []), "manifest")
         if n in mflinkrevs:
@@ -156,7 +156,7 @@
                     filenodes.setdefault(f, {}).setdefault(fn, lr)
         except Exception, inst:
             exc(lr, _("reading manifest delta %s") % short(n), inst)
-    ui.progress(_('checking'), None)
+    ui.progress(_('manifests'), None)
 
     ui.status(_("crosschecking files in changesets and manifests\n"))
 


More information about the Mercurial-devel mailing list