Show More
@@ -379,17 +379,23 b' def annotate(ui, repo, *pats, **opts):' | |||
|
379 | 379 | change = repo.changelog.read(node) |
|
380 | 380 | mmap = repo.manifest.read(change[0]) |
|
381 | 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 | 386 | lines = repo.file(abs).annotate(mmap[abs]) |
|
383 | 387 | pieces = [] |
|
384 | 388 | |
|
385 | 389 | for o, f in opmap: |
|
386 | 390 | if opts[o]: |
|
387 | 391 | l = [f(n) for n, dummy in lines] |
|
388 |
|
|
|
389 | pieces.append(["%*s" % (m, x) for x in l]) | |
|
392 | if l: | |
|
393 | m = max(map(len, l)) | |
|
394 | pieces.append(["%*s" % (m, x) for x in l]) | |
|
390 | 395 | |
|
391 | for p, l in zip(zip(*pieces), lines): | |
|
392 | ui.write("%s: %s" % (" ".join(p), l[1])) | |
|
396 | if pieces: | |
|
397 | for p, l in zip(zip(*pieces), lines): | |
|
398 | ui.write("%s: %s" % (" ".join(p), l[1])) | |
|
393 | 399 | |
|
394 | 400 | def cat(ui, repo, file1, rev=None, **opts): |
|
395 | 401 | """output the latest or given revision of a file""" |
General Comments 0
You need to be logged in to leave comments.
Login now