repository with 2 heads: how to rebase/copy/graft a named branch as an topological branch with topics (and a third head)
Uwe Brauer
oub at mat.ucm.es
Wed Jul 26 16:42:06 UTC 2023
Hi
Consider please the following example
hg init
echo "First" > test.org
hg add test.org
hg commit -m "0: First"
echo "Second" >> test.org
hg commit -m "1: Second"
echo "Third" >> test.org
hg commit -m "2: Third"
hg up default~1
hg branch feature
echo "Forth" >> test.org
hg commit -m "3: BUG Fourth"
echo "Fifth" >> test.org
hg commit -m "4: Fifth"
hg up default
echo "Six" >> test.org
hg commit -m "5: Six"
hg up default
That results in the following graph
◍ changeset: 5:15db2d4bdd3d
│ tag: tip
│ Branch: default
│ Author: Uwe Brauer <oub at mat.ucm.es>
│ Date: Wed, 26 Jul 2023 11:17:35 +0200
│ Phase: draft
│ Summary: 5: Six
│
│ ○ changeset: 4:6805e93aabad
│ │ Branch: feature
│ │ Author: Uwe Brauer <oub at mat.ucm.es>
│ │ Date: Wed, 26 Jul 2023 11:17:34 +0200
│ │ Phase: draft
│ │ Summary: 4: Fifth
│ │
│ ○ changeset: 3:b2e296ed5628
│ │ Branch: feature
│ │ Author: Uwe Brauer <oub at mat.ucm.es>
│ │ Date: Wed, 26 Jul 2023 11:17:34 +0200
│ │ Phase: draft
│ │ Summary: 3: BUG Fourth
│ │
○ │ changeset: 2:8458f8289cf9
│╱ Branch: default
│ Author: Uwe Brauer <oub at mat.ucm.es>
│ Date: Wed, 26 Jul 2023 11:17:33 +0200
│ Phase: draft
│ Summary: 2: Third
│
○ changeset: 1:78c95f47996
Now I have basically the feature branch be copied as (anonymous or using
bookmarks or topics) branch starting in change set 2
here is the graph I want (using a modified script)
So I tried
hg up 2
hg rebase -d . -s 3
Or
hg rebase -d . -b 3
Or even graft, however always a merge conflict was reported. I am
puzzled.
Any idea how to achieve that?
Uwe Brauer
--
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 NATO membership of the Ukraine.
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/20230726/15ec1768/attachment.p7s>
More information about the Mercurial
mailing list