SHOW FIND OBJECTS

Description

Lists objects and attributes.

Usage

cm showfindobjects <object>

Options

Option / ArgumentDescription
objectCheck remarks for available objects and attributes.

Help

Remarks

Available objects and attributes

  • attribute.
  • attributetype.
  • branch.
  • changeset.
  • label.
  • merge.
  • replicationlog.
  • review.
  • revision.
  • shelve.

attribute

You can find attributes by filtering using the following fields

Option / ArgumentDescription
typestring.
valuestring.
datedate. Check "date constants" for more info in this guide.
owneruser. Admits special user 'me'.
GUIDGlobal Unique Identifier. Hexadecimal id in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. comment string.
srcobjobject spec: item path, branch, changeset, revision, or label. Use 'cm help objectspec' to learn how to specify these objects.
IDinteger.

Examples

cm find attribute "where type = 'status'"

(Finds all attributes of type 'status'.)

cm find attribute "where date > 'this week'"

(Finds all attributes applied during the current week.)

cm find attribute "where value = 'resolved' and owner = 'me'"

(Finds all attributes with value 'resolved' applied by me.)

cm find attribute "where srcobj = 'item:readme.txt'"

(Finds the attributes applied to the item 'readme.txt'.)

cm find attribute "where srcobj = 'br:/main/scm23343'"

(Finds the attributes applied to the branch scm23343.)

cm find attribute "where srcobj = 'rev:readme.txt#br:/main/task002'"

(Finds the attributes applied to the specified revision.)

cm find attribute "where srcobj = 'rev:revid:1126'"

(Finds the attributes applied to the specified revision id.)

attributetype

You can find attribute types by filtering using the following fields

Option / ArgumentDescription
namestring.
valuestring.
datedate. Check "date constants" for more info in this guide.
owneruser. Admits special user 'me'.
GUIDGlobal Unique Identifier. Hexadecimal id in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
commentstring.
sourceobject spec: item path, branch, changeset or label. Use 'cm help objectspec' to learn how to specify these objects.
IDinteger.
Replication fieldCheck "replication related fields" below.
  • ReplLogId
  • ReplSrcDate
  • ReplSrcId
  • ReplSrcRepository
  • ReplSrcServer

Examples

cm find attributetype "where name like 'st%'"

(Finds all attribute where name starts with 'st'.)

cm find attribute "where date > 'today'"

(Finds all attributes applied today.)

cm find attributetype "where comment != ''" --xml

(Finds all attribute types that have a comment and prints the output in XML format to the standard output.)

cm find attributetype "where source = 'item:readme.txt'"

(Finds all attribute types in item 'readme.txt'.)

cm find attributetype "where source = 'cs:30'"

(Finds all attribute types in changeset '30'.)

cm find attributetype "where source = 'lb:v0.14.1'"

(Finds all attribute types in label 'v0.14.1'.)

branch

You can find branches by filtering using the following fields

Option / ArgumentDescription
namestring.
datedate. Check "date constants" for more info in this guide.
changesetsdate (of the changesets in the branch). Check "date constants" for more info in this guide.
attributestring.
attrvaluestring.
owneruser. Admits special user 'me'.
parentbranch spec. Use 'cm help objectspec' to learn how to specify this object.
commentstring.
GUIDGlobal Unique Identifier. Hexadecimal id in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
IDinteger.
order byfield to use for sorting. Check "sorting fields" for more info.
Replication fieldsCheck "replication related fields" below.

Sorting fields

  • date
  • branchname
  • ReplLogId
  • ReplSrcDate
  • ReplSrcId
  • ReplSrcRepository
  • ReplSrcServer

Examples

cm find branch "where name like 'scm23%'"

(Finds branches which name starts with 'scm23'.)

cm find branch "where date > 'one week ago'"

(Finds branches created during the last week.)

cm find branch "where changesets >= 'today'"

(Finds branches with changesets created today.)

cm find branch "where attribute = 'status' and attrvalue = 'failed'"

