Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/mercurial/commands.py Mon Oct 02 02:34:47 2017 -0700 +++ b/mercurial/commands.py Mon Oct 02 18:18:57 2017 +0100 @@ -400,7 +400,11 @@ for f, p, l in zip(zip(*formats), zip(*pieces), lines): fm.startitem() fm.write(fields, "".join(f), *p) - fm.write('line', ": %s", l[1]) + if l[0].skip: + fmt = "* %s" + else: + fmt = ": %s" + fm.write('line', fmt, l[1]) if not lines[-1][1].endswith('\n'): fm.plain('\n')