Mercurial > hg
diff hgext/convert/convcmd.py @ 11135:73a4ed3bfef8
convert: add progress support
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 09 May 2010 22:50:07 +0200 |
parents | 08a0f04b56bd |
children | ecc8b18736da |
line wrap: on
line diff
--- a/hgext/convert/convcmd.py Sun May 09 21:52:34 2010 +0200 +++ b/hgext/convert/convcmd.py Sun May 09 22:50:07 2010 +0200 @@ -111,11 +111,13 @@ if n in known or n in self.map: continue known.add(n) + self.ui.progress(_('scanning'), len(known), unit=_('revisions')) commit = self.cachecommit(n) parents[n] = [] for p in commit.parents: parents[n].append(p) visit.append(p) + self.ui.progress(_('scanning'), None) return parents @@ -321,7 +323,7 @@ c = None self.ui.status(_("converting...\n")) - for c in t: + for i, c in enumerate(t): num -= 1 desc = self.commitcache[c].desc if "\n" in desc: @@ -331,7 +333,10 @@ # 'utf-8' self.ui.status("%d %s\n" % (num, recode(desc))) self.ui.note(_("source: %s\n") % recode(c)) + self.ui.progress(_('converting'), i, unit=_('revisions'), + total=len(t)) self.copy(c) + self.ui.progress(_('converting'), None) tags = self.source.gettags() ctags = {}