(Finds branches that have the attribute 'status' and which value is 'failed'.)

cm find branch "where owner != 'me' and parent != 'br:/main'"

(Finds branches created by other than me and which parent branch is not '/main'.)

cm find branch "where id = 2029607"

(Finds the branch which id is 2029607.)

changeset

You can find changesets by filtering using the following fields

Option / ArgumentDescription
branchbranch spec. Use 'cm help objectspec' to learn how to specify this object.
changesetidinteger.
attributestring.
attrvaluestring.
datedate. Check "date constants" for more info in this guide.
owneruser. Admits special user 'me'.
GUIDGlobal Unique Identifier. Hexadecimal id in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
commentstring.
onlywithrevisionsboolean. To filter whether a cset has revisions or not.
returnparentboolean. A way to return the parent of a cset. Good for scripting.
parentchangeset id (integer).
IDinteger.
order byfield to use for sorting. Check "sorting fields" for more info.
Replication fieldsCheck "replication related fields" below.

Sorting fields

  • date
  • changesetid
  • ReplLogId
  • ReplSrcDate
  • ReplSrcId
  • ReplSrcRepository
  • ReplSrcServer

Examples

cm find changeset "where branch = '/main/scm23119'"

(Finds all changesets in branch 'scm23119'.)

cm find changeset "where attribute = 'status'"

(Finds the changesets with the attribute 'status'.)

cm find changeset "where date >= '6/8/2018' and owner != 'me'"

(Finds all changesets with creation date equal or greater than 6/8/2018 and created by others than me.)

cm find changeset "where guid = '1b30674f-14cc-4fd7-962b-676c8a6f5cb6'"

(Finds the changeset with the specified guid.)

cm find changeset "where comment = ''"

(Finds the changesets with no comments.)

cm find changeset "where onlywithrevisions = 'false'"

(Finds changesets with no revisions.)

cm find changeset "where changesetid = 29 and returnparent = 'true'"

(Finds the parent of changeset 29.)

cm find changeset "where parent = 548"

(Finds all changesets which parent is cset 548.)

label

You can find labels by filtering using the following fields

Option / ArgumentDescription
namestring.
attributestring.
attrvaluestring.
datedate. Check "date constants" for more info in this guide.
owneruser. Admits special user 'me'.
GUIDGlobal Unique Identifier. Hexadecimal id in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
branchbranch spec. Use 'cm help objectspec' to learn how to specify this object.
branchidinteger.
changesetchangeset id (integer).
commentstring.
IDinteger.
order byfield to use for sorting. Check "sorting fields" for more info.
Replication fieldsCheck "replication related fields" below.

Sorting fields

  • date
  • labelname
  • ReplLogId
  • ReplSrcDate
  • ReplSrcId
  • ReplSrcRepository
  • ReplSrcServer

Examples

cm find label "where name like '7.0.16.%'"

(Finds the labels with a name that starts with '7.0.16.'.)

cm find label "where date >= 'this month' and attribute = 'publish-status' and attrvalue != 'PUBLISHED'"

(Finds the labels created this month with an attribute 'publish-status' set to a value other than 'PUBLISHED'.)

cm find label "where branch = '/main'"

(Finds all labels applied to the main branch.)

cm find label "where changeset = 111733"

(Finds the labels applied to changeset 111733.)

merge

You can find merges by filtering using the following fields

Option / ArgumentDescription
srcbranchbranch spec. Use 'cm help objectspec' to learn how to specify this object.
srcchangesetchangeset id (integer).
dstbranchbranch spec. Use 'cm help objectspec' to learn how to specify this object.
dstchangesetchangeset id (integer).
datedate. Check "date constants" for more info in this guide.
owneruser. Admits special user 'me'.
GUIDGlobal Unique Identifier. Hexadecimal id in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
typestring. Check possible values in "Type values" below.
IDinteger.

Type values

  • merge
  • cherrypick
  • cherrypicksubstractive
  • interval
  • intervalcherrypick
  • intervalcherrypicksubstractive

