set lock

Acquires the lock on a specified file in a stream. If you hold a lock on a file, you prevent other users from delivering changes to the file on that stream.

Usage: scm set lock [-r/--repository-uri <arg>] [-u/--username <arg> -P/--password <arg> | -u/--username <arg> --password-file <arg> | --certificate <arg> -P/--password <arg> | --smartCard -u/--username <arg> | --kerberos | --integratedWindows] [-N/--no-local-refresh] [-I/--ignore-incoming] [[-R/--remotePath] -s/--stream <arg> [-c/--component <arg>]] [--component-hierarchy] [files...]

files The list of files to lock. If you list only file names, the stream is inferred from the flow target of the repository workspace where the files are located. If you specify the --component or --stream options in the argument, you must also specify the --remotePath option.

Options:

-r, --repository-uri <arg> The URI that specifies the location of the repository.
-u, --username <arg> The user name for the repository.
-P, --password <arg> The password for the repository.
    --password-file <arg> File that contains the user's password.
    --certificate <arg> The file that contains the user's login certificate.
    --smartCard Use the connected smart card for authentication.
    --kerberos Authenticate with Windows user credentials using Kerberos/SPNeGO.
    --integratedWindows Authenticate with Windows user credentials using Integrated Windows Authentication.
-N, --no-local-refresh Does not scan the file system for new changes. This option overrides the value of the 'refresh.local.changes' preference. To see the current value of this preference, run 'lscm get preference refresh.local.changes'.
-I, --ignore-incoming Lock files even when there are incoming change sets which modify the file.
-R, --remotePath Indicates that the provided paths are the remote paths in the specified component and specified stream.
-s, --stream <arg> Specifies a stream, as indicated by the name[@repo], alias, or UUID[@repo]. If you use the --remotePath option, you must specify a stream.
-c, --component <arg> The component to select (name, alias, or UUID). Must be specified if the --remotePath option is used.
    --component-hierarchy Operate on the listed components as well their subcomponents.


Example