[PATCH 3 of 4 hyperblame] annotate: add core algorithm to skip a rev
Yuya Nishihara
yuya at tcha.org
Sun May 28 07:47:32 EDT 2017
On Wed, 24 May 2017 19:39:49 -0700, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0 at fb.com>
> # Date 1495678034 25200
> # Wed May 24 19:07:14 2017 -0700
> # Node ID 134dcc1222e4b992b4a60c44c9b9ed8d10422632
> # Parent 0f28e90b0fb95733de10f8d1524c345fe5949315
> annotate: add core algorithm to skip a rev
Looks great. Queued the series, thanks.
For UI thing, I like Greg's revset idea, but the core algorithm will be
useful anyway.
> + >>> def decorate(text, rev):
> + ... return ([(rev, i) for i in xrange(1, text.count('\n') + 1)], text)
It isn't introduced by this patch, but I was tricked by this. rev isn't
a revision number but a filectx!
> for parent, blocks in pblocks:
> for (a1, a2, b1, b2), t in blocks:
> - # Changed blocks ('!') or blocks made only of blank lines ('~')
> - # belong to the child.
> + # Changed blocks ('!') or blocks made only of blank lines
> + # ('~') belong to the child.
Dropped this hunk in flight.
More information about the Mercurial-devel
mailing list