One drawback: the cm.exe is slow in startup, likely because it is a .NET executable needing quite a few assemblies to load:
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.1 Tools\CorFlags.exe" "C:\Program Files\PlasticSCM5\client\cm.exe"
Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 4.7.2558.0
Copyright (c) Microsoft Corporation. All rights reserved.
Version : v4.0.30319
CLR Header: 2.5
PE : PE32
CorFlags : 0x1
ILONLY : 1
32BITREQ : 0
32BITPREF : 0
Signed : 0
Finding stuff
I get a feeling that there is quite a bit of cm functionality either undocumented, or hardly documented.
For instance, copying a title from the PlasticSCM GUI does not mean it will work as a cm command.
Despite the documentation indicating
When you run queries using comparison operators (>, <, >=, <=) from the command line, remember that the shell considers these operators as IO redirections, so you will need to enclose the queries with quotation marks: cm find "branches where owner='pablo' and changesets >= '2013/03/01'"
you have to be really careful where to put the starting double quote: it has to be after the find command:
Example 1
Title User query: find changeset where branch='/main/test/My Branch Name' on repository 'Projects@ssl://plastic.example.org:8088' (22 Items - 0 selected)
Failure "C:\Program Files\PlasticSCM5\client\cm.exe" "find changeset where branch='/main/test/My Branch Name' on repository 'Projects@ssl://plastic.example.org:8088'"
Command 'find changeset where branch='/main/test/My Branch Name' on repository 'Projects@ssl://plastic.example.org:8088'' not found. Type cm showcommands to get a command list.
Success "C:\Program Files\PlasticSCM5\client\cm.exe" find "changeset where branch='/main/test/My Branch Name' on repository 'Projects@ssl://plastic.example.org:8088'"
Example 2
Title Changesets /main/test/My Branch Name@Projects@ssl://plastic.example.org:8088 (4 Items - 1 selected)
Success "C:\Program Files\PlasticSCM5\client\cm.exe" find "Changesets where branch='/main/test/My Branch Name' on repository 'Projects@ssl://plastic.example.org:8088'"
This means that changeset can be Changesets: it is case insensitive and has multiple aliases. It looks similar to commands I used in my days of using Rational ClearCase – Wikipedia
I need to find out how to translate a non-query title into a query one. That will make it a lot easier to go from PlasticSCM GUI to the cm.
No XML documentation
The cm find command has a cool parameter --xml, which dumps the output in an XML tree.
My original goal was to see if I could turn the XML into something like Markdown or RST, using an XSLT transform like these:
Is there an XSD definition of the output format that the @plasticscm `cm –xml` produces. The root element seems to be always `PLASTICQUERY`, but https://t.co/AE0dBZOxm1 reveals no hits.
I hoped the elements were just uppercase versions of the output below, but they are not. Bummer.
–jeroen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Leave a comment