It looks like a commit in April may have broken our usage of post- review in preferring "options.repository_url" to "self.get_configured_repository()":
https://github.com/reviewboard/rbtools/commit/885f880ea4a0042f8f54f27476487d8dbd5f2bb6 885f880e ยป jankoprowski 2011-04-03 [RBTools] Brand new Clear Case implementation We invoke post-review from the SVN post-commit hook as so: /usr/local/bin/post-review \ --debug \ --username='buildsystem' \ --server="${RB_SERVER:=http://rb.example.com/rb}" \ --repository-url="${RB_REPO_URL}" \ --revision-range="$(($2-1)):$2" \ --target-groups="${RB_TARGET_GROUPS}" \ --submit-as="${RB_AUTHOR}" \ --description="rev ${2} - ${RB_DESC}" \ --summary="rev ${2} - ${RB_SUMMARY}" \ --publish >>$LOG 2>&1 Where a typical ${RB_REPO_URL} would be "file:///data/svn/ examplerepo", but the actual repositories inside Admin -> Repositories are of the form "https://svn.example.com/examplerepo". They both point to the same actual repository, of course; the post-commit hook is executing on the server that hosts the https URL. It's clear postreview.py is looking up and finding the correct repo via UDID, but then is not using it: << >>> RBTools 0.3.3 >>> Home = /data/svn/hooks >>> svn info file:///data/svn/examplerepo >>> diff --version >>> repository info: Path: file:///data/svn/examplerepo, Base path: /, Supports >>> changesets: False >>> HTTP GETting api/ >>> HTTP GETting http://rb.example.com/rb/api/info/ >>> Using the new web API >>> svn diff --diff-cmd=diff file:///data/svn/examplerepo/@8826 >>> file:///data/svn/examplerepo/@8827 >>> HTTP GETting http://rb.example.com/rb/api/repositories/ >>> HTTP GETting >>> http://rb.example.com/rb/api/repositories/?start=25&max-results=25 >>> HTTP GETting http://rb.example.com/rb/api/repositories/1/ >>> HTTP GETting http://rb.example.com/rb/api/repositories/1/info/ >>> [elided for brevity] >>> HTTP GETting http://rb.example.com/rb/api/repositories/5/ >>> HTTP GETting http://rb.example.com/rb/api/repositories/5/info/ >>> repository info: Path: https://svn.example.com/examplerepo, Base path: /, >>> Supports changesets: False >>> Attempting to create review request on file:///data/svn/examplerepo for None >>> Submitting the review request as exampleuser >>> HTTP POSTing to http://rb.example.com/rb/api/review-requests/: >>> {'submit_as': 'exampleuser', 'repository': 'file:///data/svn/examplerepo'} >>> Got API Error 206 (HTTP code 400): The repository path specified is not in >>> the list of known repositories >>> Error data: {'stat': 'fail', 'repository': 'file:///data/svn/examplerepo', >>> 'err': {'msg': 'The repository path specified is not in the list of known >>> repositories', 'code': 206}} There was an error creating this review request. The repository path "https://svn.example.com/examplerepo" is not in the list of known repositories on the server. [...] >> We could switch our --repository-url back to the https version, but that comes with other problems for us: 1.) our https cert trust chain isn't established for "svn info", "svn diff", etc -- we can work around this via logging in once as the _www user and doing an "accept permanently" on the cert; 2.) it doesn't appear --password or --http-password get passed down to "svn info", "svn diff", etc -- aside from storing the passwords in ~/.subversion, I can't see a good way around this; 3.) it's faster to hit the local file://whatever than to hit https://whatever for info/diff; and 4.) it seems silly to go to the work of "HTTP GETting http://rb.example.com/rb/api/repositories/" if we're not going to use the results. I'm probably going to patch the RBTools egg locally to remove the use of options.repository_url inside new_review_request: repository = options.repository_url \ or self.get_configured_repository() \ or self.info.path ...back to: repository = self.get_configured_repository() \ or self.info.path Is there a more appropriate way to patch this? Should I also create a bug? -- Leander -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~----------~----~----~----~------~----~------~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en