Question

Summary:

When I do a post-review I get new reviews created on reviewboard, however I don't get the diff from my CVS project with it.

A post-review to a new request shows the diff from command line using the debug option. After it shows the diff, the post-review script tries to upload the diff to the server (it even shows the diff has size), after it tries to upload it shows a messages that the diff file is empty.

On the server side, the log complains about the absolute path of the CVS file being diffed.

Doing other reading, the absolute path problem may be fixed by removing the cvs root path and using a relative path instead of the absolute path. In my project's CVS directory, the Repository file is showing as relative path. I believe the value that needs to be updated resides on the reviewboard server, somewhere. From what I've read, this sounds like a configuration issue, however I'm unsure of what I needs to be updated.

Setup Details:

Reviewboard Server:

Cent OS 6.0
Review Board 1.7.11

Client:

Windows 7 
Python 2.7.3
RBTools 0.5.1
setuptools 0.7.7

More Details:

I've used Reviewboard in the past with perforce on different servers to help do code reviews. I'm working on a new project at a different company that uses CVS as its source control.

I setup Reviewboard on a separate box than our CVS server. Reviewboard is setup and connects to my repository via pserver. The repository connects properly from the Reviewboard admin console.

In order to get post-review to connect to the server, I created a .reviewboardrc file in the project directory I'm trying to post the review from. It looks similar to:

REPOSITORY = "cvsroot"
REVIEWBOARD_URL = "http://10.100.10.231"
USERNAME = "user"
PASSWORD = "password"

The diff looks like it works properly, as when I run: post-review --output-diff I get:

C:\path>post-review --output-diff
cvs diff: ignoring __history (CVS/Entries missing)
cvs diff: Diffing .
Index: blob.cpp
===================================================================
RCS file: /home/cvsroot/path/on/server/blob.cpp,v
retrieving revision 1.3
diff -u -r1.3 blob.cpp
--- blob.cpp    28 Jun 2013 23:28:55 -0000      1.3
+++ blob.cpp    1 Jul 2013 19:56:57 -0000
@@ -31,7 +31,12 @@
 __fastcall TformBlob::TformBlob(TComponent* Owner)
        : TForm(Owner)
 {
+<<<<<<< blob.cpp
+       // This is a test to see if I can get it into source control with review
 board.
+       // test 2 after clean check in.
+=======
        // jao: This is a test to see if I can get it into source control with r
eview board.
+>>>>>>> 1.3
 }
 //---------------------------------------------------------------------------
 void __fastcall TformBlob::btnSelectFileClick(TObject *Sender)
cvs diff: Diffing Debug
cvs diff: Diffing Reports

C:\path>

When I do a post-review -r 1 -d, it goes through the diff process but seems to have an issue uploading the diff to the server. The following contains the error message:

cvs diff: Diffing Debug
cvs diff: Diffing Reports
---
>>> HTTP GETting api/
>>> HTTP GETting http://10.100.10.231/api/info/
>>> Using the new web API
>>> HTTP GETting http://10.100.10.231/api/review-requests/1/
>>> Uploading diff, size: 883
>>> HTTP POSTing to http://10.100.10.231/api/review-requests/1/diffs/: {}
>>> Got API Error 105 (HTTP code 400): One or more fields had errors
>>> Error data: {u'fields': {u'path': [u"cvs [checkout aborted]: Absolute module
 reference invalid: `/home/cvsroot/path/on/server/blob.cpp'\n"
]}, u'stat': u'fail', u'err': {u'msg': u'One or more fields had errors', u'code'
: 105}}

Error uploading diff

Your review request still exists, but the diff is not attached.

The end result is a review request is created on reviewboard, however there is no detail/diff info with the request.

I turned on logging from the reviewboard admin console and when I do the post, I get:

None - user - /api/review-requests/1/diffs/ - Error uploading new diff: cvs [checkout aborted]: Absolute module reference invalid: `/home/cvsroot/path/on/server/blob.cpp'
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/webapi/resources.py", line 2040, in create
    request.FILES.get('parent_diff_path'))
  File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/reviews/forms.py", line 308, in create
    history)
  File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/diffviewer/forms.py", line 88, in create
    diff_file, basedir, check_existance=(not parent_diff_file)))
  File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/diffviewer/forms.py", line 189, in _process_files
    self.request))):
  File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/scmtools/models.py", line 187, in get_file_exists
    exists = self._get_file_exists_uncached(path, revision, request)
  File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/scmtools/models.py", line 290, in _get_file_exists_uncached
    exists = self.get_scmtool().file_exists(path, revision)
  File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/scmtools/core.py", line 81, in file_exists
    self.get_file(path, revision)
  File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/scmtools/cvs.py", line 54, in get_file
    return self.client.cat_file(path, revision)
  File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/scmtools/cvs.py", line 271, in cat_file
    return self._cat_specific_file(filename, revision)
  File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.11-py2.6.egg/reviewboard/scmtools/cvs.py", line 322, in _cat_specific_file
    raise SCMError(errmsg)
SCMError: cvs [checkout aborted]: Absolute module reference invalid: `/home/cvsroot/path/on/server/blob.cpp'

This also references the Absolute module reference, besides the client's Repository file, is there somewhere else I should be looking? The path to the file looks legit.

Troubleshooting Steps I've Tried:

  • I've ensured reviewboard on server is running latest version.
  • I've ensured client post code is latest. e.g. easy_install -U RBTools
  • Googled the error about "Absolute module reference invalid", found the reference of http://devnet.jetbrains.com/thread/158342 and verified that my Repository file on my client shows only the relative path.

What could I be missing?

Was it helpful?

Solution

Got in contact with the developers of reviewboard via their google group. Christian helped me get the command to troubleshoot my issue, then I was able to update my connection string in the reviewboard admin console. Once updated I was able to post properly.

For anyone interested in the details of the troubleshooting, you can view the google group responses at: https://groups.google.com/forum/#!topic/reviewboard/Gps1F6HMuO8

Christian, you are the man!

The following is what I had:

Name: cvsroot Show this repository is checked Hosting service: (None - Custom Repository) Repository type: CVS Path: :pserver:reviewer:reviewerpassword@10.100.10.2:2401/home/cvsroot/ Mirror path: Username: Password:

Note in the above that the connection string was not working properly with a ":" before the /home/cvsroot. When we first created it, I believe we couldn't get it to save without the port either... needless to say, the above path doesn't really match the connection string we used via the command prompt, so it makes sense it didn't work.

I updated my Path to the following (note removed the port, added the ":" and removed the trailing slash) and it works now:

:pserver:reviewer:reviewerpassword@10.100.10.2:/home/cvsroot

Thanks! James

Note the ":" before the /home/cvsroot in the 2nd connection string. From what I've read, the 2nd line looks to match what cvs wants. Any idea on why this would work for us via the command line, but not connect from the reviewboard admin console? Is the username and password in the pserver connection string messing it up?

Thanks for your help, James

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top