Revoke locks on files in a stream.
Purpose
Release locks on one or more files
in a stream. Normally, the locks should be owned by the currently
logged-in user, but with the –force switch, admin users can release
locks held by other users.
Options and arguments
- [ -P | --password ] password for user ID in repository
- The password for the specified user ID in
the named repository. If this option is not included on the command
line, you are prompted for a password. If you specified a repository
URI or nickname for which you have stored credentials using the scm
login command, this option is ignored.
- [ -u | --username ] user ID in repository
- Specifies a user ID that exists in the named
repository. If you specified a repository URI or nickname for which
you have stored credentials using the scm login command,
this option is ignored.
- [ -r | --repository-uri ] repository URI
- Specifies the repository in which to take
this action. If you have stored repository credentials using the scm
login command, you can use the nickname you supplied for
these stored credentials
- [ -c | --component ] arg
- The component in which to release the locks. Not required for
locally loaded workspaces.
- [ -s | --stream ] arg
- The stream in which to release locks. Not required for locally
loaded workspaces.
- [ -R | --RemotePath ] arg
- Indicates that given paths are in the remote stream, rather than
the local file system. Note that paths must be relative to the root
of the component. “-c” and “-s” should be specified with this.
Examples
In a stream with the following
locks:
$ scm lock list -r m --stream JUnit --component JUnit -v
R (6729) "/JUnit/.classpath" bill (6727) "JUnit" (6725) "JUnit"
R (6730) "/JUnit/.project" bill (6727) "JUnit" (6725) "JUnit"
R (6726) "/JUnit/src/junit/awtui/AboutDialog.java" markus (6727) "JUnit" (6725) "JUnit"
R (6728) "/JUnit/src/junit/awtui/Logo.java" markus (6727) "JUnit" (6725) "JUnit"
bill
can release one of his locks:
$ scm lock release -r m --stream "JUnit" --component JUnit -R JUnit/.classpath JUnit/.project
Locks successfully released.
bill has
admin priviledges, so he can also release locks held by markus using
the force (“-f”) flag:
$ scm lock release -r m --stream "JUnit" --component JUnit -f -R JUnit/src/junit/awtui/AboutDialog.java
Locks successfully released.
The current
lock state is now:
$ scm lock list -r m --stream 6725 --component JUnit -v
R (6728) "/JUnit/src/junit/awtui/Logo.java" markus (6727) "JUnit" (6725) "JUnit"