evolve and rebase: works for named branches and topics.

Uwe Brauer oub at mat.ucm.es
Mon Dec 28 17:11:49 UTC 2020


Hi

Most likely most of you know, but the followings works nicely with
evolve  and topics. I
used it so far only with named branches, which are not very suited for
task at hand (I use it when I have to push to git repositories)

* First a named branch

hg init
echo Upstream1 > main.txt
hg add main.txt
hg commit -m "Master1"
hg branch  feature
echo feature1 > feature.txt
hg add feature.txt
hg commit -m "Feature1"
echo feature2 >> feature.txt
hg commit -m "Feature2"
hg update  default
echo uwe-three >> main.txt
hg commit -m "Master2"
hg  rebase -d . -b feature --collapse

* Now a topic

hg init
echo Upstream1 > main.txt
hg add main.txt
hg commit -m "Master1"
hg topic  feature
echo feature1 > feature.txt
hg add feature.txt
hg commit -m "Feature1"
echo feature2 >> feature.txt
hg commit -m "Feature2"
hg update  default
echo uwe-three >> main.txt
hg commit -m "Master2"
hg  rebase -d . -b feature --collapse



More information about the Mercurial mailing list