1495: Need a descriptive error message when using --revision-range on unsupported SCMs
- Fixed
- Review Board
nickd*****@gmai***** (Google Code) (Is this you? Claim this profile.) | |
|
|
Sept. 24, 2011 |
RBTools was installed from http://downloads.reviewboard.org/releases/RBTools/0.2/RBTools-0.2beta2-py2.6.egg $ post-review --server=http://reviewboard-server --revision-range=280267 Traceback (most recent call last): File "/usr/local/bin/post-review", line 8, in <module> load_entry_point('RBTools==0.2beta2', 'console_scripts', 'post-review')() File "/Library/Python/2.6/site-packages/RBTools-0.2beta2-py2.6.egg/rbtools/postreview.py", line 2522, in main File "/Library/Python/2.6/site-packages/RBTools-0.2beta2-py2.6.egg/rbtools/postreview.py", line 2254, in tempt_fate File "/Library/Python/2.6/site-packages/RBTools-0.2beta2-py2.6.egg/rbtools/postreview.py", line 440, in upload_diff TypeError: object of type 'NoneType' has no len() Using Perforce SCM
$ post-review --debug --server=http://reviewboard-server --revision-range=280267 >>> svn info >>> git rev-parse --git-dir >>> p4 info >>> repository info: Path: perforce.local:1666, Base path: None, Supports changesets: True >>> Looking for 'reviewboard-server /' cookie in /Users/nick/.post-review-cookies.txt >>> Loaded valid cookie -- no login required >>> Attempting to create review request for None >>> HTTP POSTing to http://reviewboard-server/api/json/reviewrequests/new/: {'repository_path': 'perforce.local:1666'} >>> Review request created Traceback (most recent call last): File "/usr/local/bin/post-review", line 8, in <module> load_entry_point('RBTools==0.2beta2', 'console_scripts', 'post-review')() File "/Library/Python/2.6/site-packages/RBTools-0.2beta2-py2.6.egg/rbtools/postreview.py", line 2522, in main File "/Library/Python/2.6/site-packages/RBTools-0.2beta2-py2.6.egg/rbtools/postreview.py", line 2254, in tempt_fate File "/Library/Python/2.6/site-packages/RBTools-0.2beta2-py2.6.egg/rbtools/postreview.py", line 440, in upload_diff TypeError: object of type 'NoneType' has no len()
I'm also having this issue when trying to post a review request for post commit: >>> svn info >>> p4 info >>> repository info: Path: ######.######.com:1666, Base path: None, Supports changesets: True >>> Looking for '##### /' cookie in /Users/#####/.post-review-cookies.txt >>> Loaded valid cookie -- no login required >>> Attempting to create review request on ######.######.com:1666 for None >>> HTTP POSTing to http://######/api/json/reviewrequests/new/: {'repository_path': '#####.#####.com:1666'} >>> Review request created Traceback (most recent call last): File "/usr/local/bin/post-review", line 8, in <module> load_entry_point('RBTools==0.2rc2.dev-20100319', 'console_scripts', 'post-review')() File "build/bdist.linux-x86_64/egg/rbtools/postreview.py", line 2793, in main File "build/bdist.linux-x86_64/egg/rbtools/postreview.py", line 2499, in tempt_fate File "build/bdist.linux-x86_64/egg/rbtools/postreview.py", line 483, in upload_diff TypeError: object of type 'NoneType' has no len()
It looks like it's never actually attempting to generate the diff, which is something I've never seen before. I'll take a look and see if anything broke this recently.
-
- NeedInfo + Confirmed -
- Priority-Medium + Priority-High + Milestone-RBTools-Release1.0 -
+ chipx86
We're experiencing the same issue: C:\p4>post-review -d --p4-client=*** --revision-range=663597 --username=*** -- password=*** --submit-as=*** >>> svn info >>> p4 info >>> repository info: Path: ***:1666, Base path: None, Supports changesets: True >>> Looking for '*** /reviews/' cookie in C:\Documents and Settings\***\Application Data\.post-review-cookies.txt >>> Loaded valid cookie -- no login required >>> Attempting to create review request on ***:1666 for None >>> Submitting the review request as *** >>> HTTP POSTing to http://***/reviews/api/json/reviewrequests/new/: {'repository_path': '***:1666', 'submit_as': '***'} >>> Review request created Traceback (most recent call last): File "C:\Python26\Scripts\post-review-script.py", line 8, in <module> load_entry_point('RBTools==0.2rc2.dev-20100318', 'console_scripts', 'post- review')() File "build/bdist.linux-x86_64/egg/rbtools/postreview.py", line 2793, in main File "build/bdist.linux-x86_64/egg/rbtools/postreview.py", line 2499, in tempt_fate File "build/bdist.linux-x86_64/egg/rbtools/postreview.py", line 483, in upload_diff TypeError: object of type 'NoneType' has no len() The review is submit, but has no changelist details or diff.
Oh I see. --revision-range is not supported on Perforce (though we should certainly make the error way more clear). You'll want to use the Perforce range path syntax described here: http://www.reviewboard.org/docs/manual/dev/users/tools/post-review/#posting-paths
-
+ BetterErrors -
+ Need a descriptive error message when using --revision-range on unsupported SCMs
Oh I see, clearly I should have been paying more attention whilst RTFM ;-)
Hah... Nick and I did the same. I've tried with the Perforce path and it works fine now.
I'd also like to note that the documentation should also include that multiple files may be appended to the command when using the Perforce path syntax. post-review -r 42 //depot/path/file1 //depot/path/file2 //depot/path/file3