• 
      

    Provide --repository-url to ClearCase

    Review Request #1505 — Created April 4, 2010 and submitted — Latest diff uploaded

    Information

    RBTools
    master

    Reviewers

    In my company there is some custom access to vobs in dynamic view.
    Difference is that there exist two assumptions:
    1) We want ACL i old ClearCase so we do it on filesystem layer
    2) Many users want to made their own dynamic view on unix system
    
    This two assumptions follow to non standard clearcase dynamic view paths in
    system. On filesystem looks like:
    
    /view/user1_view/vobs
    /view/user2_view/vobs
    /view/user3_view/vobs
    
    Now post review assume the path start from /vobs what is not true.
    IMHO there is unused --repository-url parameter witch is perfect in meaning
    to make customize "place of view == repository url" for clearcase.
    
    --repository-url "/view/user1_view" 
    
    will make the given as parameter path will be the prefix to /vobs. 
    There is only one change. This parameter now works with --revision-range or
    --diff-file. For clearcase they have sens also without any of this.
    
    $ post-review -n -d --server "http://localhost:10000/" --repository-url "/view/user1_view/" index.wsgi
    >>> svn info /view/user1_view/
    >>> git rev-parse --git-dir
    >>> hg root
    >>> cleartool pwv -short
    >>> repository info: Path: /view/reviewboard.diffview/vobs/, Base path: /view/reviewboard.diffview/vobs/, Supports changesets: False
    >>> cleartool desc -pre /view/user1_view/vobs/SCM_tools/scripts/ReleaseRobot/index.wsgi
    >>> cleartool desc -fmt %Vn /view/user1_view/vobs/SCM_tools
    >>> cleartool desc -fmt %Vn /view/user1_view/vobs/SCM_tools/scripts
    >>> cleartool desc -fmt %Vn /view/user1_view/vobs/SCM_tools/scripts/ReleaseRobot
    --- /view/user1_view/vobs/SCM_tools/@@/main/int_02.04_GK/2/scripts/@@/main/6/ReleaseRobot/@@/main/3/index.wsgi/@@/main/int_02.04_GK/0   2002-02-21 23:30:39.942229878 -0800
    +++ /view/user1_view/vobs/SCM_tools/scripts/ReleaseRobot/index.wsgi   2002-02-21 23:30:50.442260588 -0800
    @@ -4,6 +4,8 @@
    
     from mako.lookup import TemplateLookup
     from werkzeug import Request
    +
    +# dummy checkout
    
     def bywwlistdir(directory, config):
         """Return directory sorted by work week"""
    
    
     post-review -d --server "http://localhost:10000/" --cc-root "/view/jkoprows_ccgsys" --repository-url "/view/jkoprows_ccgsys/vobs" index.wsgi
    >>> svn info /view/jkoprows_ccgsys/vobs
    >>> git rev-parse --git-dir
    >>> hg root
    >>> cleartool pwv -short
    >>> repository info: Path: /view/jkoprows_ccgsys/vobs, Base path: /view/jkoprows_ccgsys/vobs, Supports changesets: False
    >>> cleartool desc -pre /view/jkoprows_ccgsys/vobs/SCM_tools/scripts/ReleaseRobot/index.wsgi
    >>> cleartool desc -fmt %Vn /view/jkoprows_ccgsys/vobs/SCM_tools
    >>> cleartool desc -fmt %Vn /view/jkoprows_ccgsys/vobs/SCM_tools/scripts
    >>> cleartool desc -fmt %Vn /view/jkoprows_ccgsys/vobs/SCM_tools/scripts/ReleaseRobot
    >>> Looking for 'localhost /' cookie in /user/jkoprows/.post-review-cookies.txt
    >>> Cookie file loaded, but no cookie for this server
    ==> Review Board Login Required
    Enter username and password for Review Board at http://localhost:10000/
    Username: admin
    Password:
    >>> Logging in with username "admin"
    >>> HTTP POSTing to http://localhost:10000/api/json/accounts/login/: {'username': 'admin', 'password': '**************'}
    >>> Logged in.
    >>> Attempting to create review request on /view/jkoprows_ccgsys/vobs for None
    >>> HTTP POSTing to http://localhost:10000/api/json/reviewrequests/new/: {'repository_path': '/view/jkoprows_ccgsys/vobs'}
    >>> Review request created
    >>> Attempting to set field 'description' to 'jkoprows_ccgsys
    VIEWTYPE: dynamic
    ' for review request '2'
    >>> HTTP POSTing to http://localhost:10000/api/json/reviewrequests/2/draft/set/: {'description': 'jkoprows_ccgsys\nVIEWTYPE: dynamic\n'}
    >>> Uploading diff, size: 494
    >>> HTTP POSTing to http://localhost:10000/api/json/reviewrequests/2/diff/new/: {'basedir': '/view/jkoprows_ccgsys/vobs'}
    Review request #2 posted.
    
    http://localhost:10000/r/2