# HG changeset patch # User Patrick Mezard # Date 1273438285 -7200 # Node ID 94afe7bc87a9cedd770c16fbf904c7d1bdb880c4 # Parent ecc8b18736dab8071d6cf2dc88e6cb0ea681c5fa 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. diff -r ecc8b18736da -r 94afe7bc87a9 hgext/convert/subversion.py --- 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) diff -r ecc8b18736da -r 94afe7bc87a9 tests/test-convert-svn-move.out --- a/tests/test-convert-svn-move.out Sun May 09 22:50:42 2010 +0200 +++ b/tests/test-convert-svn-move.out Sun May 09 22:51:25 2010 +0200 @@ -95,15 +95,22 @@ retrieving file [========================================================>] 5/5 converting [==============> ] 1/4 +scanning paths [ ] 0/1 + retrieving file [========================================================>] 1/1 converting [==============================> ] 2/4 +scanning paths [ ] 0/2 +scanning paths [============================> ] 1/2 + retrieving file [=============> ] 1/4 retrieving file [===========================> ] 2/4 retrieving file [=========================================> ] 3/4 retrieving file [========================================================>] 4/4 converting [=============================================> ] 3/4 +scanning paths [ ] 0/1 + retrieving file [========================================================>] 1/1 initializing destination hg-progress repository