435 |
436 |
436 hist[f] = curr |
437 hist[f] = curr |
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] |
447 if blocks is None: # no parents, add an empty one |
445 if blocks is None: # no parents, add an empty one |
448 blocks = list(self._diffblocks('', curr[1])) |
446 blocks = list(self._diffblocks('', curr[1])) |
449 self._appendrev(f, blocks, bannotated) |
447 self._appendrev(f, blocks, bannotated) |
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) |
458 for fr, l in hist[revfctx][0]] # [(node, linenumber)] |
455 for fr, l in hist[revfctx][0]] # [(node, linenumber)] |
459 return self._refineannotateresult(result, revfctx, showpath, showlines) |
456 return self._refineannotateresult(result, revfctx, showpath, showlines) |