(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 / Argument
Description
branch
branch spec. Use 'cmhelpobjectspec' to learn how to specify this object.
repositoryname
string.
owner
user. Admits special user 'me'.
date
date. Check "date constants" for more info in this guide.
server
string.
package
boolean.
ID
integer.
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 / Argument
Description
status
string.
assignee
string.
title
string.
target
object spec: branch or changeset. Use 'cmhelpobjectspec' to learn how to specify this object.
targetid
integer.
targettype
string. Check "target types" for more info.
date
date. Check "date constants" for more info in this guide.
owner
user. Admits special user 'me'.
GUID
Global Unique Identifier. Hexadecimal id in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
ID
integer.
orderby
field 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 / Argument
Description
branch
branch spec. Use 'cmhelpobjectspec' to learn how to specify this object.
changeset
changeset id (integer).
item
string or integer.
itemid
integer.
attribute
string.
attrvalue
string.
archived
boolean.
comment
string.
date
date. Check "date constants" for more info in this guide.
GUID
Global Unique Identifier. Hexadecimal id in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
owner
user. Admits special user 'me'.
parent
revision id (integer).
returnparent
boolean.
shelve
shelve id (integer).
size
integer (in bytes).
type
string. Check "type values" for more info.
workspacecheckoutid
integer.
ID
integer.
Replication field
Check "replication related fields" below.
type values
dir
bin
txt
Replication related fields
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 / Argument
Description
owner
user. Admits special user 'me'.
date
date. Check "date constants" for more info in this guide.
attribute
string.
attrvalue
string.
comment
string.
GUID
Global Unique Identifier. Hexadecimal id in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
parent
integer.
shelveid
integer.
ID
integer.
Replication field
Check "replication related fields" below.
Replication related fields
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.)
Replication related fields
Many objects track replication data, meaning UVCS tracks where they were originally created.
The fields you can use are
Option / Argument
Description
ReplSrcServer
repspec. Stands for "replication source server". Server where the object was replicated from.
ReplSrcRepository
string. Stands for "replication source repo". It is the repository where the object was replicated from.
ReplLogId
integer. ID of the replication operation. In UVCS, each time new objects are created from a replica, a new 'replicationlog' is created.
ReplSrcDate
date. 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.
ReplSrcId
integer. It is the ID of the replication source server. You can discover this ID searching for 'replicationsource' objects with the 'cmfind' 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
(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 / Argument
Description
'today'
today's date.
'yesterday'
yesterday's date.
'thisweek'
current week's Monday date.
'thismonth'
current month's 1st day date.
'thisyear'
current year's January 1st date.
'onedayago'
one day before the current date.
'oneweekago'
seven days before the current date.
'onemonthago'
one month before the current date.
'n daysago'
'n' days before the current date.
'n monthsago'
'n' months before the current date.
'n yearsago'
'n' years before the current date.
The following 'where' clauses are valid for fields of type 'date'