changeset 898:6524260be543

show a total for verification progress
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Sun, 13 May 2012 15:36:45 +0200
parents 6bc8046e3d0a
children 7f90bb48c9de
files hgsubversion/verify.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/verify.py
+++ b/hgsubversion/verify.py
@@ -38,9 +38,12 @@ def verify(ui, repo, args=None, **opts):
     svnfiles = set()
     result = 0
 
+    hgfiles = set(ctx) - util.ignoredfiles
+
     svndata = svn.list_files(branchpath, srev)
     for i, (fn, type) in enumerate(svndata):
-        util.progress(ui, 'verify', i)
+        util.progress(ui, 'verify', i, total=len(hgfiles))
+
         if type != 'f':
             continue
         svnfiles.add(fn)
@@ -60,7 +63,6 @@ def verify(ui, repo, args=None, **opts):
             ui.write('wrong flags for: %s\n' % fn)
             result = 1
 
-    hgfiles = set(ctx) - util.ignoredfiles
     if hgfiles != svnfiles:
         unexpected = hgfiles - svnfiles
         for f in sorted(unexpected):
@@ -70,6 +72,6 @@ def verify(ui, repo, args=None, **opts):
             ui.write('missing file: %s\n' % f)
         result = 1
 
-    util.progress(ui, 'verify', None)
+    util.progress(ui, 'verify', None, total=len(hgfiles))
 
     return result