I'm trying to convert my SVN Repository into a GIT repository.
The problem with this is, that in the SVN there are several active branches for
different software versions maintained in parallel.
So the SVN setup looks somthing like this:
| |- v1
| |- v2
| |- v3
| |- v1
| | |- 0
| | |- 1
| |- v2
git svn init -s --tags=tags/v1 --tags=tags/v2 <REPO_URL>
# modified .git/config to use tags/v1/* for the tags of the different versions
git svn fetch
git checkout -b v1 origin/v1
D--E--F v1 K--L--M v2
introduced a bug
Ok, I've finally managed to solve this issue myself.
I've solved this in two steps: First of all, as our code bases for
v2 are good (building and working, both with the known bugs fixed), I've recorded a merge of the
v1 branch into the
v2 branch and
Now I am able to merge the branches in
git. Then I've found this passage in the
config key: svn.pushmergeinfo
This option will cause git-svn to attempt to automatically populate the svn:mergeinfo property in the SVN repository when possible. Currently, this can only be done when dcommitting non-fast-forward merges where all parents but the first have already been pushed into SVN.
So I've enabled this config value
git config svn.pushmergeinfo true
and now, if a new bug is found, I'm fixing it in the lowest version that has this bug,
dcommit it to
svn, and afterwards merge it into the next version using the
--no-ff option. If I
dcommit now from there, the mergeinfos in
svn get updated and everything is ok.