Mario
Mario

Reputation: 51

Reviewboard/SVN post-review errors: repository path is not in the list of known repositories

I'm having difficulties with creating a new review entry in Review Board automatically through a checkin in Subversion (SVN). I've created a post-commit hook which, when run manually gives the following exception:

Failed to execute command: ['c:\\python25\\Scripts\\post-review', '--repository-   
url=file:///Repository/svn/TestProject', '--user
=reviewmanager', '--password=########', '-p', '--submit-as=mario', '--revision-    
range=44:45', '--server=http://172.16.4.175/reviewboard
--disable-proxy', '--summary=refs #2564 testcheckin for reviewboard', 
'--description=(In [45]) refs #2564 testcheckin for reviewboard. \npublish review', '']

There was an error creating this review request.

The repository path "http://sos35/svn/TestProject" is not in the list of known repositories on the server.

I've created a repository with this specific path in the reviewboard server. svn info gives this path as the rootpath of the svn repository. Running this script on the SVN repository server from the hooks folder.

So everything seems to be lined up for success, except for the previously mentioned exception.

Does anyone have any clue to solve this puzzle? Tried the .reviewboardrc file checkin in the project-root, with no success. Could be because this information in being overridden in the commandline of post-review.

Upvotes: 5

Views: 9941

Answers (4)

RootUser RD
RootUser RD

Reputation: 21

I also had similar issue but removing the tick from end of the path fixed the issue.

Upvotes: 2

malenkiy_scot
malenkiy_scot

Reputation: 16605

Make sure that the repository URL in ReviewBoard settings does not end with a slash. That did the trick for me.

Upvotes: 3

chenxi.hou
chenxi.hou

Reputation: 51

Perhaps you should ask your review-board administrator to add the root SVN path for you, I encountered this problem yesterday, and soon after the administrator add the SVN path for me, the post-review command worked.

However, I was faced with a new problem, the review request is successfully created but the diff file was not uploaded. I think the integration of review-board with SVN or possibly other SCMs really needs improvement.

Upvotes: 2

bta
bta

Reputation: 45057

Do you only see this problem when running the post-review script, or do you also get an error when performing the same operation through the web interface?

Remember that the post-review script uses variables set in your .reviewboardrc file as well as what you pass on the command line. Make sure that you don't have conflicting options set in these two places.

I see that you have two types of URLs in your script: some use the http:// format, and some use the file:// format. Do you have a single machine that is serving up both Subversion and ReviewBoard, or are these on separate servers? How does the URL http://sos35/svn/TestProject relate to these systems?

Does the file:///Repository/svn/TestProject option describe a path on the machine that is running the script, or on the machine that is hosting ReviewBoard? If this is a path on the machine that is running the script, then remember that it is not a valid path on any other server. When a separate ReviewBoard server interprets that path, it won't match the URL that you used when configuring the repository (this most likely used a http:// or svn:// format URL). The value passed to the --repository-url= option should exactly match the value listed in the "Path" field for the repository in ReviewBoard's admin interface.

Upvotes: 1

Related Questions