hgweb page with hg log -b <branchname>

Johan Samyn johan.samyn at gmail.com
Sun Jan 10 08:38:11 CST 2010


2010/1/10 Mads Kiilerich <mads at kiilerich.com>:
> Johan Samyn wrote, On 01/09/2010 10:28 AM:
>> 2010/1/9 Mads Kiilerich<mads at kiilerich.com>:
>>> FWIW I had DAG branches in mind, not named branches. That makes a
>>> difference, but they might have a lot in common anyway.
>>
>> Mads, could you explain to me what you mean by the difference between
>> a named branch and a DAG branch ?
>
> I just to distinguish from "named branch". See
> http://mercurial.selenic.com/wiki/Branch for a description of how the term
> branch is sometimes used for slightly different concepts. "Named branch" is
> one of them and well-defined, but the alternative has no good name. I used
> "DAG branch" to describe - it might be a new and ugly term, but it is exact
> and Dan intuitively understood it ;-)
>
> A shorter and less detailed example than Dans could be
> A - B - C - D - F - G - K (default)
>            \
>             E - H - I - J (feature1)
>                  \
>                   L - M   (feature1)
> where you have both the I-J and the L-M "branch" on your feature1 "branch".
> And if you forget about the named branches in this example you have 3
> "branches". These branches in the (Directed Asyclic) Graph is what I call
> "DAG branches". As you can see they occur both with and without named
> branches.
>
> /Mads
>
Thank you too, Mads, for explaining.

So your dag branches - named or not - end in what "hg heads" shows. A
branch exists for each rev that has no children. And if you follow
each heads history (down to rev 0), you have walked all branches in
the repo. This walk also shows that branches can share some history
(they all share at least rev 0).

Consider the next example, with 3 active and 1 inactive branch.
When asking the branch view for the U head, do you also want to see :
1) The M-Q deviation (as it has been merged) ?
2) The X-Y deviation (even when it's not merged) ?
3) The A-B part ?
When asking the branch view for the Q head, do you want to also see :
4) The X-Y deviation (though it has not been merged) ?
A - B - C - D - E - F - G
      \
       H - I  -  J  -  K  -  L  -  T  -  U
             \                        /
              M - N - O - P - Q
                      \
                       X - Y
I would be interested to have Sune answer these questions too.

This raises further questions for hgweb of cours, like :
1) Do you want the current branch page to also show a line for the
heads of all unnamed branches ?
2) Do you want the (future) branchlog page to show only up to the
starting rev of the branch, or always up to rev 0 ?

I'm also beginning to think that only a grahical representation will
do for those branchlog views. Because that would clearly show the
position of the selected branch (and its deviation(s)) in relation to
the complete DAG. I figure that's in fact what you suggested earlier,
Sune, isn't it ?

Johan


More information about the Mercurial-devel mailing list