diff hgext/convert/subversion.py @ 11137:94afe7bc87a9

convert/svn: report path discovery progress When converting non-local repositories, scanning changed paths before retrieving data can be almost as slow as retrieving the data itself, thanks to HTTP calls overhead.
author Patrick Mezard <pmezard@gmail.com>
date Sun, 09 May 2010 22:51:25 +0200
parents 33010ff1fd6f
children b5ef95b5ae14
line wrap: on
line diff
--- a/hgext/convert/subversion.py	Sun May 09 22:50:42 2010 +0200
+++ b/hgext/convert/subversion.py	Sun May 09 22:51:25 2010 +0200
@@ -610,7 +610,9 @@
             self.module = new_module
             self.reparent(self.module)
 
-        for path, ent in paths:
+        for i, (path, ent) in enumerate(paths):
+            self.ui.progress(_('scanning paths'), i, item=path,
+                             total=len(paths))
             entrypath = self.getrelpath(path)
 
             kind = self._checkpath(entrypath, revnum)
@@ -689,6 +691,7 @@
                     copytopath = self.getrelpath(copytopath)
                     copies[self.recode(copytopath)] = self.recode(childpath)
 
+        self.ui.progress(_('scanning paths'), None)
         changed.update(removed)
         return (list(changed), removed, copies)