workflow help

Chuck Kirschman Chuck.Kirschman at bentley.com
Wed Jun 7 13:26:32 UTC 2017



From: Bryan Murdock [mailto:bmurdock at gmail.com]


On Jun 6, 2017 2:50 PM, "Chuck Kirschman" <Chuck.Kirschman at bentley.com<mailto:Chuck.Kirschman at bentley.com>> wrote:
The only documentation I can find describes how a "git pull --rebase" seems to recognize that the changesets are the same and so A1/A2 disappear whereas with Hg it is a conflict.
Have you tried this?  My experience is that mercurial actually does a better job than git of automatically resolving these kinds of rebases.

Bryan

I have tried it, although perhaps I am doing it incorrectly. Here is my hg simulation batch file. At the end it tries to rebase the original changesets c1-1 and c1-2 even though they are exactly the same as the ones that were pulled. I'm using Hg 4.2.0, and I have run both with and without the evolve extension; it doesn't seem to make a difference in this case.

added 4 changesets with 2 changes to 2 files (+1 heads)
rebasing 5:76217339c624 "c1-1"
merging client1.txt
merging client1.txt failed!

Thanks
chuck


rd /s /q master
rd /s /q build
rd /s /q c1
rd /s /q c2
rd /s /q c3
rd /s /q bundles

:: Master repository
mkdir master
hg init master
echo x >> master\m1.txt
hg -R master add master\m1.txt
hg -R master commit master\m1.txt -m"m-1"
echo x >> master\m1.txt
hg -R master commit master\m1.txt -m"m-2"
echo x >> master\m1.txt
hg -R master commit master\m1.txt -m"m-3"

:: Build repository
hg clone master build

:: Setup first client
hg clone master c1
echo x >> c1\client1.txt
hg -R c1 add c1\client1.txt
hg -R c1 commit c1\client1.txt -m"c1-1"
echo x >> c1\client1.txt
hg -R c1 commit c1\client1.txt -m"c1-2"

:: Setup second client
hg clone master c2
echo x >> c2\client2.txt
hg -R c2 add c2\client2.txt
hg -R c2 commit c2\client2.txt -m"c2-1"
echo x >> c2\client2.txt
hg -R c2 commit c2\client2.txt -m"c2-2"

:: Setup third client
hg clone master c3
echo x >> c3\client3.txt
hg -R c3 add c3\client3.txt
hg -R c3 commit c3\client3.txt -m"c3-1"
echo x >> c3\client3.txt
hg -R c3 commit c3\client3.txt -m"c3-2"

:: Create the 3 bundles simulating the queue; all clients have pushed
:: Hopefully this is done with a push hook
:: All changesets are still draft phase
mkdir bundles
hg -R c2 bundle bundles\c2.bundle
hg -R c3 bundle bundles\c3.bundle
hg -R c1 bundle bundles\c1.bundle

:: Process first bundle
hg -R build pull bundles\c2.bundle --rebase
hg -R build update
hg -R build push master

:: Client 1 pulls at this point
hg -R c1 pull master -u --rebase

:: Process second and third bundle
hg -R build pull bundles\c3.bundle
hg -R build rebase -b 5 -d 4
hg -R build pull bundles\c1.bundle
hg -R build rebase -b 7 -d 6
hg -R build push master

:: Client 1 pulls again, getting the changesets that were pushed
hg -R c1 pull master -u --rebase


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20170607/43ca5997/attachment-0002.html>


More information about the Mercurial mailing list