Mercurial > hg
diff hgext/convert/subversion.py @ 38406:65d1d7da63d1
convert: use progress helper
Differential Revision: https://phab.mercurial-scm.org/D3807
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 18 Jun 2018 15:05:52 -0700 |
parents | aac4be30e250 |
children | 34fe76b31ca4 |
line wrap: on
line diff
--- a/hgext/convert/subversion.py Mon Jun 18 14:59:53 2018 -0700 +++ b/hgext/convert/subversion.py Mon Jun 18 15:05:52 2018 -0700 @@ -750,9 +750,10 @@ self.module = new_module self.reparent(self.module) + progress = self.ui.makeprogress(_('scanning paths'), unit=_('paths'), + total=len(paths)) for i, (path, ent) in enumerate(paths): - self.ui.progress(_('scanning paths'), i, item=path, - total=len(paths), unit=_('paths')) + progress.update(i, item=path) entrypath = self.getrelpath(path) kind = self._checkpath(entrypath, revnum) @@ -838,7 +839,7 @@ copytopath = self.getrelpath(copytopath) copies[self.recode(copytopath)] = self.recode(childpath) - self.ui.progress(_('scanning paths'), None) + progress.complete() changed.update(removed) return (list(changed), removed, copies)