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

FUJIWARA Katsunori fujiwara at ascade.co.jp
Wed Feb 9 00:29:20 CST 2011


Hi, 

Oops, all 'branch'es blow mean 'named branch'. Sorry for not mentioned.

At Wed, 09 Feb 2011 14:38:07 +0900,
FUJIWARA Katsunori wrote:
> 
> 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