cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Lock sandbox recursively by CLI without being prompted if already locked

tdalon
12-Amethyst

Lock sandbox recursively by CLI without being prompted if already locked

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

ACCEPTED SOLUTION

Accepted Solutions
tdalon
12-Amethyst
(To:tdalon)

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.

View solution in original post

5 REPLIES 5

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.


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager
tdalon
12-Amethyst
(To:KaelLizak)

Unfortunately I observe something else. See error dialog:

Lock-Error.png

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.

tdalon
12-Amethyst
(To:JoeBartlett)

Hi Joseph

no I only have a 1.1 revision.

MemberHistory.png

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.

tdalon
12-Amethyst
(To:tdalon)

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.

Announcements


Top Tags