Show More
@@ -469,12 +469,13 b' def annotate(ui, repo, *pats, **opts):' | |||||
469 |
|
469 | |||
470 | lines = fctx.annotate(follow=follow, linenumber=linenumber, |
|
470 | lines = fctx.annotate(follow=follow, linenumber=linenumber, | |
471 | diffopts=diffopts) |
|
471 | diffopts=diffopts) | |
|
472 | if not lines: | |||
|
473 | continue | |||
472 | formats = [] |
|
474 | formats = [] | |
473 | pieces = [] |
|
475 | pieces = [] | |
474 |
|
476 | |||
475 | for f, sep in funcmap: |
|
477 | for f, sep in funcmap: | |
476 | l = [f(n) for n, dummy in lines] |
|
478 | l = [f(n) for n, dummy in lines] | |
477 | if l: |
|
|||
478 | if fm: |
|
479 | if fm: | |
479 | formats.append(['%s' for x in l]) |
|
480 | formats.append(['%s' for x in l]) | |
480 | else: |
|
481 | else: | |
@@ -488,7 +489,7 b' def annotate(ui, repo, *pats, **opts):' | |||||
488 | fm.write(fields, "".join(f), *p) |
|
489 | fm.write(fields, "".join(f), *p) | |
489 | fm.write('line', ": %s", l[1]) |
|
490 | fm.write('line', ": %s", l[1]) | |
490 |
|
491 | |||
491 |
if |
|
492 | if not lines[-1][1].endswith('\n'): | |
492 | fm.plain('\n') |
|
493 | fm.plain('\n') | |
493 |
|
494 | |||
494 | fm.end() |
|
495 | fm.end() |
General Comments 0
You need to be logged in to leave comments.
Login now