Is there an extension with a revset for 'all ancestors along the p1 line'?

Sietse Brouwer sbbrouwer at gmail.com
Fri Jun 3 12:09:30 UTC 2016


Dear list,

I work with bookmark branches, and I often think of a bookmark
branch's 'mainline' as "all ancestors of this commit, but not
ancestors that were brought in by merging". In other words,
p1(master), p1(p1(master)), and so on back to the root.

I know there isn't a p1line revset, but, if I had one, I could do
things like this to get nearly all commits that were commited directly
on the feature branch:

    -r 'p1line(feature) and not p1line(master)'

(The only thing I'd miss would be diverge-and-merges inside the feature branch.)

Before I set about building this revset myself, does anyone know of an
extension that provides it?

As a final illustration, here is an example history. I have marked
nodes M if they are part of master's p1 line, F if they are part of
the feature's p1 line, and MF if they are part of both. The text to
the right is built up like so:

    {rev}, p1:{p1rev}, [{bookmarks}] {my manual remarks}

M  10, p1:9 [master]
|
M    9, p1:8, merge feature into master
|\
| M  8, p1:5
| |
F |  7, p1:6 [feature]
| |
F |  6, p1:2, merge master into feature
|\|
| M  5, p1:0
| |
F |  2, p1:1
| |
F |  1, p1:0
|/
MF  0, p1:-1

Kind regards,

Sietse Brouwer


More information about the Mercurial mailing list