Topic
  • 2 replies
  • Latest Post - ‏2013-11-05T17:19:00Z by MartyBrown
MartyBrown
MartyBrown
5 Posts

Pinned topic Looking for syntax for ClearTool LOCK command

‏2013-11-04T22:26:43Z |

Hi, apologies for a newbie question.

I am trying to Lock an element within a VOB to prevent further modifications to the elements.

Have had trouble coming up with the right syntax to 'find' the proper element in the proper VOB. I can't seem to figure out how to specify the correct VOB in the pathname.

If I type this  (WINDOWS server)

cleartool lock \TrainingVOB\Student01\FORX\sql\db_links.sql

I get "ClearCase object Not found"

Easy enough, I figure.  I just need to figure out how to specify the VOB in the filespec somehow...

So, if I type this:

cleartool lock \TrainingVOB\Student01\FORX\sql\db_links.sql@vob:\TrainingVOB

I get "Filename too Long"

So, I think I'm 'close', but haven't hit on the right syntax yet.  Examples on the MAN pages for LOCK haven't showed me how to correctly specify an element's path and name (File Name) AND the VOB in one go...  Can anybody help?

I can successfully lock / unlock the whole VOB by typing this:

cleartool lock vob:\TrainingVOB

cleartool unlock vob:\TrainingVOB

Any help would be appreciated.  Thanks!

  • Dave-Robinson
    Dave-Robinson
    116 Posts
    ACCEPTED ANSWER

    Re: Looking for syntax for ClearTool LOCK command

    ‏2013-11-05T05:35:18Z  

    I wonder "where" you are doing this command,

     and how you know that  "\TrainingVOB\Student01\FORX\sql\db_links.sql" is the file.

    You need a "view context"

    And the VOB must be mounted

    But  you should already have that in order to get the path name

     

    The first syntax looks right, but if you are in C: drive, not in a view, then it is not !

    cleartool lock M:\myview\TrainingVOB\Student01\FORX\sql\db_links.sql

    or

    cleartool lock Z:\TrainingVOB\Student01\FORX\sql\db_links.sql

    or

    cd /d Z:

    cleartool lock \TrainingVOB\Student01\FORX\sql\db_links.sql

     

    or maybe you are in M: drive

    cd /d M:\myview

    cleartool lock TrainingVOB\Student01\FORX\sql\db_links.sql

     

    Note that in the last case I have dropped the leading "\"; the absolute path name in M: drive starts with \viewtag

  • Dave-Robinson
    Dave-Robinson
    116 Posts

    Re: Looking for syntax for ClearTool LOCK command

    ‏2013-11-05T05:35:18Z  

    I wonder "where" you are doing this command,

     and how you know that  "\TrainingVOB\Student01\FORX\sql\db_links.sql" is the file.

    You need a "view context"

    And the VOB must be mounted

    But  you should already have that in order to get the path name

     

    The first syntax looks right, but if you are in C: drive, not in a view, then it is not !

    cleartool lock M:\myview\TrainingVOB\Student01\FORX\sql\db_links.sql

    or

    cleartool lock Z:\TrainingVOB\Student01\FORX\sql\db_links.sql

    or

    cd /d Z:

    cleartool lock \TrainingVOB\Student01\FORX\sql\db_links.sql

     

    or maybe you are in M: drive

    cd /d M:\myview

    cleartool lock TrainingVOB\Student01\FORX\sql\db_links.sql

     

    Note that in the last case I have dropped the leading "\"; the absolute path name in M: drive starts with \viewtag

  • MartyBrown
    MartyBrown
    5 Posts

    Re: Looking for syntax for ClearTool LOCK command

    ‏2013-11-05T17:19:00Z  

    I wonder "where" you are doing this command,

     and how you know that  "\TrainingVOB\Student01\FORX\sql\db_links.sql" is the file.

    You need a "view context"

    And the VOB must be mounted

    But  you should already have that in order to get the path name

     

    The first syntax looks right, but if you are in C: drive, not in a view, then it is not !

    cleartool lock M:\myview\TrainingVOB\Student01\FORX\sql\db_links.sql

    or

    cleartool lock Z:\TrainingVOB\Student01\FORX\sql\db_links.sql

    or

    cd /d Z:

    cleartool lock \TrainingVOB\Student01\FORX\sql\db_links.sql

     

    or maybe you are in M: drive

    cd /d M:\myview

    cleartool lock TrainingVOB\Student01\FORX\sql\db_links.sql

     

    Note that in the last case I have dropped the leading "\"; the absolute path name in M: drive starts with \viewtag

    Thank You!  My flaw was that I was not in a "View Context".  I was issuing these commands from the C: Drive of the ClearCase server.  I did not realize that I needed to be executing them from within a VIEW context.

    I am now on my way.  Many Thanks!