Attributes
Find attributes using the cm find command in Unity Version Control CLI.
Read time 1 minuteLast updated 21 days ago
Find and filter objects by the value of object attributes.
Filtering options
The following list displays the different filtering options (wherecm find attributecommentdateguididownersrcobjtypevalue
Output options
The following list displays the different output options (--formatcm find attributecommentdateidownertypevalue
cm find attribute
examples
cm find attributeGet all attributes
To find attributes, you need the object ID. For example, you can get the ID when you query for a branch:When you have the object ID, you can get the attribute list for that ID:cm find branch "where name = 'main'" --format="{id}" --nototal3
In the previous example, the attribute name iscm find attributes "where srcobj = 3" --nototalobjid:3@repid:2@repserver:localhost:8087 -- status --> PASSED
statusPASSED- Powershell:
cm find branch "where name = 'main'" --format="{id}" --nototal |Foreach-Object { cm find attributes where srcobj= $_ --nototal}
- Bash:
for branch_id in 'cm find branch "where name = 'main'" --format="{id}" --nototal' ;do cm find attributes "where srcobj=$branch_id" --nototal; done
Get all objects with a specific attribute
Query for a specific attribute regardless of the type of object:cm find attributes "where type = 'status' and value='PASSED' and date > 'this month'"objid:253012@repid:2@repserver:localhost:8087 -- status --> PASSEDobjid:253013@repid:2@repserver:localhost:8087 -- status --> PASSEDobjid:253014@repid:2@repserver:localhost:8087 -- status --> PASSEDobjid:268518@repid:2@repserver:localhost:8087 -- status --> PASSED