Who we are

We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

If you want to give it a try, download it from here.

We also code SemanticMerge, and the gmaster Git client.

Recent upgrades in Plastic's command line client

Friday, March 01, 2019 Jordi Mon Companys , 0 Comments

At Plastic, we strive to deliver the most bleeding edge version control technology across the multiple packages we maintain. That means anyone using Plastic in any platform with any interface will enjoy all of Plastic's goodies always.

In this post, we would like to summarize what have been the latest changes and updates to our CLI tool.

add

The add command has been improved considerably. add will now work on folders that include controlled files. So when you run the command in a file, it will add the private files only. For example:

src
├───client
│       bar.cs  private
│       foo.cs  controlled
├───common
│       roo.cs  private
└───server
    │   far.cs  controlled
    │
    └───net
           goo.cs private

Run the add command and voila:

cm add src -R
The selected items are about to be added. Please wait ...
Item c:/workspace/src/client/bar.cs was correctly added
Item c:/workspace/src/common/ was correctly added
Item c:/workspace/src/common/roo.cs was correctly added
Item c:/workspace/src/server/net/ was correctly added
Item c:/workspace/src/server/net/goo.cs was correctly added

It also works recursively. This connects with the upgrade that any command accepting -R or --recursive will now also work with -r. An example would be:

cm add -r *.cs

will recursively add all your .cs files in one go.

cm update

cm update looks much nicer now. While the operation is taking place (and remember, it's pretty damn fast) an animated progress bar will show up:

cm status has a new look

The workspace status list has been updated. It now shows the pending changes list more prominent and the changes list shows now file sizes and last modified dates. It looks more like the Pending Changes pane in general. This command now includes:

  • --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 and so on, but using the old format)

Check our CLI guide for more information about this command.

Wildcards upgrade

In this example, you can see another upgrade in action. Wildcards are now easier use. In the example above, the wildcard was used to add files recursively, even when controlled files are in the directory.

cm hist

In other news, cm hist (history command) shows a more comprehensive list of results. Repo name, server, full repo spec, tab and newline are the results that will print out when executed. It is also easier to read with natural language tags for each parameter are included side by side. Example:

Bash autocomplete!

Install bash autocomplete by running the following command:

cm autocomplete install

Then, restart your session for changes to take effect.

Now, cm will autocomplete with bash commands. So far, it'll only autocomplete command names but we will upgrade it soon with more functionality.

diff command

Finally, the diff command has enjoyed a revamp that makes it even better. A single diff command that includes filename as the last parameter will make the difference pop up. For example:

cm diff br:/main@myrepo src\common\myfile.cs

will show any differences in the file myfile.cs.

As matter of fact, you will seldomly include the complete path since the new diff command is smart! It will perform some path matching magic for you most of the times. Example:

c:\mcga>cm diff 1@test 3@test
C "src\client\foo.cs"
C "src\client\bar.cs"
C "src\common\roo.cs"
C "src\server\far.cs"
C "src\net\goo.cs"

c:\mcga>cm diff 4@test 6@test far.cs
Diff tool launched with 'src\server\far.cs'

Or:

c:\mcga>cm diff 4@test 6@test
C "src\client\dup.cs"
C "src\common\dup.cs"
C "src\server\net\dup.cs"
C "src\misc\net\dup.cs"

c:\mcga>cm diff 4@test 6@test dup.cs
Path 'dup.cs' not unique. Could refer to any of...
/src/client/dup.cs
/src/common/dup.cs
/src/misc/net/dup.cs
/src/server/net/dup.cs

c:\mcga>cm diff 4@test 6@test net\dup.cs
Path 'net\dup.cs' not unique. Could refer to any of...
/src/server/net/dup.cs
/src/misc/net/dup.cs
c:\mcga>cm diff 4@test 6@test server\net\dup.cs
Diff tool launched with 'server\net\dup.cs

CLI is in continuous improvement

Command line is always in progress in Plastic. Check the release notes to stay up to date with all the continuous improvement the teams put out monthly or event weekly.

You can always fall back to the complete CLI guide to understand how specific commands work or read the Plastic book to understand why Plastic does the things it does.

Jordi Mon Companys
I'm the Product Marketer here at Códice Software that dwell with designers and coders throwing market insight, biased opinions and funny comments at product development.
I have marketed many kinds of software products and services but I really feel more comfortable talking about Developer Tools and LangTech products.
You can reach me at es.linkedin.com/in/jordimoncompanys.

0 comentarios: