Find revisions
Find revisions with the cm find command in Unity Version Control CLI.
阅读时间1 分钟最后更新于 10 个月前
Find and filter revisions.
Filtering options
The following list displays the different filtering options () that are available to use with the command:
wherecm find revisionsarchivedattributeattrvaluebranchchangesetdateguididitemitemidlabelmarkerownerparentrepllogidreplsrcdatereplsrcidreplsrcrepositoryreplsrcserverreturnparentshelvesizetypeworkspacecheckoutid
Output options
The following list displays the different output options () available to use with the command:
--formatcm find revisionsbranchchangesetdateiditemitemidownerparentsizetype
cm find revisions
examples
cm find revisionsFind revisions made in a specific changeset
You can use a custom format, for example if you only want to find the file and folder paths of the revisions in a specific changeset:
cm find revisions "where changeset=16716" --format="{path}"d:\linked_replicated\d:\linked_replicated\01nervad:\linked_replicated\01nerva\srcd:\linked_replicated\01nerva\src\clientd:\linked_replicated\01nerva\src\client\plasticd:\linked_replicated\01nerva\src\client\plastic\libplasticTranslations.es.resxd:\linked_replicated\01nerva\src\client\plastic\libplasticTranslations.resxd:\linked_replicated\01nerva\src\client\plastic\ActionMenuManager.csTotal: 8
You can also use PowerShell or Bash to filter by folder:
-
Powershell:cm find revisions "where changeset=16716" --format="{path}" --nototal | where {$_ -match "client\\"}
-
Bash:bcm find revisions "where changeset=15430" --format="{path}" --nototal | grep client\/
Find revisions for a branch
The following example returns all the revisions for a specific changeset within a specified timespan:
cm find revisions "where branch = 'main/Fix-4.1/scm12814' and date <= '2013/05/30' and date > '2013/05/28'" --format="{date} - {path}"
You can also use PowerShell or Bash to filter the information:
- Powershell:
cm find revisions "where branch = 'main/Fix-4.1/scm12814' and date <= '2013/05/30' and date > '2013/05/28'" --format="{date} - {path}" | where {$_ -match "view\\"}
- Bash:
cm find revisions "where branch = 'main/Fix-4.1/scm12814' and date <= '2013/05/30' and date > '2013/05/28'" --format="{date} - {path}" | grep view\/`