So... a few things. I haven't mentioned in this post that I'm on a windows machine. Maybe I should
Running at the command line: svn cat http://localhost/svnrepo/Firmware/Projects/Hello/branches/Hello_b_1_0_0_TestReview/source/hello.c -r 11 >old svn cat http://localhost/svnrepo/Firmware/Projects/Hello/branches/Hello_b_1_0_0_TestReview/source/hello.c -r 12 >new diff -u old new >patch Yields this output for the file 'patch': ------------------------------------------------------- --- old 2009-01-06 10:16:19.834724200 -0700 +++ new 2009-01-06 10:16:08.943681000 -0700 @@ -5,6 +5,7 @@ int main(void) { printf("There are %d months in a year", TWELVE); + printf("Another revision"); return; } ------------------------------------------------------- I can't seem to produce an output file using: patch -u --input=patch --output=patched old Which leads me to believe patch doesn't understand my patch. I tried to post a new review by hand using the above file 'patch'. Review board told me it couldn't parse the first line (Unable to parse diff revision header '2009-01-06 10:16:19.834724200 -0700'). This is the file 'patch' when svn diff -r 11:12 >patch is run in my working directory for comparison ------------------------------------------------------- Index: source/hello.c =================================================================== --- source/hello.c (revision 11) +++ source/hello.c (revision 12) @@ -5,6 +5,7 @@ int main(void) { printf("There are %d months in a year", TWELVE); + printf("Another revision"); return; } ------------------------------------------------------- On Jan 6, 1:10 am, "Muhammad Haggag" <[email protected]> wrote: > On Mon, Jan 5, 2009 at 10:16 PM, SamClark <[email protected]> wrote: > > > I'm having trouble finding instructions on explicitly using gnu diff > > while still preserving repo information. How do I work it into say > > 'svn diff -r 12:13 >testdiff' or a post-review.py call? > > In my case, I didn't use post-review at all. I wrote an equivalent > script from scratch that just targets our source control system, and > mimics the command-line interface we used prior to reviewboard. The > script retrieved the unmodified file from the source control system, > and launched gnu diff on that file against the one in the working > directory. The script then used the diff output to generate a patch > for reviewboard, inserting repository information where necessary. > > So in your case, I'd try (off the top of my head): > svn cat -r 12 >old-file > svn cat -r 13 >new-file > diff -u old-file new-file >my-patch > > Examine the generated diff. Is it different from the one generated by > svn? If it is, try to see if patch understands it: > patch -u -i my-patch -o patched-file old-file > > Regards > -- > Muhammad Haggag --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "reviewboard" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -~----------~----~----~----~------~----~------~--~---
