Show the locks held on a stream.
Purpose
Display each of the locks held on
a stream. The listing can be filtered by component or user, and limited
to a maximum count.
Options and arguments
- [ -s | --stream ] arg
- The stream to query for locks. May be an alias, UUID, or stream
name.
- [ -c | --component ] arg
- The component to query for locks. May be an alias, UUID, or component
name.
- [ -o | --owner ] arg
- Filter lock list by the given user. Only locks held by the specified
user will be shown.
- [ -w | --wide ]
- Indicates that the output should not be shortened.
- [ -m | --maximum ] arg
- The maximum number of lock records to display.
- [ -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.
- [ -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
- [ -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.
Output
There are five columns of output:
- Whether the path is local or remote. “R” indicates the path of
the file in the stream, “L” indicates the path to the item where it
has been loaded on disk, and “U” indicates that the path is unknown.
- The path to the item (shown with an alias or UUID).
- The user ID of the lock owner.
- The stream the lock is held in (shown with an alias or UUID).
- The component the lock is held in (shown with an alias or UUID).
You can disable the alias/UUID display with the -u and -a arguments
to the scm command.
Examples
List all locks in the JUnit stream
and JUnit component:
$ scm lock list -r m --stream JUnit --component JUnit
R (6729) ".classpath" bill (6727) "JUnit" (6725) "JUnit"
R (6730) ".project" bill (6727) "JUnit" (6725) "JUnit"
R (6726) "AboutDialog.java" markus (6727) "JUnit" (6725) "JUnit"
R (6728) "Logo.java" markus (6727) "JUnit" (6725) "JUnit"
Note: The
full path is not shown.
To show the full path, run with
-v:
$ 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"
You
can filter by lock owner:
$ scm lock list -r m --stream JUnit --component JUnit -o bill
R (6729) ".classpath" bill (6727) "JUnit" (6725) "JUnit"
R (6730) ".project" bill (6727) "JUnit" (6725) "JUnit"
$ scm lock list -r m --stream JUnit --component JUnit -o markus
R (6726) "AboutDialog.java" markus (6727) "JUnit" (6725) "JUnit"
R (6728) "Logo.java" markus (6727) "JUnit" (6725) "JUnit"