2927: REPOSITORY in .reviewboardrc as repository name and not url: broken for SVN and local diffs

kiw****@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
Jan. 17, 2014
What version are you running?
RBTools 0.4.3
RB 1.7.6

What's the URL of the page containing the problem?
issue in post-review

What steps will reproduce the problem?
1. create a svn repository "rep" in RB
2. set REPOSITORY=rep in .reviewboardrc in a svn checkout
3. post-review with some local diffs and REVIEWBOARD_URL already configured, from the svn checkout directory

What is the expected output? What do you see instead?
From the post-review documentation we can use REPOSITORY as a RB repository name instead of a repository url: http://www.reviewboard.org/docs/manual/dev/users/tools/post-review/#repository
So I expect post-review to find the correct RB repository and push my local diffs on RB.

Debug output:
$ post-review -d 
>>> RBTools 0.4.3
>>> Python 2.6.5 (r265:79063, Oct  1 2012, 22:04:36) 
[GCC 4.4.3]
>>> Running on Linux-3.0.0-12-generic-x86_64-with-Ubuntu-10.04-lucid
>>> Home = /home/riccardi
>>> Current Directory = /tmp/trunk
>>> Checking the repository type. Errors shown below are mostly harmless.
DEBUG:root:Checking for a Subversion repository...
DEBUG:root:Running: svn info rep
DEBUG:root:Command exited with rc 1: ['svn', 'info', 'rep']
rep:  (Not a versioned resource)

svn: A problem occurred; see other errors for details
---
DEBUG:root:Checking for a Bazaar repository...
DEBUG:root:Running: bzr info
DEBUG:root:Command exited with rc 3: ['bzr', 'info']
bzr: ERROR: Not a branch: "/tmp/trunk/".
---
DEBUG:root:Checking for a CVS repository...
DEBUG:root:Checking for a ClearCase repository...
DEBUG:root:Checking for a Git repository...
DEBUG:root:Running: git rev-parse --git-dir
DEBUG:root:Command exited with rc 128: ['git', 'rev-parse', '--git-dir']
fatal: Not a git repository (or any of the parent directories): .git
---
DEBUG:root:Checking for a Mercurial repository...
DEBUG:root:Running: hg showconfig
DEBUG:root:Running: hg root
DEBUG:root:Command exited with rc 255: ['hg', 'root']
abort: There is no Mercurial repository here (.hg not found)!
---
DEBUG:root:Checking for a Perforce repository...
DEBUG:root:Checking for a Plastic repository...
No supported repository could be accessed at the supplied url.



The issue is in client/svn.py which uses the REPOSITORY value (via the repository_url variable) as a repository url and thus ignores the local checkout, and tries to do "svn info rep".


So the feature to name the RB repository in REPOSITORY seems broken for svn.


If I don't set REPOSITORY at all, post-review scans every repository in RB to find the correct one.
I want to avoid this by somehow telling post-review the correct RB repository. What is the right way to do this?

If I set the correct url in REPOSITORY, then post-review switches in remote repository mode and I cannot push local diffs:
"The --repository-url option requires either the --revision-range option or the --diff-filename option."
Pushing already commited code do work though, although it still scans every RB repository to find the correct one.


Using REPOSITORY for two different things seems to be the real issue: we cannot distinguish between RB repository and Code Versionning repository.
david
#1 david
  • +Component-RBTools
chipx86
#2 chipx86
This is fixed in 0.5.5.
  • +Fixed
  • +chipx86
#3 kiw****@gmai***** (Google Code) (Is this you? Claim this profile.)
Thanks!