2729: Can't create new review request

marcelo********@gmai***** (Google Code) (Is this you? Claim this profile.)
Sept. 18, 2012
2359
What version are you running?
v1.6.11 and v.1.7 Beta1

What's the URL of the page containing the problem?
http://svn.grid.xip.com.au

What steps will reproduce the problem?
1. Try to create a post-review new review request on got the error
URL http://myrepo/branches/s-1.3.0 refers to a directory
Can't get text contents of a directory. It happens with any file I'd like to have a review and also with the netbeans plugin

Also got the same error if I try to upload the file manually via web

What is the expected output? What do you see instead?
Be able to upload diff, and what I see is the error, can't upload diff file. 


What operating system are you using? What browser?

Ubuntu, 10.04, several browsers, same result. 


Please provide any additional information below.
Index: /branches/s-1.3.0
===================================================================
--- /branches/s-1.3.0	(revision 3205)
+++ /branches/s-1.3.0	(working copy)
Property changes on: .
___________________________________________________________________
Added: reviewboard:url
## -0,0 +1 ##
+http://reviews.grid
\ No newline at end of property
Index: /branches/s-1.3.0/application/configs/application.ini
===================================================================
--- /branches/s-1.3.0/application/configs/application.ini	(revision 3205)
+++ /branches/s-1.3.0/application/configs/application.ini	(working copy)
@@ -84,8 +84,8 @@
 ;note: master, need to user masterDbName as connection name.
 resources.db.grid.dsn                                       = "mysql://grid:grid@127.0.0.1:4040/grid_dev"
 
-global.cron.url.prefix                                      = "kenneth.gridproc"
-global.cron_queue.url.prefix                                = "kenneth.grid"
+global.cron.url.prefix  
#1 marcelo********@gmai***** (Google Code) (Is this you? Claim this profile.)
The error on the error logs is

Error uploading new diff: URL 'http://svn.grid/branches/s-1.3.0' refers to a directory
Can't get text contents of a directory
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.7beta1-py2.6.egg/reviewboard/webapi/resources.py", line 1625, in create
    request.FILES.get('parent_diff_path'))
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.7beta1-py2.6.egg/reviewboard/reviews/forms.py", line 296, in create
    history)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.7beta1-py2.6.egg/reviewboard/diffviewer/forms.py", line 85, in create
    diff_file, basedir, check_existance=(not parent_diff_file)))
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.7beta1-py2.6.egg/reviewboard/diffviewer/forms.py", line 176, in _process_files
    not self.repository.get_file_exists(filename, revision))):
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.7beta1-py2.6.egg/reviewboard/scmtools/models.py", line 169, in get_file_exists
    return self.get_scmtool().file_exists(path, revision)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.7beta1-py2.6.egg/reviewboard/scmtools/core.py", line 72, in file_exists
    self.get_file(path, revision)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.7beta1-py2.6.egg/reviewboard/scmtools/svn.py", line 154, in get_file
    raise SCMError(e)
SCMError: URL 'http://svn.grid/branches/s-1.3.0' refers to a directory
Can't get text contents of a directory
#2 marcelo********@gmai***** (Google Code) (Is this you? Claim this profile.)
Also for the previous version, error is quite similar

Error uploading new diff: URL 'http://svn.grid/branches/s-1.3.0' refers to a directory
Can't get text contents of a directory
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.6.11-py2.6.egg/reviewboard/webapi/resources.py", line 1509, in create
    request.FILES.get('parent_diff_path'))
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.6.11-py2.6.egg/reviewboard/reviews/forms.py", line 296, in create
    history)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.6.11-py2.6.egg/reviewboard/diffviewer/forms.py", line 84, in create
    diff_file, basedir, check_existance=(not parent_diff_file)))
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.6.11-py2.6.egg/reviewboard/diffviewer/forms.py", line 170, in _process_files
    not self.repository.get_file_exists(filename, revision))):
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.6.11-py2.6.egg/reviewboard/scmtools/models.py", line 169, in get_file_exists
    return self.get_scmtool().file_exists(path, revision)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.6.11-py2.6.egg/reviewboard/scmtools/core.py", line 72, in file_exists
    self.get_file(path, revision)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.6.11-py2.6.egg/reviewboard/scmtools/svn.py", line 154, in get_file
    raise SCMError(e)
SCMError: URL 'http://svn.grid/branches/s-1.3.0' refers to a directory
Can't get text contents of a directory
#3 marcelo********@gmai***** (Google Code) (Is this you? Claim this profile.)
this is the error I've got from command line by using post review


>>> Review request created
>>> Uploading diff, size: 16150
>>> HTTP POSTing to http://reviews.grid/api/review-requests/21/diffs/: {'basedir': '/branches/s-1.3.0'}
>>> Got API Error 105 (HTTP code 400): One or more fields had errors
>>> Error data: {u'fields': {u'path': [u"URL 'http://svn.grid/branches/s-1.3.0' refers to a directory\nCan't get text contents of a directory"]}, u'stat': u'fail', u'err': {u'msg': u'One or more fields had errors', u'code': 105}}

Error uploading diff

The generated diff file was empty. This usually means no files were
modified in this change.
david
#4 david
Does it work if you remove the "property changes" part of the diff?
  • +NeedInfo
#5 marcelo********@gmai***** (Google Code) (Is this you? Claim this profile.)
Nop it doesn't work, 
I've noticed now, that I can only use post-review if I indicate a specific filename, otherwise it just doesn't work returning the errors above

Please help
david
#6 david
Can you show me the diff you just tried to upload based on my suggestion in comment 4?
#7 marcelo********@gmai***** (Google Code) (Is this you? Claim this profile.)
sure, but it doesn't matter because the one that are generated it by post-review doesn't work either

here's the one I created, but as I said, it really doesn't matter. it fails anyway


Index: /branches/s-1.3.0
===================================================================
--- /branches/s-1.3.0   (revision 3205)
+++ /branches/s-1.3.0   (working copy)

___________________________________________________________________
Added: reviewboard:url
## -0,0 +1 ##
+http://reviews.grid
\ No newline at end of property
Index: /branches/s-1.3.0/application/configs/application.ini
===================================================================
--- /branches/s-1.3.0/application/configs/application.ini       (revision 3205)
+++ /branches/s-1.3.0/application/configs/application.ini       (working copy)
@@ -84,8 +84,8 @@
 ;note: master, need to user masterDbName as connection name.
 resources.db.grid.dsn                                       = "mysql://grid:grid@127.0.0.1:4040/grid_dev"

-global.cron.url.prefix                                      = "kenneth.gridproc"
-global.cron_queue.url.prefix                                = "kenneth.grid"
+global.cron.url.prefix                                      = "marc.gridproc"
+global.cron_queue.url.prefix                                = "marc.grid"
 cron_manager.url                                            = "kenneth.cronmanager"

 [qa : development]
david
#8 david
It does matter because I think this is probably a duplicate of 2359, but I'd like to get some verification. You didn't remove the property change part of the diff (the change to /branches/s/1.3.0)
#9 marcelo********@gmai***** (Google Code) (Is this you? Claim this profile.)
mmmm. ok... 
could you please point me on what you want me to delete from there?
#10 marcelo********@gmai***** (Google Code) (Is this you? Claim this profile.)
I have tried that patch as well and didn't work
david
#11 david
Everything from the first line up to (but not including) "Index: /branches/s-1.3.0/app..."
#12 marcelo********@gmai***** (Google Code) (Is this you? Claim this profile.)
you are right!!! it worked! how can i fix it automatically?
david
#13 david
We don't yet have a fix.