2063: Error uploading diff for a clearcase directoy diff

fede*****@gmai***** (Google Code) (Is this you? Claim this profile.)
April 25, 2011
What version are you running?

RB 1.5.4
RBTools 0.3.1

What's the URL of the page containing the problem?
N/A

What steps will reproduce the problem?

I have modified the postreview to fit the needs at my company
but I think that is a easy to spot error

basically the error happens when trying to send the diff for a directory
and it is trying to cat the file instead to ls the directory (on the server side reviewboard/scmtools/clearcase.py)

it might be easier to have a look at the code 
reviewboard/scmtools/clearcase.py 
line 56

see diff attached


What is the expected output? What do you see instead?
---------------------------------------------------------------------------------
POSTREVIEW OUTPUT

>>> Attempting to set field 'target_groups' to 'all' for review request '24'
>>> HTTP PUTting to http://reviewboard.al.com.au/api/review-requests/24/draft/: {'target_groups': 'all'}
>>> Uploading diff, size: 313
>>> HTTP POSTing to http://reviewboard.al.com.au/api/review-requests/24/diffs/: {'basedir': '/view/buildboy/vobs/'}
>>> Got API Error 105 (HTTP code 400): One or more fields had errors
>>> Error data: {'fields': {'path': ['cat: /view/buildboy/vobs/pylibs/pythonlibs/src/AL/apps/ArchivePackageCreator/@@/main/2: Invalid argument\n']}, 'stat': 'fail', 'err': {'msg': 'One or more fields had errors', 'code': 105}}

Error uploading diff

The generated diff file was empty. This usually means no files were
modified in this change.

---------------------------------------------------------------------------------

SERVER SIDE /httpd/error.log

[Thu Apr 07 00:41:41 2011] [error] ERROR:root:Error uploading new diff: cat: /view/buildboy/vobs/pylibs/pythonlibs/src/AL/apps/ArchivePackageCreator/@@/main/2: Invalid argument
[Thu Apr 07 00:41:41 2011] [error] Traceback (most recent call last):
[Thu Apr 07 00:41:41 2011] [error]   File "/var/virtualenv/REVIEWBOARD-1/lib/python2.5/site-packages/ReviewBoard-1.5.4-py2.5.egg/reviewboard/webapi/resources.py", line 1132, in create
[Thu Apr 07 00:41:41 2011] [error]     request.FILES.get('parent_diff_path'))
[Thu Apr 07 00:41:41 2011] [error]   File "/var/virtualenv/REVIEWBOARD-1/lib/python2.5/site-packages/ReviewBoard-1.5.4-py2.5.egg/reviewboard/reviews/forms.py", line 249, in create
[Thu Apr 07 00:41:41 2011] [error]     history)
[Thu Apr 07 00:41:41 2011] [error]   File "/var/virtualenv/REVIEWBOARD-1/lib/python2.5/site-packages/ReviewBoard-1.5.4-py2.5.egg/reviewboard/diffviewer/forms.py", line 63, in create
[Thu Apr 07 00:41:41 2011] [error]     diff_file, basedir, check_existance=(not parent_diff_file)))
[Thu Apr 07 00:41:41 2011] [error]   File "/var/virtualenv/REVIEWBOARD-1/lib/python2.5/site-packages/ReviewBoard-1.5.4-py2.5.egg/reviewboard/diffviewer/forms.py", line 149, in _process_files
[Thu Apr 07 00:41:41 2011] [error]     not tool.file_exists(filename, revision))):
[Thu Apr 07 00:41:41 2011] [error]   File "/var/virtualenv/REVIEWBOARD-1/lib/python2.5/site-packages/ReviewBoard-1.5.4-py2.5.egg/reviewboard/scmtools/core.py", line 68, in file_exists
[Thu Apr 07 00:41:41 2011] [error]     self.get_file(path, revision)
[Thu Apr 07 00:41:41 2011] [error]   File "/var/virtualenv/REVIEWBOARD-1/lib/python2.5/site-packages/ReviewBoard-1.5.4-py2.5.egg/reviewboard/scmtools/clearcase.py", line 59, in get_file
[Thu Apr 07 00:41:41 2011] [error]     output = self.client.cat_file(adjust_path, revision)
[Thu Apr 07 00:41:41 2011] [error]   File "/var/virtualenv/REVIEWBOARD-1/lib/python2.5/site-packages/ReviewBoard-1.5.4-py2.5.egg/reviewboard/scmtools/clearcase.py", line 164, in cat_file
[Thu Apr 07 00:41:41 2011] [error]     raise SCMError(errmsg)
[Thu Apr 07 00:41:41 2011] [error] SCMError: cat: /view/buildboy/vobs/pylibs/pythonlibs/src/AL/apps/ArchivePackageCreator/@@/main/2: Invalid argument

---------------------------------------------------------------------------------

What operating system are you using? What browser?
Linux food 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

Firefox 4


Please provide any additional information below.

The way I fixed the error was by just asking if it is path using the adjusted path see attached file for the diff
56c56
<         if os.path.isdir(adjust_path):
---
>         if os.path.isdir(path):
david
#1 david
1.6 will have a completely rewritten ClearCase backend, which should fix this issue.
  • +Fixed