[fold: different for branches and bookmarks]
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Tue Dec 20 12:37:34 UTC 2016
On 12/19/2016 10:25 PM, Arne Babenhauserheide wrote:
>
> Uwe Brauer writes:
>
>> > Uwe Brauer writes:
>>
>>
>> > This sounds like a typical case for rebasing — or more elegantly using
>> > the evolve extension.
>>
>> > Upstream requires a single commit (one patch). So you’d ideally have
>> > just that.
>>
>> > With the evolve extension you’d simply issue
>>
>> > $ hg fold -r master -r feature
>>
>>
>> I just found out that fold behaves differently when using branches
>> instead of bookmarks. Using bookmarks, I obtain the same graph as you
>> but not for branches.
>
> That’s strange. I included evolve-testers in as recipient. This sounds
> like something to check.
The call `hg fold -r master -r feature` seems wrong. It will fold
'(master+feature)::. + .::(master+feature)' Most certainly not what you
want as master will be included in the resulting folded changesets.
You want `hg fold --exact 'only(master, feature)'
>> For branches I do:
>>
>>
>> hg init
>> echo feature > new.el
>> hg add new.el
>> hg commit -m feature1
>> echo offical2 >> new.el
>> hg commit -m feature2
>> echo feature3 >> new.el
>> hg commit -m feature3
>> hg branch feature
>> echo feature > feature.el
>> hg add feature.el
>> hg commit -m feature
>> echo feature2 >> feature.el
>> hg commit -m feature2
>> hg fold -r default -r feature
>>
>> Which gives the following graph
>>
>> @ changeset: 2:da5fe919132e
>> | tag: tip
>> | user: Uwe Brauer <oub at mat.ucm.es>
>> | date: Mon Dec 19 09:15:19 2016 +0000
>> | summary: feature3
>> |
>> o changeset: 1:fe3d513ead50
>> | user: Uwe Brauer <oub at mat.ucm.es>
>> | date: Mon Dec 19 09:15:19 2016 +0000
>> | summary: feature2
>> |
>> o changeset: 0:a6d03a55d8f1
>> user: Uwe Brauer <oub at mat.ucm.es>
>> date: Mon Dec 19 09:15:18 2016 +0000
>> summary: feature1
>>
>> While using bookmarks would give:
>> changeset: 5:e06ba3130622
>> | bookmark: master
>> | tag: tip
>> | parent: 1:80ab55999696
>> | user: Uwe Brauer <oub at mat.ucm.es>
>> | date: Mon Dec 19 09:17:22 2016 +0000
>> | summary: feature3
>> |
>> | x changeset: 4:3ff9dbef4b64
>> | | bookmark: feature
>> | | user: Uwe Brauer <oub at mat.ucm.es>
>> | | date: Mon Dec 19 09:17:17 2016 +0000
>> | | summary: feature2
>> | |
>> | x changeset: 3:6f10b3f58a52
>> | | user: Uwe Brauer <oub at mat.ucm.es>
>> | | date: Mon Dec 19 09:17:17 2016 +0000
>> | | summary: feature
>> | |
>> | x changeset: 2:71f8b88b0831
>> |/ user: Uwe Brauer <oub at mat.ucm.es>
>> | date: Mon Dec 19 09:17:16 2016 +0000
>> | summary: feature3
>> |
>> o changeset: 1:80ab55999696
>> | user: Uwe Brauer <oub at mat.ucm.es>
>> | date: Mon Dec 19 09:17:16 2016 +0000
>>
>>
>> With the script
>>
>> hg init
>> hg bookmark master
>> echo feature > new.el
>> hg add new.el
>> hg commit -m feature1
>> echo offical2 >> new.el
>> hg commit -m feature2
>> echo feature3 >> new.el
>> hg commit -m feature3
>> hg bookmark feature
>> echo feature > feature.el
>> hg add feature.el
>> hg commit -m feature
>> echo feature2 >> feature.el
>> hg commit -m feature2
>> hg fold -r master -r feature
The issue here is that 'hg fold' seems buggy with bookmark and "forgot"
to move the bookmark. This just seems like a bug.
--
Pierre-Yves David
More information about the Mercurial
mailing list