I used to use git to port features between different branches, rebase, rebase --onto, cherry-pick are typical tools I used. But now I have to work with svn. I don't like to use svn's built in merge command, cause it will combine all the commits into one "merge commit", though with some history traceability after 1.5. Say if I have a range of commits from r100 to r110 in branchA, now I want to port this feature to branchB and branchC by replaying these commits one by one with the same commit comment (resolve any conflicts in between). Is there any automatic tool which can do this for me?
How to transplant patches in svn
492 Views Asked by Terry Shi At
2
There are 2 best solutions below
3
On
If you can, use git-svn. The awesome git history won't be in the central repo, but you'll have a much better time managing the work on your end.
I don't know of any automated tool to do this, but you could implement one along the same lines of
git rebase. All it does it make a temporary directory and usegit format-patchto to extract the changes you want to rebase and thengit amto apply them back to the target root. If you typelocate git-rebaseon your system you can read it -- it's a shell script. It's probably/usr/local/libexec/git-core/git-rebase.The
svnequivalent would usesvn diffandsvn logto save the original commit information followed bypatchandsvn commit.