Cleaning up the graph log using revsets (was: Rewriting changeset order on push/pull (keeping the history graph tidy))
Stanimir Stamenkov
s7an10 at netscape.net
Sun Aug 19 17:58:20 UTC 2012
[Spun off the original thread.]
So I'm trying to experiment with revsets and wonder whether I could
filter out "intermediate merges" defined as:
Merge changeset which has a parent with more than one child.
The sample command I've last suggested obviously won't work:
$ hg log -r "all() - merge(parents(count(children()) > 1))" -G
The closest I've been able to get is:
$ hg log -G -r "not (merge() and children(parents(not merge())))"
which better express (and may be it is a better definition for an
"intermediate merge"):
Exclude merge changesets which have a parent with a non-merge child.
but this appears to render quite ridiculous results for me. Looking
at the results further, I think the problem is because the graph
tries to reconstruct links to both descendants of an omitted merge
changeset. May be it would nice if there's a graph option to
control this behavior - like ignore second parent of an
"intermediate merge" (or just ignore second parent path).
-- Stanimir
-------- Original Message --------
<http://www.selenic.com/pipermail/mercurial/2012-August/043972.html>
Subject: Re: Rewriting changeset order on push/pull (keeping the
history graph tidy)
Date: Sun, 19 Aug 2012 00:33:33 +0300
From: Stanimir Stamenkov <s7an10 at netscape.net>
To: Mercurial Users <mercurial at selenic.com>
Sat, 18 Aug 2012 18:02:46 +0300, /Stanimir Stamenkov/:
> Tue, 14 Aug 2012 15:25:05 +0200, /Arne Babenhauserheide/:
>> Am Montag, 13. August 2012, 23:39:01 schrieb Stanimir Stamenkov:
>>> Mon, 13 Aug 2012 21:57:11 +0200, /Arne Babenhauserheide/:
>>>
>>>> If you don’t need the merges, you can do it like this:
>>>> hg log -r "all() - merge()" -G
>>>
>>> Would it be possible to hide just intermediate merges from:
>>
>> How would you define “intermediate merge”?
>>
>> Just show the last merge?
>>
>> And why do you need the final merge? It’s a regular merge like all
>> the others, too.
>
> I need all "final" merges present to have a continuous graph. I
> don't need just the last merge.
>
> With my initial example I would define "intermediate merge" as:
>
> Merge changeset which has a parent with two children.
>
> May be this is just a subset of:
>
> Merge changeset which has a parent with more than one child.
>
> Could this be expressed using revsets?
It would have been nice if one could:
$ hg log -r "all() - merge(parents(count(children()) > 1))" -G
>> PS: I just turned my email into a blog bost, too:
>>
>> http://draketo.de/light/english/mercurial/creating-nice-logs-revsets
--
Stanimir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: central.bundle
Type: application/octet-stream
Size: 4734 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20120819/18efc445/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fork.bundle
Type: application/octet-stream
Size: 4850 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20120819/18efc445/attachment-0005.obj>
More information about the Mercurial
mailing list