1421: post-review doesn't gracefully handle ClearCase deployments where VOBs are mounted as subdirectories of /vobs

bryan.******@gmai***** (Google Code) (Is this you? Claim this profile.)
Sept. 26, 2010
What version are you running?

What's the URL of the page containing the problem?

What steps will reproduce the problem?
1.On a system with ClearCase and vobs mounted under / instead of /vobs 
2.run cleartool lsco -cview -me -recurse -short | xargs post-review

What is the expected output? What do you see instead?
The expected output is that it succeeds what I see is

$ cleartool lsco -cview -me -recurse -short | xargs post-review -d
--username bhalter --password 1234
>>> svn info
>>> cleartool pwv -short
>>> repository info: Path: /view/reviewboard-view, Base path:
/view/reviewboard-view, Supports changesets: False
>>> cleartool desc -pre /devvob/integration/release/buildinfo.xml
>>> cleartool desc -fmt %Vn /de/vob
Failed to execute command: ['cleartool', 'desc', '-fmt', '%Vn', '/de/vob']
cleartool: Error: Unable to access "/de/vob": No such file or directory.

What operating system are you using? What browser?

Centos 5.4
Please provide any additional information below.
#1 bryan.******@gmai***** (Google Code) (Is this you? Claim this profile.)
The attached patch fixes this type mismatch for me
  • +
    diff --git a/rbtools/postreview.py b/rbtools/postreview.py
    index c157277..b02079e 100755
    --- a/rbtools/postreview.py
    +++ b/rbtools/postreview.py
    @@ -844,8 +844,12 @@ class ClearCaseClient(SCMClient):
                         splversions.append(fname + ver[1])
                     else :
                         # Linux.
    -                    bpath = vkey[:vkey.rfind("vobs")+4]
    -                    fpath = vkey[vkey.rfind("vobs")+5:]
    +                    if vkey.rfind("vobs") != -1 :
    +                        bpath = vkey[:vkey.rfind("vobs")+4]
    +                        fpath = vkey[vkey.rfind("vobs")+5:]
    +                    else :
    +                       bpath = vkey[:0]
    +                       fpath = vkey[1:]
                         ver = fpath.split("@@")
                         splversions =  ver[0][:vkey.rfind("@@")].split("/")
                         fname = splversions.pop()
#3 chipx86
Please post patches on http://reviews.reviewboard.org/
#4 david
  • +Fixed