##// END OF EJS Templates
fastannotate: use progress helper...
Martin von Zweigbergk -
r40874:dd100687 default
parent child Browse files
Show More
@@ -398,7 +398,8 b' class _annotatecontext(object):'
398
398
399 # 3rd DFS does the actual annotate
399 # 3rd DFS does the actual annotate
400 visit = initvisit[:]
400 visit = initvisit[:]
401 progress = 0
401 progress = self.ui.makeprogress(('building cache'),
402 total=len(newmainbranch))
402 while visit:
403 while visit:
403 f = visit[-1]
404 f = visit[-1]
404 if f in hist:
405 if f in hist:
@@ -437,10 +438,7 b' class _annotatecontext(object):'
437 del pcache[f]
438 del pcache[f]
438
439
439 if ismainbranch: # need to write to linelog
440 if ismainbranch: # need to write to linelog
440 if not self.ui.quiet:
441 progress.increment()
441 progress += 1
442 self.ui.progress(_('building cache'), progress,
443 total=len(newmainbranch))
444 bannotated = None
442 bannotated = None
445 if len(pl) == 2 and self.opts.followmerge: # merge
443 if len(pl) == 2 and self.opts.followmerge: # merge
446 bannotated = curr[0]
444 bannotated = curr[0]
@@ -450,8 +448,7 b' class _annotatecontext(object):'
450 elif showpath: # not append linelog, but we need to record path
448 elif showpath: # not append linelog, but we need to record path
451 self._node2path[f.node()] = f.path()
449 self._node2path[f.node()] = f.path()
452
450
453 if progress: # clean progress bar
451 progress.complete()
454 self.ui.write()
455
452
456 result = [
453 result = [
457 ((self.revmap.rev2hsh(fr) if isinstance(fr, int) else fr.node()), l)
454 ((self.revmap.rev2hsh(fr) if isinstance(fr, int) else fr.node()), l)
General Comments 0
You need to be logged in to leave comments. Login now