Trialling this software, using v1.6 RC2.

Doing a "post-commit" review using post-review with SVN repository, I
notice the wrong svn diff option is used when specifying a single SVN
revision (rather than a range of revisions).

The documentation states "If you only need to post a single revision,
you can type:
$ post-review --revision-range=REVISION"
but this doesn't work properly.

Debug output:

$ post-review --revision-range=157778 --debug
>>> RBTools 0.3.3
>>> Home = /home/<snip>
>>> svn info
>>> diff --version
>>> repository info: Path: http://<snip>/repo, Base path: /<snip>/trunk, 
>>> Supports changesets: False
>>> HTTP GETting api/
>>> HTTP GETting http://<snip>/reviews/api/info/
>>> Using the new web API
>>> svn diff --diff-cmd=diff -r 157778
^CTraceback (most recent call last):
<snip>
KeyboardInterrupt

The -r option with a single arg is equivalent to 0:157778, and begins
fetching EVERY change made on the current path, up to rev 157778 in
this example. In my case, this was thousands of revs...

The svn diff command should be:
svn diff --diff-cmd=diff -c 157778

i.e. it should use -c option.

The -r option works when a range is specified with 2 args, so post-
review could convert a single arg to a range using 2 args as in svn
diff -r (rev-1):rev

so the following would do the same job as -c (and might be easier to
code):
svn diff --diff-cmd=diff -r 157777:157778

Specifying a revision range with 2 args works correctly, e.g.:

$ post-review --revision-range=157777:157778 --debug
>>> RBTools 0.3.3
>>> Home = /home/<snip>
>>> svn info
>>> diff --version
>>> repository info: Path: http://<snip>/repo, Base path: /<snip>/trunk, 
>>> Supports changesets: False
>>> HTTP GETting api/
>>> HTTP GETting http://<snip>/reviews/api/info/
>>> Using the new web API
>>> svn diff --diff-cmd=diff -r 157777:157778
^CTraceback (most recent call last):
 <snip>
KeyboardInterrupt

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to