hg up and phases, surprises

Uwe Brauer oub at mat.ucm.es
Sat May 27 06:43:30 UTC 2023


> On 5/25/23 15:49, Uwe Brauer wrote:


> 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.

I am not so sure (but my evolve version is a bit old), 

Now, all local repositories have Publish true
and I generate a dummy (local) remote repository to which I push


hg init local
hg init remote
cd local
echo "First line" >> test.org
hg addremove
hg ci -m "First commit test"
echo "Second line" >> test.org
hg ci -m "Second commit test"
echo "Third line" >> test.org
hg ci -m "Third commit test"
hg up 0
hg branch british
hg topic english23
echo "Secret line" >> test.org
hg ci -s -m "First secret"
echo "Secret line2" >> test.org
hg ci -m "Second secret"
hg up default


Now 
hg up british 

Gives 
abort: unknown revision 'british'!

I found that bizarre: all changesets on this branch a secret but why
can't I upgrade to them

Is this the desired behavior, really?

hg up english23 

However works

 hg up default

Still works
now I push and add two (draft changesets)

hg push ../remote
echo "New line draft" >> test.org
hg ci -m "Draft commit test"
echo "New line2 draft" >> test.org
hg ci -m "Draft commit2 test"
hg up english23
hg up default

Now hg does what I expect. I am puzzled. So something is not right in my
original repository


> 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.

So are you saying if I use topics I should use them on all branches?

I usually leave the default branch topic free and add topics for
temporal work to other named branches.

-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5673 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20230527/0c3d10b4/attachment.p7s>


More information about the Mercurial mailing list