Is there an extension with a revset for 'all ancestors along the p1 line'?
Scott Palmer
swpalmer at gmail.com
Sat Jun 4 18:52:55 UTC 2016
> On Jun 4, 2016, at 2:11 PM, Gregory Szorc <gregory.szorc at gmail.com> wrote:
>
> On Fri, Jun 3, 2016 at 5:09 AM, Sietse Brouwer <sbbrouwer at gmail.com <mailto:sbbrouwer at gmail.com>> wrote:
> 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.
>
> Such a revset does not exist. Even if you built one, it wouldn't do what you think. The reason is that Mercurial sorts the parent nodes during a merge commit and stores the node with the smaller bit-wise value in p1. I do feel it is a bit odd and that it is one of the stranger things that Mercurial does, at least today. Although historically Mercurial encouraged the use of named branches. When you were using named branches, you could query for everything on a specific branch. Named branches have fallen out of favor in years since (things like bookmarks are preferred). Unfortunately, that means lots of commits on the "default" branch and an inability to trace mainline or feature lines of work when merge commits are involved :/ https://www.mercurial-scm.org/wiki/TopicPlan <https://www.mercurial-scm.org/wiki/TopicPlan> should help restore some of this forensic ability.
Wouldn’t something like this work:
hg log -r “ancestors(my_bookmark) and not ancestors(@) and not merge()"
Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20160604/77963a99/attachment-0002.html>
More information about the Mercurial
mailing list