Creating Patches for Subversion from Git
What a dreadful way to spend the last hour I wish it upon no one else. I recently started using Git and git-svn to track some of my projects and I almost completely abandoned it because creating an svn friendly patch that something like TortoiseMerge could apply is impossible. Then I found the git-svn-utils project. It doesn’t look like its active but it does have a script git-svn-diff which is exactly what I was looking for. Unfortunately the script was not handling new files the way subversion, or maybe TortoiseMerge wanted. So I made some pretty bad hacks and came up with this version. It will create a full patch file that can be applied with TSVN.
I am interested to know if I am the only one out there that had this problem or if there is a better solution. Please let me know as I am a total git newb.
[tag]git, svn[/tag]
Hi,
Are you using Git on Windows or Nix?
I read that Git looses some of its advantages on Windows because it is optimized for the Nix file system and that Bazaar might be more Windows and Svn friendy.
Did you see this post:
http://info.wsisiz.edu.pl/~blizinsk/git-bzr.html
@Jacques
Thanks for the tip. I am currently using git on windows under cygwin. Performance is not nearly as good as raw *nix. Git on windows is not that common so I am hoping over time support picks up.
I am not familiar with Bazaar but I will check it out.
Adam
Hi Adam, this is definately a frustration. I’m going to have to check out your git-svn-utils stuff. Would be nice to get this into git-svn,
something like git svn format-patch although I have no idea how hard that would be. Until then I’ve posted my solution here http://codeprairie.net/blogs/chrisortman/archive/2008/01/14/creating-subversion-patches-with-git.aspx
Awesome script. You should put it on GitHub.