Examples

cm find merge "where srcbranch = 'br:/main'"

(Finds merges from the main branch.)

cm find merge "where dstchangeset = 108261" --format="{srcbranch} {srcchangeset} {dstbranch} {dstchangeset} {owner}"

(Finds the merges to changeset 108261 and prints the formatted output showing the source (branch and cset id), the destination (branch and cset id), and the merge owner.)

cm find merge "where type = 'cherrypick' and owner = 'me'"

(Finds all my cherry picks.)

replicationlog

You can find replication log by filtering using the following fields

Option / ArgumentDescription
branchbranch spec. Use 'cm help objectspec' to learn how to specify this object.
repositorynamestring.
owneruser. Admits special user 'me'.
datedate. Check "date constants" for more info in this guide.
serverstring.
packageboolean.
IDinteger.

Examples

cm find replicationlog "where branch = '/main/gm22358'"

(Finds the replication logs of branch 'gm22358'.)

cm find replicationlog "where package = 'T' and server like '%cloud%'"

(Finds the replication logs created from package which server name contains 'cloud'.)

review

You can find code reviews by filtering using the following fields

Option / ArgumentDescription
statusstring.
assigneestring.
titlestring.
targetobject spec: branch or changeset. Use 'cm help objectspec' to learn how to specify this object.
targetidinteger.
targettypestring. Check "target types" for more info.
datedate. Check "date constants" for more info in this guide.
owneruser. Admits special user 'me'.
GUIDGlobal Unique Identifier. Hexadecimal id in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
IDinteger.
order byfield to use for sorting. Check "sorting fields" for more info.

Target types

  • branch
  • changeset

Sorting fields

  • date
  • modifieddate
  • status

Examples

cm find review "where status = 'pending' and assignee = 'me'"

(Finds all my pending reviews.)

cm find review "where target = 'br:/main/scm17932'"

(Finds the reviews related to branch 'scm17932'.)

cm find review "where targettype = 'changeset'"

(Finds the reviews which target type is changeset.)

revision

You can find revisions by filtering using the following fields

Option / ArgumentDescription
branchbranch spec. Use 'cm help objectspec' to learn how to specify this object.
changesetchangeset id (integer).
itemstring or integer.
itemidinteger.
attributestring.
attrvaluestring.
archivedboolean.
commentstring.
datedate. Check "date constants" for more info in this guide.
GUIDGlobal Unique Identifier. Hexadecimal id in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
owneruser. Admits special user 'me'.
parentrevision id (integer).
returnparentboolean.
shelveshelve id (integer).
sizeinteger (in bytes).
typestring. Check "type values" for more info.
workspacecheckoutidinteger.
IDinteger.
Replication fieldCheck "replication related fields" below.

type values

  • dir
  • bin
  • txt
  • ReplLogId
  • ReplSrcDate
  • ReplSrcId
  • ReplSrcRepository
  • ReplSrcServer

Examples

cm find revision "where changeset >= 111756"

(Finds the revisions created in changeset 111756 and later.)

cm find revision "where item = 'readme.txt' or itemid = 2250"

(Finds the revisions of item 'readme.txt' plus item id 2250.)

cm find revision "where item = 'readme.txt' or item = 2250"

(Gets the same revisions as the previous example.)

cm find revision "where attribute = 'status' and attrvalue != 'open'"

(Finds the revisions with attribute 'status' which value is other than 'open'.)

cm find revision "where archived = 'true'"

(Finds the revisions that are archived in an external storage.)

cm find revision "where type = 'txt' and size > 300000 and owner = 'me' and date >= '2 months ago'"

(Finds the text revisions created by me two months ago and with size greater than about 3MB.)

shelve

You can find shelves by filtering using the following fields

Option / ArgumentDescription
owneruser. Admits special user 'me'.
datedate. Check "date constants" for more info in this guide.
attributestring.
attrvaluestring.
commentstring.
GUIDGlobal Unique Identifier. Hexadecimal id in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
parentinteger.
shelveidinteger.
IDinteger.
Replication fieldCheck "replication related fields" below.
  • ReplLogId
  • ReplSrcDate
  • ReplSrcId
  • ReplSrcRepository
  • ReplSrcServer

