hg up and phases, surprises

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri May 26 19:10:13 UTC 2023


On 5/25/23 15:49, Uwe Brauer wrote:
> Hi
>
> Look at the following graph
>
>
> ○  changeset:     569:33171fb597a8
> │  tag:           tip
> │  Branch:        default
> │  Author:        Uwe Brauer <oub at mat.ucm.es>
> │  Date:          Thu, 25 May 2023 15:42:36 +0200
> │  Topic:         corrections
> │  Phase:         draft
> │  Summary:       Ej2B change to singular
>> │ ◍  changeset:     568:e22c5cdee7aa
> │ │  Branch:        british
> │ │  Author:        Uwe Brauer <oub at mat.ucm.es>
> │ │  Date:          Thu, 25 May 2023 15:41:40 +0200
> │ │  Topic:         english-23
> │ │  Phase:         secret
> │ │  Summary:       Till E2A
>
>
> When I run
>
>   hg up default
>
> It does not jump to tip but to the last public change set on the default
> branch, why?


Your changeset are not considered as part of the "default" branch while 
there topic is active. The "default" keyword resolve to the head of the 
un-topiced changeset on default. This was an important update in topic 
behavior we made a while back, otherwise when multiple people work in 
topics, the head of branch does not means anything and keep jumping from 
one changeset to another.

If you actually want to jump on "the latest changeset whose branch is 
`foo`", use `hg update 'branch("foo")'`. I am curious of why you would 
want that though.


>
> ○  changeset:     556:8a4dd9916968
> │  Branch:        default
> │  Author:        Uwe Brauer <oub at mat.ucm.es>
> │  Date:          Thu, 25 May 2023 08:13:17 +0200
> │  Topic:         corrections
> │  Phase:         draft
> │  Summary:       Include David's changes in the org file.
>> ◍  changeset:     555:86dcedb61621
> │  Remote_Branch: local/default
> │  Branch:        default
> │  Author:        David Usero <umdavid at mat.ucm.es>
> │  Date:          Wed, 24 May 2023 17:33:29 +0200
> │  Phase:         public
> │  Summary:       Correct misprints etc
>>
>
>
> When I run
>
>   hg up british
>
> (Which is a secret phase)
>
> I obtain
>
>
> abort: unknown revision 'british'!
>
> But
>
> hg up english-23
>
> Works, which is a topic on this secret change set
>
> ○  changeset:     569:33171fb597a8
> │  tag:           tip
> │  Branch:        default
> │  Author:        Uwe Brauer <oub at mat.ucm.es>
> │  Date:          Thu, 25 May 2023 15:42:36 +0200
> │  Topic:         corrections
> │  Phase:         draft
> │  Summary:       Ej2B change to singular
>> │ ◍  changeset:     568:e22c5cdee7aa
> │ │  Branch:        british
> │ │  Author:        Uwe Brauer <oub at mat.ucm.es>
> │ │  Date:          Thu, 25 May 2023 15:41:40 +0200
> │ │  Topic:         english-23
> │ │  Phase:         secret
> │ │  Summary:       Till E2A
>
>
> Why?
>
> How can this behavior be changed?
>
> Thanks
>
> Uwe Brauer
>
>
>
>
>
-- 
Pierre-Yves David



More information about the Mercurial mailing list