Jump to content

Getting different output formats from cm status --selector


sturmovik

Recommended Posts

Hi Everyone,

 

I am maintaining a html server which has its code stored on Plastic. This server hosts a static code analysis tool, and I collect the current changeset information to aid in debugging when necessary.


The command is being run on a perl script:

cm status --selector $workspace_path

A server running 8.0.16.3576 (let's call it server x) returns this:

<branch>@<repo>@<repo_server> (cs:132 - head)

Another server running 8.0.16.2951 (server y) returns this:

cs:<changeset_number>@rep:<repo>@repserver:<repo_server>

We have updated both servers to 8.0.16.3799. Now, server x returns the same output, but server y returns:

cs:<changeset_number>@<repo>@<repo_server> (head)

 

What may be causing the difference? Is this something that can be configured? Can I reasonably expect the output format of this command to change on newer versions?

 

Thank you for your help in advance.

Link to comment
Share on other sites

We changed the "cm status" format some time ago. From our release notes:

[New] 8.0.16.2999
Command line client: We have introduced a new, clearer format for the console output of the status command. This change brings the CLI inline with the Pending Changes view of the GUI.
However, don't worry - you can still get the output in the legacy format, if that's your thing.

First of all, here is an example of the new output.

[image]https://farm8.staticflickr.com/7829/46270031534_7505a12f00_o_d.png[/image]

Beautiful, right? As you can see, we have a new format for the workspace status, we have made the pending merge list more prominent, and the changes lists have been updated with file sizes and last modified dates and are now organized similarity to the Pending Changes view.

We have added some new options to the command, including:
[code]
--cset revert to the original format for workspace status (equivalent to the old cm status without args)
--compact revert to the original format for the changes lists (equivalent to cm status --all/--changed/etc but using the old format)
--head shows information for the head changeset
[/code]
Please check-out the inline help "cm status --usage" or the online CLI Guide (https://www.plasticscm.com/documentation/cli/plastic-scm-version-control-cli-guide) for more information.

What's changed?

By default, all changes, controlled and local, are displayed. Since this is the default, we removed the "--all" option, but you can still use "--controlledchanged" to show only controlled changes.
The option "--nochanges" has been renamed to "--header", and outputs just the workspace status.
The option "--nostatus" has been renamed to "--noheader", and outputs just the changelists.
New option, "--head", displays the head changeset status.
The "--selector" and "--wkconfig" options have been deprecated.

In case you still need the old format, for automation purposes:

The following options can be used to generate output in the legacy format:
"--cset" outputs the workspace status.
"--compact" outputs the workspace status and changelists.
"--noheaders" can be used with "--compact" and removes the changelist group headers from the output.

Regards,

Carlos.

Link to comment
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...