##// END OF EJS Templates
Fixes for annotate...
mpm@selenic.com -
r771:0de22301 default
parent child Browse files
Show More
@@ -379,15 +379,21 b' def annotate(ui, repo, *pats, **opts):'
379 change = repo.changelog.read(node)
379 change = repo.changelog.read(node)
380 mmap = repo.manifest.read(change[0])
380 mmap = repo.manifest.read(change[0])
381 for src, abs, rel in walk(repo, pats, opts):
381 for src, abs, rel in walk(repo, pats, opts):
382 if abs not in mmap:
383 ui.warn("warning: %s is not in the repository!\n" % rel)
384 continue
385
382 lines = repo.file(abs).annotate(mmap[abs])
386 lines = repo.file(abs).annotate(mmap[abs])
383 pieces = []
387 pieces = []
384
388
385 for o, f in opmap:
389 for o, f in opmap:
386 if opts[o]:
390 if opts[o]:
387 l = [f(n) for n, dummy in lines]
391 l = [f(n) for n, dummy in lines]
392 if l:
388 m = max(map(len, l))
393 m = max(map(len, l))
389 pieces.append(["%*s" % (m, x) for x in l])
394 pieces.append(["%*s" % (m, x) for x in l])
390
395
396 if pieces:
391 for p, l in zip(zip(*pieces), lines):
397 for p, l in zip(zip(*pieces), lines):
392 ui.write("%s: %s" % (" ".join(p), l[1]))
398 ui.write("%s: %s" % (" ".join(p), l[1]))
393
399
General Comments 0
You need to be logged in to leave comments. Login now