diff --git a/hgext/convert/common.py b/hgext/convert/common.py --- a/hgext/convert/common.py +++ b/hgext/convert/common.py @@ -109,6 +109,13 @@ class converter_source(object): """Return the commit object for version""" raise NotImplementedError + def numcommits(self): + """Return the number of commits in this source. + + If unknown, return None. + """ + return None + def gettags(self): """Return the tags as a dictionary of name: revision diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py --- a/hgext/convert/convcmd.py +++ b/hgext/convert/convcmd.py @@ -171,6 +171,7 @@ class converter(object): visit = heads known = set() parents = {} + numcommits = self.source.numcommits() while visit: n = visit.pop(0) if n in known: @@ -180,7 +181,8 @@ class converter(object): if m == SKIPREV or self.dest.hascommitfrommap(m): continue known.add(n) - self.ui.progress(_('scanning'), len(known), unit=_('revisions')) + self.ui.progress(_('scanning'), len(known), unit=_('revisions'), + total=numcommits) commit = self.cachecommit(n) parents[n] = [] for p in commit.parents: