hg up and phases, surprises
Uwe Brauer
oub at mat.ucm.es
Sat May 27 16:20:34 UTC 2023
>>> "PD" == Pierre-Yves David <pierre-yves.david at ens-lyon.org> writes:
> On 5/27/23 08:43, Uwe Brauer wrote:
>>> 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
> This has nothing to do with the secret phase, this has to do with all
> these changeset having a topic, so they did not "land" on that branch
> yet.
> With latest evolve, you get the current output from `hg branch` that
> highlight that:
> > hg branches ☿ ()
> british//english23 4:90d20203a429
> default 2:3d11032b06ce
> i.e. You have a "default" branch and a "english23" topic that will
> eventually land on the "british" branch. The "british" branch does not
> exist yet, however.
I don't understand why the british branch does not exist yet.
○ changeset: 8:8e0cbc87354e
│ tag: tip
│ Branch: british
│ Author: Uwe Brauer <oub at mat.ucm.es>
│ Date: Sat, 27 May 2023 08:39:37 +0200
│ Topic: english23
│ Phase: secret
│ Summary: Secret commit test
│
│ ◍ changeset: 7:088573303c2a
│ │ Branch: default
│ │ Author: Uwe Brauer <oub at mat.ucm.es>
│ │ Date: Sat, 27 May 2023 08:38:50 +0200
│ │ Phase: draft
│ │ Summary: Add stuff to the script
│ │
│ ○ changeset: 6:e4e83eeccbd8
│ │ Branch: default
│ │ Author: Uwe Brauer <oub at mat.ucm.es>
│ │ Date: Sat, 27 May 2023 08:36:30 +0200
│ │ Phase: draft
│ │ Summary: Draft commit2 test
│ │
hg branches
british:english23 8:8e0cbc87354e
default 7:088573303c2a
I thought the structure is the following.
1. There are two named branches british and default.
2. On top of that, there is a topic (a sort of short lived named
branch) which sits on top of the named branch british
3. I could also assign if I wish the topic to the other branch
(topics do not have namespaces as far as I understand)
hg up default
hg topic english23
echo "Line to the english23 topic" >> test.org
hg ci -m "Change set to topic on the default branch"
hg branches
default:english23 9:220554105a13
british:english23 8:8e0cbc87354e
default 7:088573303c2a (inactive)
Now I am very confused
hg topics --clear english23
Does not work,
So
hg topics -r 9 --clear
hg topics -r 8 --clear
hg branches
hg glg
hg topics -r 4 --clear
hg evolve
hg evolve --any
Works, hm very confusing.
--
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/ea930c78/attachment.p7s>
More information about the Mercurial
mailing list