Find merges
Find merges using the cm find command in Unity Version Control CLI.
阅读时间2 分钟最后更新于 10 个月前
Find, filter, and track merges.
Filtering options
The following list displays the different filtering options () that are available to use with the command:
wherecm find mergedatedstbranchdstchangesetguididownersrcbranchsrcchangesettype
Output options
The following list displays the different output options () available to use with the command:
--formatcm find mergedatedstbranchdstchangesetidownersrcbranchsrcchangesettype
cm find merge examples
Track merges from and to a specific branch or changeset. The command returns all types of merges: regular merges, cherrypicked merges, and subtractive merges.
find mergeFind where a branch has been integrated
cm find merge "where srcbranch ='main/Fix-4.1/SCM11769'"br:/main/Fix-4.1/SCM11769@55613 -->br:/main/Fix-4.1/Release-4.1.10.447@55808Total: 1
Find branches integrated on a specific release
Find which branches are integrated in a specific branch:
$ cm find merge "where dstbranch ='main/Fix-4.1/Release-4.1.10.447'"br:/main/Fix-4.1/SCM12835@55568 -->br:/main/Fix-4.1/Release-4.1.10.447@55801br:/main/Fix-4.1/scm11898@55647 -->br:/main/Fix-4.1/Release-4.1.10.447@55802br:/main/Fix-4.1/scm12839@55678 -->br:/main/Fix-4.1/Release-4.1.10.447@55803br:/main/Fix-4.1/SCM11769@55613 -->br:/main/Fix-4.1/Release-4.1.10.447@55808br:/main/Fix-4.1/SCM12860@55735 -->br:/main/Fix-4.1/Release-4.1.10.447@55809
Customise the output to show only the branch name:
$ cm find merge "where dstbranch ='main/Fix-4.1/Release-4.1.10.447'" --format="{srcbranch}" --nototalbr:/main/Fix-4.1/SCM12835br:/main/Fix-4.1/scm11898br:/main/Fix-4.1/scm12839br:/main/scm12419br:/main/SCM4052br:/main/Fix-4.1/SCM11769br:/main/Fix-4.1/SCM12860
Customise the output so that it returns the source branch, destination branch, and the type of merge:
cm find merges "where dstbranch='br:/main/ReleaseBL274'" --format="{srcbranch}@{srcchangeset} --> {dstbranch}@{dstchangeset}({type})" --nototalbr:/main/scm11148@43953 --> br:/main/ReleaseBL274@44094 (merge)br:/main/scm11181@43969 --> br:/main/ReleaseBL274@44096 (merge)br:/main/Fix-4.0/SCM11101@44010 --> br:/main/ReleaseBL274@44030 (merge)br:/main/scm11135@43980 --> br:/main/ReleaseBL274@44031 (merge)br:/main/ReleaseBL272@43914 --> br:/main/ReleaseBL274@44032 (cherrypick)br:/main/ReleaseBL268@43663 --> br:/main/ReleaseBL274@44033 (cherrypick)br:/main/scm10957@43952 --> br:/main/ReleaseBL274@44093 (merge)br:/main/SCM11195@43981 --> br:/main/ReleaseBL274@44095 (merge)br:/main/SCM10924@43942 --> br:/main/ReleaseBL274@44033 (merge)
Find interval merges to a given branch:
cm find merges "where dstbranch='br:/main/Fix-4.1/ReleaseBL285' and type='intervalcherrypick'" --format="({basebranch}@{basechangeset}, {srcbranch}@{srcchangeset}) --> {dstbranch}@{dstchangeset}" --nototal(br:/main@44448, br:/main/scm11318@44461) --> br:/main/Fix-4.1/ReleaseBL285@44463