Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way for git to create a patch for reviewboard?

I'm currently using the following command:

git diff --no-prefix -w trunk > my_beautiful_code.patch

but get the following error when I upload the diff in reviewboard:

No valid separator after the filename was found in the diff header

Is there a way to wrangle git into doing the right thing? The reviewboard is looking for the exact svn format, I believe. I could clone the svn repo, apply the patch, then make the patch with svn but that is tedious and I'd like a cleaner workflow...

Thanks!

like image 764
A Question Asker Avatar asked Jun 18 '12 01:06

A Question Asker


People also ask

How do you create a diff for a review board?

You can preview your diff by clicking View Diff in the review request action bar (in the top-right of the review request). Uploading a new diff (either using the Update ‣ Update Diff menu item or with rbt post) before publishing will replace the diff.


1 Answers

This is not a real answer but partially explains the problem.

This is caused by an unexpected (from the RB server point of view) diff syntax. You are missing some extra information which is normally present in the subversion RB diffs.

See this bug for a workaround:

https://hellosplat.com/s/beanbag/tickets/1918/

The bug description suggests you could switch to git-svn or you can write a simple find/replace script to have the diff prepared and fixed for you before uploading to RB.

like image 114
bcelary Avatar answered Sep 29 '22 13:09

bcelary