Boost logo

Boost :

Subject: Re: [boost] [git] Mercurial? easy merging in svn, how about git/hg?
From: Frank Birbacher (bloodymir.crap_at_[hidden])
Date: 2012-03-29 02:05:53

Hash: SHA1


Thanks very much for your feedback! Both of you.

Am 28.03.12 22:49, schrieb Martin Geisler:
> So, it's very similar for this example.

Yes, so to me there is no significant difference in the commands that
create and merge branches. In the commands that is! You provided an
example where a rename leads to a conflict in svn, but not in hg or
git. That's a drawback on svn of course. On the other hand it is a
reported bug and likely to be fixed (I wonder why this hasn't been
fixed already, v1.5 has already been a while on stage.)

> But don't you need to add a --reintegrate flag if you want to merge
> your branch several times? It's mentioned here
> Neither Git nor Mercurial has has such a flag and both let you keep
> working with your branches after merging them (in any direction).

I do not need the "--reintegrate" flag. svn 1.6 keeps track of merge
information, and even before that I knew when the branch was created.
I've been working with branches in svn for some time and only lately
it occurred to me what the workflow using "--reintegrate" is. I guess
this is easier in hg or git. So we will need a more complex example, I

using Subversion 1.7.4:

# setup:
cd /tmp
svnadmin create testrepo
svn mkdir file:///tmp/testrepo/{trunk,branches} -m "default dirs"
svn co file:///tmp/testrepo/trunk workingcopy
cd workingcopy

# create branch:
svn cp ^/trunk ^/branches/my-branch -m "branch"
# edit branch:
svn switch ^/branches/my-branch
echo "new" > new.txt
svn add new.txt
svn ci -m "new file"
# switch back to trunk and merge:
svn switch ^/trunk
svn merge ^/branches/my-branch
# revise working copy before commit, or revert and try again
# svn revert -R .
svn ci -m "merged branch"

svn switch ^/branches/my-branch
echo "further" >> new.txt
svn ci -m "added content"
# merging:
svn switch ^/trunk
# optional inspection:
# svn mergeinfo --show-revs=eligible ^/branches/my-branch
svn merge ^/branches/my-branch
# optional inspection:
# svn pg svn:mergeinfo .
svn ci -m "merged branch again"

Running the above as a script takes some time:
real 0m10.433s
user 0m0.160s
sys 0m0.253s

> Could you try repeating the above commands with a rename in your
> branch and an edit in trunk?

I already tried your example before, and yes, I got a conflict. And I
was not able to work around this.

BTW, as I understand git: the working copy contains a hidden directory
that stores all of the repository data. And the checkout will be
placed at top-level. Is there a way to checkout multiple branches at
the same time?

Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: keyserver x-hkp://


Boost list run by bdawes at, gregod at, cpdaniel at, john at