Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
I want to lock a whole sandbox recursively by CLI.
I use the command:
si lock --gui --filter=!file:*.html -R --revision=:member --sandbox=$MKS.sb
The problem is, if a member is already locked by me I will get a window mentioning it, that I have to click to continue the process.
How can I lock and not being prompted if files are already locked by me, by CLI?
Many thanks
Solved! Go to Solution.
If I use the command on the single member like this:
'si lock --gui --revision=:member D:\MATLAB\Sandboxes\#make\AVLab_P\_AVLabdev\Session\@AVLabSession\private\class_hdr.m'
I don't get a error dialog.
It seems to be linked to the -R on the whole sandbox syntax.
With a -R on revision=:working I don't get the error dialogs.
Hello Thierry,
In general, the command:
si lock --gui --filter=!file:*.html --filter=!locked -R --revision=:member --sandbox=$MKS.sb
will lock all of the unlocked members in the sandbox without providing you with any prompts regarding any member locks, because it will not check out any members with locks on them.
I believe if you want to be prompted regarding locks from other users, the following command should work (assuming you have a user ID of tdalon😞
si lock --gui --filter=!file:*.html --filter=!locked:tdalon -R --revision=:member --sandbox=$MKS.sb
Edit: In this second case, if user jsmith has a lock on a member, you will get a notification about that member, but you will not get prompted for members you have a lock on. Essentially, this is telling the si lock to skip members you already have a lock on.
Regards,
Kael
Message was edited by: Michael Lizak Edit 2013-11-01EDT1443 Note about second option prompting if someone other than you has a lock on the file.
Unfortunately I observe something else. See error dialog:
Hi Thierry,
For the class_hdr.m file mentioned in your screenshot, are there more revisions than just 1.1? If so, it looks like you already have a lock on 1.1 while the member revision is something else. In your sample command you specify "member" as the revision you want to lock, so I would guess that you actually want to remove that lock first and then get a lock on whatever the member revision happens to be.
Hi Joseph
no I only have a 1.1 revision.
Maybe there is a bug if I use the --revision:member flag and I shall remove it.
According to CLI Docu it is the default revision used.
If I use the command on the single member like this:
'si lock --gui --revision=:member D:\MATLAB\Sandboxes\#make\AVLab_P\_AVLabdev\Session\@AVLabSession\private\class_hdr.m'
I don't get a error dialog.
It seems to be linked to the -R on the whole sandbox syntax.
With a -R on revision=:working I don't get the error dialogs.