文档

Development

User Acquisition

Monetization

工业

Unity Version Control

DevOps

On-prem

Gluon

Editor plug-in

Open Unity Dashboard

Unity Version Control

此页面不支持所选语言。
​
​
Unity Version Control
  • Overview
  • Cloud Repositories organization update
  • Installation
  • Use UVCS with the Unity Editor
  • Unity Version Control plugins
  • Concepts
  • Tutorials
  • On-Prem
  • Gluon
  • CLI and shortcut references
    • Unity Version Control CLI
      • acl
      • activateuser
      • add
      • admin
      • annotate
      • api
      • applylocal
      • archive
      • attribute
      • autocomplete
      • branch
      • changelist
      • changerevisiontype
      • changeset
      • changeuserpassword
      • checkconnection
      • checkin
      • checkout
      • checkselectorsyntax
      • clone
      • codereview
      • configure
      • crypt
      • deactivateuser
      • diff
      • diffmetrics
      • fastexport
      • fastimport
      • fileinfo
      • find
      • getconfig
      • getfile
      • getrevision
      • getstatus
      • gettaskbranches
      • getworkspacefrompath
      • getworkspaceinfo
      • help
      • history
      • iostats
      • issuetracker
      • label
      • licenseinfo
      • linktask
      • list
      • listusers
      • location
      • lock
        • lock create
        • lock list
        • lock unlock
      • log
      • merge
      • move
      • objectspec
      • partial
      • patch
      • profile
      • pull
      • purge
      • push
      • query
      • remove
      • repository
      • revert
      • setowner
      • shelveset
      • show-find-objects
      • showacl
      • showcommands
      • showowner
      • showpermissions
      • support
      • switch
      • sync
      • trigger
      • tube
      • undelete
      • undo
      • undochange
      • undocheckout
      • undocheckoutunchanged
      • update
      • version
      • whoami
      • workspace
      • workspacestatus
      • xlink
    • CLI help
    • Pipe commands
    • cm find
    • Windows keyboard shortcuts
  • Release Notes
  1. Unity Version Control (previously Plastic SCM)

LOCK LIST

List locked items with the Unity Version Control CLI.
阅读时间3 分钟
最后更新于 10 个月前

Description

Shows locks on a server.

Usage

cm lock list | ls [<revspec> [ ...]] [--server=<server>] [--repository] [--onlycurrentuser] [--onlycurrentworkspace] [--ignorecase] [--anystatus] [--machinereadable [--startlineseparator=<sep>] [--endlineseparator=<sep>] [--fieldseparator=<sep>] [--smartlocks]]

Options

Option / Argument

Description

--serverRepository server specification. This option will override the default server which is retrieved from the current workspace or the client.conf file. (Use 'cm help objectspec' to learn more about server specs.)
--repositoryRepository specification. This option will only list the locks of the specified repository. (Use 'cm help objectspec' to learn more about repository specs.)
--anystatusShows locks in any status (Locked or Retained). By default, only locks in Locked status are shown.
--onlycurrentuserFilters the results showing only the locks performed by the current user.
--onlycurrentworkspaceFilters the results showing only the locks performed on the current workspace (matching them by name).
--ignorecaseIgnores casing on the paths when a serverpath spec is used. With this flag, the command will work for "/src/foo.c" even if the user writes "/sRc/fOO.c".
--machinereadableOutputs the result in an easy-to-parse format.
--startlineseparatorUsed with the '--machinereadable' flag, specifies how the lines should start.
--endlineseparatorUsed with the '--machinereadable' flag, specifies how the lines should end.
--fieldseparatorUsed with the '--machinereadable' flag, specifies how the fields should be separated.
--smartlocksUsed with the '--machinereadable' flag, shows all the smart lock fields. Otherwise, it only shows the legacy locks fields. This parameter is needed to avoid breaking compatibility with older integrations / plugins that expect the old format.
revspecIf one or more are present, this command will display one lock line for each specified revision if its associated item is locked in the server. Otherwise, this command will list all locked items in the default server (or the one set with the '--server' option). Use a whitespace to separate the rev specs when using more than one. (Use 'cm help objectspec' to learn more about rev specs.)

Help

Remarks

The command will display a list of the currently locked items in the default server. It also accepts a list of revision specifications. In this case, only the locks belonging to the selected items will be displayed. A '--server=<server>' can be used to set the default server to query.

The command shows a line for every lock in the specified server

  • Repository of the locked item.
  • Item id of the locked item.
  • GUID of the locked item (this is only printed with the --machinereadable flag).
  • Date of the lock.
  • Destination branch where the lock will be released.
  • Revision id of the item loaded in the destination branch.
  • Holder branch where the lock was performed.
  • Revision id of the item that currently holds the lock.
  • Status of the lock (Locked or Retained)
  • User name who performed the lock.
  • Workspace name where the lock was performed.
  • Path of the locked item (server path format).
For the --machinereadable without the --smartlocks option, the printed fields are:
  • GUID of the locked item.
  • User name who performed the lock.
  • Workspace name where the lock was performed.
  • Path of the locked item (server path format).

Examples

cm lock list
cm lock list --server=myserver:8084
cm lock list --repository=repo@myserver:8084 --anystatus
cm lock ls serverpath:/src/foo.c#cs:99@default@localhost:8084
cm lock list revid:3521@default itemid:2381@secondary --onlycurrentuser
cm lock ls --onlycurrentuser
cm lock ls --onlycurrentuser --onlycurrentworkspace
cm lock list --machinereadable --startlineseparator=">" --endlineseparator="<" --fieldseparator=","
cm lock list --machinereadable --smartlocks --startlineseparator=">" --endlineseparator="<" --fieldseparator=","

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。

  • 在本页上
    • Description

      • Usage

      • Options

    • Help

      • Remarks

        • The command shows a line for every lock in the specified server

      • Examples


报告此页面的问题
​
​