I am evaluating git-svn and trying to determine how well it will play with a particular svn repository. I am mostly concerned with getting git-svn to perform merges in such a way that the svn:mergeinfo property is correctly set in the subversion repo. Is this possible?
Here is what I have done so far:
# Checkout the SVN repo.
$ git svn clone svn://server/project1 -T trunk -b branches -t tags
# Make sure we are working on trunk.
$ git reset --hard remotes/trunk
# Modify the working copy.
$ vim file.txt
# Commit locally to the git repo.
$ git commit -a
# Push the commits back to the SVN server.
$ git svn dcommit
Committing to svn://server/project1/trunk ...
M file.txt
Committed r178
M file.txt
r178 = b6e4a3a0c28e7b9aa71d8058d96dcfe7c8a2b349 (trunk)
Now how would I go about merging that particular commit into one of the subversion branches? Again, it is very important to me that git properly set the svn:mergeinfo property when committing the change.
Even though this is an old question, the current state of affairs with git-svn has changed since it was asked. Specifically, in git 1.7.5, there is some limited support for setting the svn:mergeinfo when dcommitting back to svn.
git svn dcommitnow accepts the-mergeinfo=<mergeinfo>flag. To quote from the 1.7.5+ man page:One should be very careful when using this though. Even though the man page says “add” what it really means is “replace”. That is, the
svn:mergeinfoattribute is set based on what is passed, it does not add the specified revisions to the already existingsvn:mergeinfo. Learn from my mistake…Edit:
It appears that they are still working on improving this even further. As of git-svn 1.7.7, the following text was added to the git-svn man page: