Git SVN diff compatible with reviewboard (and TortoiseSVN?)
Aug 31st, 2010 by RealNitro
Recently I needed to upload some patches to Review Board. I foolishly tried to upload a patch that was created by git diff (I’m a git-svn user) but Review Board expects an SVN patch… While there are some simple solutions to be found on the web, I could not find any that correctly handled new files in the patch. The closest thing I found was a mail on the KDE panel-devel mailinglist.
I started looking into sed and came up with a slightly more powerful version:
This script supports updated files and new files. I have not tested it yet with deleted files.
Feel free to use it if you need it. Good luck!
Note: a friend linked me a Perl script that does the same thing. I haven’t tested it yet, so I have no idea how well it works.
Updated script at: https://gist.github.com/710219
post-review will actually do the conversion in most scenarios also (if not all).
I tend to do:
post-review –parent=remotes/trunk
when working on a git-local branch of remotely tracked svn trunk
(use -n if you just want the diff)
Thanks for the hint Ultrahex. I’m no longer using Reviewboard, unfortunately. When I have to use it again, I will surely give post-review a try.
Felix…
RealNitros Blog » Blog Archive » Git SVN diff compatible with reviewboard (and TortoiseSVN?)…