where did a bookmark (or a branch) start

Steve Fink sphink at gmail.com
Sun Sep 18 23:31:40 UTC 2016


On Sun, Sep 18, 2016 at 1:44 PM, Uwe Brauer <oub at mat.ucm.es> wrote:

> I consider changeset 3 as the base of the branch pretty.
>
> The command
>
> log -r "parents(min(branch(pretty)))"
>
> Gives me changeset 2 which is close.
>

If you want the earliest point on that branch, why 'parents'? Seem like you
want log -r 'min(branch(pretty))'


>
> Now I have the same question concerning branches with bookmarks (script
> attached).
> log -r "parents(min(bookmark(pretty)))"
>
> Returns be changeset 4 which I don't understand.
>

A bookmark refers to a single revision, 5 in this case, so this is just
parents(5) which is 4.

The hard part to me is identifying the stuff that is *not* on your branch.
If you just pulled something, you could probably get away with log -r
'min(pretty % tip)', but that seems kinda brittle. What I would personally
do is rely on phases to remember what I haven't pushed, so I would use
something like log -r 'min(ancestors(pretty) and not public())'.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20160918/8252ef74/attachment-0002.html>


More information about the Mercurial mailing list