##// END OF EJS Templates
convert: add support for deterministic progress bar on scanning phase...
Augie Fackler -
r22411:c497e39d default
parent child Browse files
Show More
@@ -109,6 +109,13 b' class converter_source(object):'
109 109 """Return the commit object for version"""
110 110 raise NotImplementedError
111 111
112 def numcommits(self):
113 """Return the number of commits in this source.
114
115 If unknown, return None.
116 """
117 return None
118
112 119 def gettags(self):
113 120 """Return the tags as a dictionary of name: revision
114 121
@@ -171,6 +171,7 b' class converter(object):'
171 171 visit = heads
172 172 known = set()
173 173 parents = {}
174 numcommits = self.source.numcommits()
174 175 while visit:
175 176 n = visit.pop(0)
176 177 if n in known:
@@ -180,7 +181,8 b' class converter(object):'
180 181 if m == SKIPREV or self.dest.hascommitfrommap(m):
181 182 continue
182 183 known.add(n)
183 self.ui.progress(_('scanning'), len(known), unit=_('revisions'))
184 self.ui.progress(_('scanning'), len(known), unit=_('revisions'),
185 total=numcommits)
184 186 commit = self.cachecommit(n)
185 187 parents[n] = []
186 188 for p in commit.parents:
General Comments 0
You need to be logged in to leave comments. Login now