vesk0 Posted March 27, 2013 Report Share Posted March 27, 2013 Hi, We need to export changesets view from one changeset ID to another. The business case is as follows: 1. We made successful build in one of branches. 2. We set attribute named "Last_Successeful_Build_Changeset_ID" in this branch. 3. On the next build for that branch we need to read value from that attribute and use cm to export changesets view (as shown in UI) in CSV file on specified by us location and filename. For now we've managed to set attribute value for specified branch (for example '\main\branch1' Please help: 1. We need cm command to read value of that attribute (by type) for specified branch. For example something like: find attribute where type = 'Last_Successeful_Build_Changeset_ID' and branch = '\main\branch1' 2. We need functionality to export changesets view for specified branch with parameters from changeset id and to changeset id. Best Regards, Vesselin Pavlov Link to comment Share on other sites More sharing options...
manu Posted March 27, 2013 Report Share Posted March 27, 2013 Hi Vesselin, We need to export changesets view from one changeset ID to another. I'm not sure if I'm able to understand that one But let me throw you some commands that, maybe, you will find useful. 1) Get the last successful build changeset in a branch. We need the branch id. > cm find branch where name='main' --format={id} --nototal 3 Now whe need the value of the attribute: > cm find attribute where type='Last_Successeful_Build_Changeset_ID' and srcobj=3 --format={value} --nototal 142 So, we know that the cset number 142 is the last successful build. 2) Export changeset info C:\tmp\defa>cm find changeset where branch='main' --nototal --format="{id},{date},{owner}" 5,29/03/2013 12:47:51,all 18,27/03/2013 13:39:59,tester 26,27/03/2013 17:13:09,mlucio 31,27/03/2013 17:13:15,mlucio 36,27/03/2013 17:13:21,mlucio 41,27/03/2013 17:13:26,mlucio You can use the following fields for the changeset object: BRANCH attribute attrvalue changesets comment date guid id item name owner parent repllogid replsrcdate replsrcid replsrcrepository replsrcserver Link to comment Share on other sites More sharing options...
vesk0 Posted March 28, 2013 Author Report Share Posted March 28, 2013 Hi, With "We need to export changesets view from one changeset ID to another." I mean: 1. We make build and last changeset id for that build is for example 31 (as shown in your post). 2. After few days we make another build and then last changeset id is 41. So in second build we want to make csv with changeset data for changesets with ID greater than 31. In this case changesets 36 and 41.I think that to query (as you show it) C:\tmp\defa>cm find changeset where branch='main' --nototal --format="{id},{date},{owner}" must be added only where clause for changeset id > 31 As you may notice we want to use Plastic SCM to build our technical release info document. However your reply is very useful for us and I thank you for your quick response and good solution. Regards! Link to comment Share on other sites More sharing options...
manu Posted April 2, 2013 Report Share Posted April 2, 2013 In that case you can issue the following: cm find "changeset where branch='main' and changesetid>51" --nototal --format="{id},{date},{owner}" Tell me if it fits on your needs. Link to comment Share on other sites More sharing options...
immitev Posted January 28, 2014 Report Share Posted January 28, 2014 Hi, In build 5.0.44.519 - Leeds the query "changesetid > N" no longer seems to work. And it's pretty strange, since the query with equality (i.e. "changesetid = N") works fine. Is it a known issue? Any workarounds or fixes? Link to comment Share on other sites More sharing options...
immitev Posted January 28, 2014 Report Share Posted January 28, 2014 FYI, the operator ">" doesn't work also in branches. E.g. the query "cm find branch where id > 1" returns no results, while the equality operator works. Link to comment Share on other sites More sharing options...
immitev Posted January 29, 2014 Report Share Posted January 29, 2014 Sorry, my bad. As advised, when I enclose the query in quotes, it works fine since '>' is not treated as a pipeline instruction. Link to comment Share on other sites More sharing options...
manu Posted January 29, 2014 Report Share Posted January 29, 2014 No problem! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.