1229: post-review could support git format-patch submission instead of diff submision
- Duplicate
- Review Board
gregor******@gmai***** (Google Code) (Is this you? Claim this profile.) | |
Sept. 21, 2009 | |
board.org/ What version are you running? rbtools 0.2beta1 Describe the enhancement and the motivation for it. I would like to use Review Board and post-review with a git repository and I have a specific need, it could be very usefull if the git post-review submission could generate a patch using "git format-patch" instead of a diff ("git diff"). I already submitted patches without any problem (using the web interface) and the possibility to download the patch is very efficient for my development process. A specific option could be added '--patch' and the patch file name could be the one generated by git 'format-patch'. Additionally the option '-s' should be used.
At the time when I added pure git support to post-review, RB would hang if you sent a patch :) Sounds like someone fixed the diff parser to accept this. I'll look into this. It is preferable to send a patch, though the other half of this is actually using the commit numbers instead of file revisions on the server side.
The important point here is that we should keep the header of a patch generated with git format-patch. I modified post-review to generate patch but the server remove the header. diff 1770c1770 < return execute(["git", "diff", "--no-color", --- > return execute(["git", "format-patch", "--stdout",
The problem is the way the diff is stored in the database. It breaks it up into individual 'file' diffs. Also, we can't just change git diff to git format-patch --stdout because it will output an arbitrary number of patches. I'd like to see this supported eventually but from my investigation to properly support this we'd need to support patchsets, instead of individual diffs. For the near-term, I think it would be relatively easy to add support for storing the patch headers in the db. post-review would need to optionally generate a patch if you only want to upload a single commit.
Just getting the server not to strip the headers would be a big win. Generating a single diff to upload is not too painful imo
Sounds like this is, at its core, the same as issue 929.
-
+ Duplicate -
+ 929 - reviewboard should not alter the diff file