文档

​
​

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
      • 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)

LOG

View logs with the Unity Version Control CLI.
阅读时间4 分钟
最后更新于 10 个月前

Description

Gets info about revisions in changesets.

Usage

cm log [<csetspec> | <repspec>] [--from=<csetspec_from>] [--allbranches] [--ancestors] [--csformat=<str_format>] [--itemformat=<str_format>] [--dateformat=<str_date_format>] [--xml[=<output_file>]] [--encoding=<name>] [--repositorypaths | --fullpaths | --fp]

Options

Option / Argument

Description

--from
Lists all the changes made in every changeset from the changeset specification
[csetspec_from]
to the changeset specification
[csetspec]
. The
[csetspec_from]
changeset is not included in the output. Ignored when a repository spec is provided.
--allbranches
Shows information about the changesets created in a specified interval, for all the branches where those changesets were created.
--ancestors
Shows information about the reachable changesets by following the parent and merge links for the given changeset (
[csetspec]
). If the from changeset (
[csetspec_from]
) is provided too, it will be used as lower limit for all the paths. Remarks: The changeset changes will not be shown when this option is used.
--csformat
Retrieves the changeset info in a specific format. See Remarks for more info. This option cannot be combined with
--xml
.
--itemformat
Retrieves the item info in a specific format. See Remarks for more info. This option cannot be combined with
--xml
.
--dateformat
Sets the output format to print dates.
--xml
Prints the output in XML format to the standard output. It is possible to specify an output file. This option cannot be combined with
--csformat
and
--itemformat
.
--encoding
Used with the
--xml
option, specifies the encoding to use in the XML output, i.e.: utf-8. See the MSDN documentation at http://msdn.microsoft.com/en-us/library/system.text.encoding.aspx to get the table of supported encodings and its format, (at the end of the page, in the "Name" column).
--fullpaths, --fp
Force printing full workspace paths for files and directories when possible.
--repositorypaths
Prints repository paths (server paths) instead of workspace paths. (This option overrides the
--fullpaths
option).
csetspec
Returns all changes made in the specified changeset. (Use
cm help objectspec
to learn more about changeset specs.)
repspec
Returns all changes made in the specified repository. (Use
cm help objectspec
to learn more about repository specs.)

Help

Remarks

  • If neither 'csetspec' nor option is specified, the command shows information about every changeset created within the last month in every branch.
  • If only the option
    --from
    is included, the command shows the information about every changeset from that specified changeset to the last changeset in the branch where the changeset was created.
  • If the option
    --allbranches
    appears without an interval, the command retrieves the same information as it would do if only 'csetspec' was specified.
  • If the
    --from
    is used, the output contains information from the 'csetspec_from'+1 on.
  • The repository used to show the changeset information is the one loaded in the path where the command executes on.
This command accepts a format string for the items (
--itemformat
) and a format string for the changesets (
--csformat
).

The output parameters of
--csformat
are the following

Option / Argument

Description

{tab}
Inserts a tab space.
{newline}
Inserts a new line.
{changesetid}
Changeset number.
{branch}
Branch where the changeset was created.
{date}
Date of the changeset.
{owner}
Owner of the changeset.
{comment}
Comment of the changeset.
{items}
Items involved in the changeset.
{repository}
Repository where the changeset exists.
{repserver}
Server name.

The output parameters of
--itemformat
are the following

Option / Argument

Description

{tab}
Inserts a tab space.
{newline}
Inserts a new line.
{path}
Item path.
{branch}
Branch where the changeset was created.
{date}
Date of the changeset.
{owner}
Owner of the changeset.
{shortstatus}
Prints the short format for the status. See below.
{fullstatus}
Prints the long format for the status. See below.
Short format and its corresponding long format

Option / Argument

Description

A
Added
D
Deleted
M
Moved
C
Changed

These are valid output strings

  • --csformat="{newline} Changeset {changesetid} created on {date}; {tab} changed items: {items}."
  • --itemformat="{newline} The item {path} was changed in the branch {branch}."

Date format parameters (
--dateformat
)

To specify the output format in which dates will be printed. See the supported formats specified at:
https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings

Examples

cm log
(Shows information about every changeset created in the last month in every branch.)
cm log cs:16
(Shows information about the changes done in the changeset 16 in the branch where the changeset was created.)
cm log cs:16 --csformat="{newline}Changeset {changesetid} created on {date};{tab} changed items: {items}."
(Shows the information in the specified format.)
cm log --from=cs:20 cs:50
(Shows the information about every revision contained in every changeset from the changeset 21 to the changeset 50.)
cm log --from=cs:20 cs:50 --allbranches
(Shows the information about every revision contained in every changeset from the changeset 21 to the changeset 50 in every branch of the repository.)
cm log rep:myrep@localhost:8084
(Shows information about the changes done in the specified repository. No workspace is required to run the command.)
cm log --from=cs:20@rep:mainRep@localhost:8084
(Shows the information about every revision contained in every changeset from the changeset 21. No workspace is required to run the command, because the full changeset spec was specified.)

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

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

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

  • 在本页上
    • Description

      • Usage

      • Options

    • Help

      • Remarks

        • The output parameters of --csformat are the following

        • The output parameters of --itemformat are the following

          • Short format and its corresponding long format

        • These are valid output strings

        • Date format parameters (--dateformat)

      • Examples


报告此页面的问题