Mercurial > hg
changeset 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 | ecc8b18736da |
children | 99eee847beaa |
files | hgext/convert/subversion.py tests/test-convert-svn-move.out |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
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)
--- 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