Comments
Patch
@@ -109,6 +109,13 @@
"""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
@@ -171,6 +171,7 @@
visit = heads
known = set()
parents = {}
+ numcommits = self.source.numcommits()
while visit:
n = visit.pop(0)
if n in known:
@@ -180,7 +181,8 @@
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: