Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 2341 by drenna...@gmail.com: post-review doesn't handle multiple repositories based on the same vob (clearcase)
http://code.google.com/p/reviewboard/issues/detail?id=2341

What version are you running?
RBTools 0.3.4

What's the URL of the page containing the problem?
n/a

What steps will reproduce the problem?
1. Create 2 repositories A and B based on Clearcase (A followed by B). Where A and B are based on the same vob however due to the project configuration (Clearcase UCM) A and B are comprised of different components found in the same vob.
2. Perform a post-review where the code is only accessible via B.
post-review --revision-range=..etc.. ----server=..etc..

What is the expected output? What do you see instead?
I expected success, however what I got was..

Got API Error 207 (HTTP code 400): The file was not found in the repository Error data: {'stat': 'fail', 'file': '/view/..etc..@@/main/blah/1', 'err': {'msg': 'The file was not found in the repository', 'code': 207}, 'revision': '/main/blah/1'

What operating system are you using? What browser?
CentOS 5

Please provide any additional information below.
What I found is the code is picking the repository based on the vob uuid. So in my case both repositories are a match base on vob uuid, so that's not enough. It picked the first matching repository (A) when in fact B was the one I needed to use.

I worked around this by introducing a --repository-name option which takes the repository name as listed in the reviewboard ui.


--- a/postreview.py
+++ b/postreview.py
@@ -296,6 +296,10 @@ class ClearCaseRepositoryInfo(RepositoryInfo):
             if not info or uuid != info['uuid']:
                 continue

+            if options.repository_name and \
+               options.repository_name != repository['name']:
+                continue
+
             debug('Matching repository uuid:%s with path:%s' %(uuid,
                   info['repopath']))
             return ClearCaseRepositoryInfo(info['repopath'],
@@ -3834,6 +3838,9 @@ def parse_options(args):
"paths outside the view). For git, this specifies"
                            "the origin url of the current repository, "
"overriding the origin url supplied by the git client.")
+    parser.add_option("--repository-name",
+                      dest="repository_name", default=None,
+ help="the name for a repository for creating a diff ")
     parser.add_option("-d", "--debug",
                       action="store_true", dest="debug", default=DEBUG,
                       help="display debug output")


--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.

Reply via email to