Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 34435:884b595f5195
annotate: mark lines affected by skip-annotate with *
This is to prevent weird surprises from happening with skips being attributed
to the wrong changeset.
.. feature::
`hg annotate --skip` now prints a `*` on lines with skipped revisions
Differential Revision: https://phab.mercurial-scm.org/D900
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Mon, 02 Oct 2017 18:18:57 +0100 |
parents | 2e32c6a31cc7 |
children | e4cf957bf7ce |
comparison
equal
deleted
inserted
replaced
34434:2f5a135b2b04 | 34435:884b595f5195 |
---|---|
398 pieces.append(l) | 398 pieces.append(l) |
399 | 399 |
400 for f, p, l in zip(zip(*formats), zip(*pieces), lines): | 400 for f, p, l in zip(zip(*formats), zip(*pieces), lines): |
401 fm.startitem() | 401 fm.startitem() |
402 fm.write(fields, "".join(f), *p) | 402 fm.write(fields, "".join(f), *p) |
403 fm.write('line', ": %s", l[1]) | 403 if l[0].skip: |
404 fmt = "* %s" | |
405 else: | |
406 fmt = ": %s" | |
407 fm.write('line', fmt, l[1]) | |
404 | 408 |
405 if not lines[-1][1].endswith('\n'): | 409 if not lines[-1][1].endswith('\n'): |
406 fm.plain('\n') | 410 fm.plain('\n') |
407 fm.end() | 411 fm.end() |
408 | 412 |