2975: similar names with hyphens in the repository name confuses post-review.

jol****@gmai***** (Google Code) (Is this you? Claim this profile.)
May 15, 2013
What version are you running?
RBTools-0.4.1-py2.7

What's the URL of the page containing the problem?
N/A - happens when attempting to use post-review to create a review to reviewboard.

What steps will reproduce the problem?
1. Add two new repositories to ReviewBoard each with similar names containing hyphens so that at lease a portion of the name matches:

example1>  http://svnserver.emulex.com/svndata/mycode-repos

example2>  http://svnserver.emulex.com/svndata/lnx-mycode-repos

2. check out the repository from example 2 and make a change.

3. run post-review passing only the --server and --summary options (I also used --debug to try to solve the issue).

What is the expected output? What do you see instead?

I expect to see that the review has been posted but instead I get the following error:

[jlacroix@cedar1]$ post-review --server="http://cmengapps1.company.com" --summary="test" --debug
>>> RBTools 0.4.1
>>> Home = /home/jlacroix
>>> HTTP GETting api/
>>> HTTP GETting http://cmengapps1.company.com/api/info/
>>> Using the new web API
>>> HTTP GETting http://cmengapps1.company.com/api/repositories/
>>> HTTP GETting http://cmengapps1.company.com/api/repositories/?start=25&max-results=25
>>> HTTP GETting http://cmengapps1.company.com/api/repositories/1/
>>> HTTP GETting http://cmengapps1.company.com/api/repositories/1/info/
>>> Attempting to create review request on http://svnserver.company.com/svndata/mycode-repos for None
>>> HTTP POSTing to http://cmengapps1.company.com/api/review-requests/: {'repository': u'http://svnserver.company.com/svndata/mycode-repos'}
>>> Review request created
>>> Attempting to set field 'summary' to 'test' for review request '6858'
>>> HTTP PUTting to http://cmengapps1.company.com/api/review-requests/6858/draft/: {'summary': 'test'}
>>> Uploading diff, size: 457
>>> HTTP POSTing to http://cmengapps1.company.com/api/review-requests/6858/diffs/: {'basedir': '/trunk/lpfc'}
>>> Got API Error 207 (HTTP code 400): The file was not found in the repository
>>> Error data: {u'stat': u'fail', u'file': u'/trunk/dir/dir2/my_python_code.py', u'err': {u'msg': u'The file was not found in the repository', u'code': 207}, u'revision': u'18948'}

Error uploading diff

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


What operating system are you using? What browser?
Ubuntu 12.04

Please provide any additional information below.

When I specified debug option on the post-review command line it looks like post-review is stepping through every repository known on the ReviewBoard server and for some reason if part of the name matches (i.e. mycode-repos) it stops and attempts to create the review in this repository rather than proceeding on to find a true match (i.e lnx-mycode-repos).  I am wodering if the first hyphen is screwing up the match.
chipx86
#1 chipx86
Is http://svnserver.company.com/svndata/ the root of a Subversion repository, or is mycode-repos and lnx-mycode-repos each two separate Subversion repositories?

If the former, then that should be the repository entry. Review Board is meant to talk to the root of a repository and not a subdirectory within it. post-review would be finding the first one because it's technically the correct repository, but isn't pointing to the root path.

When post-review is comparing repositories the way it does, it's comparing Subversion UUIDs. It sounds like both are the same.
  • +NeedInfo
#2 jol****@gmai***** (Google Code) (Is this you? Claim this profile.)
Sorry for the confusion.  After reverse engineering some of post-review script I found that one of the key pieces is the repository UUID.  After speaking with the SVN Admin, I found that he had copied a repository and gave it a new name.  This caused both repositories to have the same UUID.  I believe this is the source of our problem, not the name of the repository.  The Admin should be fixing this later in the week so I think this issue can be closed.

I apologize for the false alarm.

Thanks for your help.
david
#3 david
  • -NeedInfo
    +SetupIssue