My team uses SVN for source control. Recently, I've been working on a branch with occasional merges from the trunk and it's been a fairly annoying experience (cf. Joel Spolsky's "Subversion Story #1"), so I've been looking alternative ways to manage branches and merging. Given that a centralized SVN repository is non-negotiable, what I'd like is a set of tools that satisfy the following conditions.
Complete revision history should be stored in SVN for both trunk and branches.
Merging in either direction (and potentially criss-crossing) should be relatively painless.
Merging history should be stored in SVN to the greatest extent possible.
I've looked at both git-svn
and bzr-svn
and neither seems to be up to the job—basically, given the revision history they can export from the SVN repository, they can't seem to do any better a job handling merges than SVN can. For example, after cloning the repository with git
, the revision history for my branch shows the original branch off of trunk, but git
doesn't "see" any of the interim SVN merges as "native" merges—the revision history is one long line. As a result, any attempts to merge from trunk in git
yield just as many conflicts as an SVN merge would. (Besides, the git-svn
documentation explicitly warns against using git
to merge between branches.)
Is there a way to adjust my workflow to make git
satisfy the above requirements? Maybe I just need tips or tricks (or a separate merging tool?) to help SVN be better at merging into branches?
Without having a pure SVN answer, I would like to refer to the SO question "How to fool git-svn to recognize merges made with svn?"
I recommended doing those git merges in a special branch, but a simpler solution would be to record (at least the most recent) SVN merges in the git-svn
cloned repo with git grafts file, in order to transform:
o-...-A---o---D--- unstable
/
X-----B---M---o---o--- stable
into:
o-...-A---o---D--- unstable
/ \
X-----B---M---o---o--- stable
, easing the git merge process, before dcommit and sending that back to SVN.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With