Examples

cm find shelve "where owner != 'me' and date >= '1 years ago'"

(Finds the shelves created by others than me during the last year.)

cm find shelve "where shelveid = 2"

(Finds the shelve with name 2.)

cm find shelve "where id >= 3848"

(Finds the shelves which object id is greater than 3848.)

Many objects track replication data, meaning Unity VCS tracks where they were originally created.

The fields you can use are

Option / ArgumentDescription
ReplSrcServerrepspec. Stands for "replication source server". Server where the object was replicated from.
ReplSrcRepositorystring. Stands for "replication source repo". It is the repository where the object was replicated from.
ReplLogIdinteger. ID of the replication operation. In Unity VCS, each time new objects are created from a replica, a new 'replicationlog' is created.
ReplSrcDatedate. It is the date when the replica actually took place. Replicated objects will retain its original creation date, o this field is useful if you want to find objects that where replicated within a specific timeframe.
ReplSrcIdinteger. It is the ID of the replication source server. You can discover this ID searching for 'replicationsource' objects with the 'cm find' command.

Examples

cm find branch "where replsrcserver='skull.codicefactory.com:9095'"

(Finds the branches replicated from server 'skull'.)

cm find branch "where replsrcserver = 'skull.codicefactory.com:9095' and replsrcrepository = 'codice'"

(Finds the branches replicated from server 'skull' and from repository 'codice'.)

cm find revision "where repllogid = 2019974"

(Finds the revisions replicated from replica 2019974.)

cm find label "where replsrcdate >= 'one month ago' and date >= '15 days ago'"

(Finds the labels created 15 days ago and were replicated one month ago.)

cm find replicationlog "where date > 'one week ago'"

(returns the following line:)

  • 8780433 27/09/2018 8:49:38 codice@BACKYARD:8087 F mbarriosc

(Finds the replication logs created one week ago. Now, you can check that the replicated branch was created before it was replicated over:)

cm find branch "where repllogid = 8780433"

(returns the following line:)

  • 8780443 26/09/2018 12:20:55 /main/scm23078 maria codice T

cm find replicationsource

(returns the following two lines:)

  • 7860739 codice@AFRODITA:8087 d9c4372a-dc55-4fdc-ad3d-baeb2e975f27
  • 8175854 codice@BACKYARD:8087 66700d3a-036b-4b9a-a26f-adfc336b14f9

(Now, you can find the changesets replicated from codice@AFRODITA:8087:)

cm find changesets "where replsrcid = 7860739"

Date constants

You can use date formats that follow your machine localization settings. For example, if your computer displays dates in the format 'MM-dd-yyyy', you can use dates such as '12-31-2019' in your queries.

You can also use the following constants to simplify your queries

Option / ArgumentDescription
'today'today's date.
'yesterday'yesterday's date.
'this week'current week's Monday date.
'this month'current month's 1st day date.
'this year'current year's January 1st date.
'one day ago'one day before the current date.
'one week ago'seven days before the current date.
'one month ago'one month before the current date.
'n days ago''n' days before the current date.
'n months ago''n' months before the current date.
'n years ago''n' years before the current date.

The following 'where' clauses are valid for fields of type 'date'

  • '(...) where date > 'today' (...)'
  • '(...) where date < 'yesterday' (...)'
  • '(...) where date > 'this week' (...)'
  • '(...) where date > 'this month' (...)'
  • '(...) where date < 'one day ago' and date > '3 days ago' (...)'
  • '(...) where date < 'one week ago' and date > '3 weeks ago' (...)'
  • '(...) where date < 'one month ago' and date > '3 months ago' (...)'
  • '(...) where date > '1 year ago' (...)'

You can also force a specific date format on the 'cm find' command using the --dateformat flag. Check 'cm find --help' for further details.