'hg summary' counts revs on other branches as update candidate

FUJIWARA Katsunori fujiwara at ascade.co.jp
Tue Feb 8 23:38:07 CST 2011


Hi, devel.

'hg summary' command counts revisions on branches other than current
one as update candidates, if there are descendants which are merged
with the revision on another branche.

# Otherwise, it seems to work well

For example:

         (parent)
    R1 ---- R2 ---- R3 ---- R4 ---- R5   .... current branch
                          /
    R6 ---- R7 ---- R8 --+               .... another branch

'hg summary' also counts R6/R7/R8 as update candidates unexpectedly.


'hg summary' does:

    1. mark ancestors of branch heads as candidates
       => marking from R5 to whole

    2. un-mark ancestors of current parent
       => un-marking from R2 to R1

so, candidate marking of R6/R7/R8 are not cleared.


I tried to implement patch for this, but met performance problem.

'hg summary' looks up only pure revlog part to look up ancestors of
each revisions, and there is no information about brach to which they
belong.

But reading branch information in(= getting changectx) seems to cost
much.

Once I tried on HG repo, elapsed time of 'hg summary' with
'repo[rev].branch()' invocation is x 5 of normal one !


Are there any good way to get branch information ? or what would you
think about above 'hg summary' behavior ?

--------------------
[FUJIWARA Katsunori]      fujiwara at ascade.co.jp(foozy at lares.dti.ne.jp)


More information about the Mercurial-devel mailing list