Jump to content
wyattetal

How to get consistent changeset info from cm status

Recommended Posts

We recently discovered that the output of cm status is variable based on the state of the workspace.

This affects windows batch scripted calls that parse the output for the changeset version.

How do we call cm (or other command line tool) to get the current changeset in a consistent manner?

First format example: cm status --nochanges ==> cs:1002@<REPO>@ssl://<PLASTIC SERVER>:8088 (head)

Second Format example: cm status --nochanges /main/JIRA_TASK@<REPO>@ssl://<PLASTIC SERVER> (cs:1627 - head)

Alternatively, what windows batch script code do you recommend to extract the changset number that will work for these and any other format variations?

Thanks.

Share this post


Link to post
Share on other sites

You can use the --cset option to get the output in the original cs:X@repository@server format:

c:\mcga>cm status --cset
cs:8@rep:test@repserver:localhost:8084

 

  • Like 1

Share this post


Link to post
Share on other sites

Thanks.

Can you explain what changes result in the differing output?

In other words, what should I do to a workspace order to force the alternate formats of cm status --nochanges?

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...