[patch] limit log to a single branch
Steve Borho
steve at borho.org
Mon Feb 11 09:28:43 CST 2008
On Mon, 2008-02-11 at 11:49 -0200, Alexis S. L. Carvalho wrote:
> Thus spake Steve Borho:
> > TortoiseHg has a 'branch filter' for it's changelog grapher. It starts
> > at the branch tip and walks backwards only showing changesets explicitly
> > marked as part of the branch their ancestors.
> >
> > Would people be interested in me back-porting this to the graphlog
> > extension?
>
> How do you draw non-contiguous branches? E.g. (showing only branch
> names; time goes from bottom to top):
The algorithm is quite simple:
1) Start with branch tip read from the branch cache
2) Store ancestors of current node
3) Check rev-1. If it's in ancestor list, plot it. Else if
ctx.branch() matches, plot it.
4) goto 2
> foo foo
> \ /
> \ /
> bar
> / \
> / \
> foo foo
>
> Arguably, even if "bar" is in a different branch, you'll want to show
> it (because it's a merge, not because it's a branching point).
If this case, bar is an ancestor of the top foos, so it will be shown.
I'll submit a patch and we can debate whether it's the best approach.
--
Steve Borho (steve at borho.org)
http://www.borho.org/~steve/steve.asc
Key fingerprint = 2D08 E7CF B624 624C DE1F E2E4 B0C2 5292 F2C6 2C8C
More information about the Mercurial
mailing list