Plastic SCM CLI guide


Introduction

Plastic SCM is a visual version control system, but it is also meant to be used from the command line.

This guide walks you step by step through common command line interface (CLI) scenarios to help you get familiar with Plastic.

Remember you can always get more info about the commands using cm help command_name.


Create a new workspace

To create a new workspace all you need to do is to use the cm mkwk command. mkwk stands for make workspace and it is inspired in the good-ol ClearCase commands.

>cm mkwk quakewk quake_path --repository=quake@localhost:6060 Workspace quakewk has been correctly created

Then I go to the new created directory:

>cd quake_path >cm status --wkconfig cs:0@rep:quake@repserver:localhost:6060 Branch /main@quake@localhost:6060

Which means I'm still on changeset 0 because I didn't run an update yet. By default the workspace is configured to use the branch main.

I can update to latest simply typing:

> cm update .

The command then will start dumping all the info about the files being copied until I am up-to-date with latest.

>cm status --wkconfig cs:573@rep:quake@repserver:localhost:6060 Branch /main@quake@localhost:6060

Now I am on the latest changeset: 573 in my case.


Create a new branch and switch to it

Creating a new branch is just a matter of running the cm mkbr command:

> cm mkbr main/fix-1342

Note that I just created the new branch, but I didn't switch to it yet, as cm status shows:

>cm status --wkconfig cs:573@rep:quake@repserver:localhost:6060 Branch /main@quake@localhost:6060

Since I didn't specify a starting point, the new branch simply starts from the current latest changeset on the parent branch, in my case cset 573 at main. I can use the --changeset and --label modifiers to specify a given changeset or label to start my branch from.

Now I'm going to switch the workspace to the branch simply using the switch command:

> cm switch main/fix-1342 Performing switch operation... Searching for changed items in the workspace... Setting the new selector... Plastic is updating your workspace. Wait a moment, please... The workspace c:\Users\pablo\wkspaces\quake_path is up-to-date (cset:573@quake@localhost:6060)

The new branch is still empty so Plastic actually didn't update anything on the workspace to do the switch because at this point fix-1342 points to the same cset 573.


Do some changes - edit - checkin workflow

I'm going to edit a file in my workspace and then I'll find for changes to locate it:

>vim code\client\FileSystem-renamed.cs >cm status --all cs:573@rep:quake@repserver:localhost:6060 Modified items (CH = changed, CO = checkout, CP = copied (new), RP = replaced) CH code\client\FileSystem-renamed.cs

status --all shows not only the wk configuration (as I showed before) but also the files changed, checked-out, moved, deleted and so on.

Now I'm going to move FileSystem-renamed.cs to a new location:

>move code\client\FileSystem-renamed.cs code\botlib\FileSystem.cs 1 file(s) moved.

And I run status to find the moved file:

>cm status --all cs:573@rep:quake@repserver:localhost:6060 Moved items (MV = moved, LM = locally moved) LM 99% code\client\FileSystem-renamed.cs -> code\botlib\FileSystem.cs

Where LM stands for locally moved, which means I moved the file outside the Plastic control but it is able to find the moved file because it is still 99% similar to the previous version.

Then I can checkin my change easily:

>cm ci --all The selected items are about to be checked in. Please wait ... Assembling checkin data Validating checkin data Uploading file data Uploaded 0 bytes of 2.77 KB (0%) Confirming checkin operation Modified c:\Users\pablo\wkspaces\quake_path\code\client Modified c:\Users\pablo\wkspaces\quake_path\code\botlib Modified and moved from c:\Users\pablo\wkspaces\quake_path\code\client\FileSystem-renamed.cs to c:\Users\pablo\wkspaces\quake_path\code\botlib\FileSystem.cs Created changeset cs:575@br:/main/fix-1342@quake@localhost:6060 (mount:'/')

With ci --all I'm basically telling Plastic: detect everything that changed and perform a checkin. And all means: changed files, new files, deleted and moved.

Note: Please note that I followed a very simple workflow: I just edited the file and then run a checkin. This is the typical edit-checkin workflow made popular by version controls like SVN and Git.

Plastic SCM also supports the checkout-edit-checkin workflow.


Check the history with log and diff

The cm log command shows the changes made on a given cset or in a specific cset range:

>cm log cs:575 Changeset number: 575 Branch: /main/fix-1342 Owner: pablo Date: 7/18/2015 19:41:29 Comment: Changes: C code\botlib\FileSystem.cs M code\botlib\FileSystem.cs

Here you see how it shows how in the last changeset I checked in I modified and moved the file FileSystem.cs.

The command cm diff does something similar but it is always limited to a given cset:

>cm diff cs:575 C "code\botlib\FileSystem.cs" M "code\client\FileSystem-renamed.cs" "code\botlib\FileSystem.cs"

Clean up all changes in the workspace

After working for a while trying some experimental changes I decide to throw my pending changes off and restart from scratch. How I do that?

Check my current status now:

>cm status --all cs:575@rep:quake@repserver:localhost:6060 Modified items (CH = changed, CO = checkout, CP = copied (new), RP = replaced) CH code\bsp-renamed.c CH code\cgame\cg_drawtools.c CH libs\cmdlib.h CH libs\str.h

All I want is to undo all changes. In order to do that I simply run the unco command:

>cm unco --all c:\Users\pablo\wkspaces\quake_path\libs\str.h unchecked out correctly c:\Users\pablo\wkspaces\quake_path\libs\cmdlib.h unchecked out correctly c:\Users\pablo\wkspaces\quake_path\libs unchecked out correctly c:\Users\pablo\wkspaces\quake_path\code\cgame\cg_drawtools.c unchecked out correctly c:\Users\pablo\wkspaces\quake_path\code\cgame unchecked out correctly c:\Users\pablo\wkspaces\quake_path\code\bsp-renamed.c unchecked out correctly c:\Users\pablo\wkspaces\quake_path\code unchecked out correctly c:\Users\pablo\wkspaces\quake_path unchecked out correctly

And now status is:

>cm status --all cs:575@rep:quake@repserver:localhost:6060

Which means I'm clean.

Two remarks:

  1. The output of the unco command shows not only the files but also the directories that where undone. We just keep this for the sake of completeness at this point.
  2. I used the --all modifier which means: undo all changes whether they're real "checkouts" or simply changed files. In Plastic a "changed file" and a "checkedout file" are slightly different and some commands reflect it.

Undo a single change

What if you just want to undo a single changed file?

I modified a couple of files:

>cm status --all cs:575@rep:quake@repserver:localhost:6060 Modified items (CH = changed, CO = checkout, CP = copied (new), RP = replaced) CH code\cgame\cg_ents.c CH code\cgame\cg_main.c

But I only want to undo the changes to cg_main.c. I'll run the following command:

>cm unco code\cgame\cg_main.c --all c:\Users\pablo\wkspaces\quake_path\code\cgame\cg_main.c unchecked out correctly >cm status --all cs:575@rep:quake@repserver:localhost:6060 Modified items (CH = changed, CO = checkout, CP = copied (new), RP = replaced) CH code\cgame\cg_ents.c

Note that I added the --all modifier again in order to make the unco command work with modified and not checkedout files.


Undo changes filtering by path

Now suppose I just need to undo a few changes under certain paths:

>cm status --all cs:575@rep:quake@repserver:localhost:6060 Modified items (CH = changed, CO = checkout, CP = copied (new), RP = replaced) CH code\botlib\be_aas_cluster.c CH code\cgame\cg_ents.c CH code\cgame\cg_localents.c CH code\renderer\tr_cmds.c CH merge\Socket.cs

I just want to undo che changes under code but leave the one under merge:

>cm unco code\* --all c:\Users\pablo\wkspaces\quake_path\code\renderer\tr_cmds.c unchecked out correctly c:\Users\pablo\wkspaces\quake_path\code\renderer unchecked out correctly c:\Users\pablo\wkspaces\quake_path\code\cgame\cg_localents.c unchecked out correctly c:\Users\pablo\wkspaces\quake_path\code\cgame\cg_ents.c unchecked out correctly c:\Users\pablo\wkspaces\quake_path\code\cgame unchecked out correctly c:\Users\pablo\wkspaces\quake_path\code\botlib\be_aas_cluster.c unchecked out correctly c:\Users\pablo\wkspaces\quake_path\code\botlib unchecked out correctly

And now the status is as expected:

>cm status --all cs:575@rep:quake@repserver:localhost:6060 Modified items (CH = changed, CO = checkout, CP = copied (new), RP = replaced) CH merge\Socket.cs

Checkin changes inside a given path

Now suppose I want to checkin only certain files on a given path. I have a number of modified files as follows:

>cm status --all cs:575@rep:quake@repserver:localhost:6060 Modified items (CH = changed, CO = checkout, CP = copied (new), RP = replaced) CH merge\Socket.cs CH q3radiant\alpha\osf\tst\sort.sbk CH q3radiant\alpha\osf\tst\spill.2bk CH q3radiant\alpha\osf\tst\spill.sbk CH q3radiant\alpha\osf\tst\stdarg.1bk CH q3radiant\alpha\osf\tst\stdarg.2bk CH q3radiant\alpha\osf\tst\stdarg.sbk

But I only want to checkin the ones inside q3radiant\alpha, so I run the checkin command as follows:

>cm ci q3radiant\alpha\* -c "osf files checked in" --all The selected items are about to be checked in. Please wait ... Assembling checkin data Validating checkin data Uploading file data Uploaded 0 bytes of 14.53 KB (0%) Uploaded 0 bytes of 14.53 KB (0%) Uploaded 0 bytes of 14.53 KB (0%) Uploaded 0 bytes of 14.53 KB (0%) Uploaded 0 bytes of 14.53 KB (0%) Uploaded 0 bytes of 14.53 KB (0%) Confirming checkin operation Modified c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\sort.sbk Modified c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\spill.2bk Modified c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\spill.sbk Modified c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\stdarg.1bk Modified c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\stdarg.2bk Modified c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\stdarg.sbk Created changeset cs:576@br:/main/fix-1342@quake@localhost:6060 (mount:'/')

Changed vs checkedout

In Plastic SCM files can be simply changed or they can be checked out. Hence you can follow two workflows: edit-checkin or checkout-edit-checkin.

Checking out a file just means telling Plastic "hey, I'm going to modify the file" so it adds the file to an internal list of checked out files.

There are 3 main reasons to work with checkouts:

  1. You're used to work this way because you come from Perforce (p4 edit) or ClearCase (checkout). If you work this way chances are that you also like setting all your files as read-only in your workspace as some sort of "protection" so that the filesystem will warn you if you modify a file prior to check it out.

    Set files as readonly

  2. If you need to work with exclusive-checkouts (locks) then you need to checkout the file first. Check more about locks here.
  3. If you're working on a huge codebase (>500k files) then you might like to use checkouts to speed up all operations. A cm status --all walks through your workspace looking for changes. If you use checkouts then the status just list the files in the checkout list, no disk access is required.

Checkout-edit-checkin workflow

Working in checkout-edit-checkin fashion is quite simple: all you have to do is to run a cm co command prior to edit any file.

>cm co q3radiant\Bmp.cpp The selected items are about to be checked out. Please wait ... Item q3radiant\Bmp.cpp was correctly checked out >cm status --all cs:576@rep:quake@repserver:localhost:6060 Modified items (CH = changed, CO = checkout, CP = copied (new), RP = replaced) CH merge\Socket.cs CO q3radiant\Bmp.cpp

Now you can see how Bmp.cpp is marked as checked-out instead of just changed.

Files moved using the cm mv command are another form of checkouts as you can see in the following example:

>cm mv common\aselib.c q3asm common\aselib.c has been moved to q3asm >cm status --all cs:576@rep:quake@repserver:localhost:6060 Modified items (CH = changed, CO = checkout, CP = copied (new), RP = replaced) CH merge\Socket.cs CO q3radiant\Bmp.cpp Moved items (MV = moved, LM = locally moved) MV 100% common\aselib.c -> q3asm\aselib.c

You see how aselib.c is not "locally moved" but simply moved.

I can checkin the two files as follows:

>cm ci -c "changed bmp and moved aselib" The selected items are about to be checked in. Please wait ... Assembling checkin data Validating checkin data Uploading file data Uploaded 0 bytes of 9.26 KB (0%) Confirming checkin operation Modified c:\Users\pablo\wkspaces\quake_path\q3radiant\Bmp.cpp Modified c:\Users\pablo\wkspaces\quake_path\common Modified c:\Users\pablo\wkspaces\quake_path\q3asm Move from c:\Users\pablo\wkspaces\quake_path\common\aselib.c to c:\Users\pablo\wkspaces\quake_path\q3asm\aselib.c Created changeset cs:577@br:/main/fix-1342@quake@localhost:6060 (mount:'/')

Since I didn't specify the --all modifier in the checkin, the Socket.cs file is still a pending change, but the checkedout files were checkedin:

>cm status --all cs:577@rep:quake@repserver:localhost:6060 Modified items (CH = changed, CO = checkout, CP = copied (new), RP = replaced) CH merge\Socket.cs

Merging

Merging from CLI is quite easy, all you have to do is run the cm merge command.

So far I was doing all the changes in the main/fix-1342 branch, so I'll switch to main to merge my changes. My situation as this point is as follows:

Status prior to cli merge

Then I'll switch to main:

>cm switch main Performing switch operation... Searching for changed items in the workspace... Cannot perform the switch to branch/label/changeset since there are pending changes. Please review the pending changes and retry the operation again.

Ok, I can't switch yet because I left my Socket.cs behind... I'll undo the change first and try to switch again:

>cm unco merge\Socket.cs --all c:\Users\pablo\wkspaces\quake_path\merge\Socket.cs unchecked out correctly >cm switch main Performing switch operation... Searching for changed items in the workspace... Setting the new selector... Plastic is updating your workspace. Wait a moment, please... Downloading block of 8 files (26.57 KB) Copied c:\Users\pablo\wkspaces\quake_path\q3radiant\Bmp.cpp Copied c:\Users\pablo\wkspaces\quake_path\code\client\FileSystem-renamed.cs Copied c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\sort.sbk Copied c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\spill.2bk Copied c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\spill.sbk Copied c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\stdarg.1bk Copied c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\stdarg.2bk Copied c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\stdarg.sbk

All the files that I changed on the branch are now replaced by the ones in main during the update run by the switch command.

Now my status is as follows:

>cm status --wkconfig cs:573@rep:quake@repserver:localhost:6060 Branch /main@quake@localhost:6060

Which is also reflected in the Branch Explorer:

Status prior to cli merge on main

I'm going to run the merge command now:

>cm merge main/fix-1342 The file /q3radiant/Bmp.cpp#cs:577 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/sort.sbk#cs:576 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/spill.2bk#cs:576 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/spill.sbk#cs:576 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/stdarg.1bk#cs:576 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/stdarg.2bk#cs:576 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/stdarg.sbk#cs:576 was modified on source and will replace the destination version The file /code/botlib/FileSystem.cs#cs:575 was modified on source and will replace the destination version The item /common/aselib.c has been moved to /q3asm/aselib.c on source and will be moved as result of the merge The item /code/client/FileSystem-renamed.cs has been moved to /code/botlib/FileSystem.cs on source and will be moved as result of the merge

Merge without any modifier just prints a preview of what's going to be merged so it is very useful to understand what is going to happen.

In order to make the merge more interesting I'm going to modify FileSystem-renamed.cs (remember it was moved and renamed on the branch):

>cm co code\client\FileSystem-renamed.cs The selected items are about to be checked out. Please wait ... Item code\client\FileSystem-renamed.cs was correctly checked out >vim code\client\FileSystem-renamed.cs >cm ci code\client\FileSystem-renamed.cs The selected items are about to be checked in. Please wait ... Assembling checkin data Validating checkin data Uploading file data Uploaded 0 bytes of 2.82 KB (0%) Confirming checkin operation Modified c:\Users\pablo\wkspaces\quake_path\code\client\FileSystem-renamed.cs Created changeset cs:578@br:/main@quake@localhost:6060 (mount:'/')

And now I'm going to re-run the merge:

>cm merge main/fix-1342 The file /q3radiant/Bmp.cpp#cs:577 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/sort.sbk#cs:576 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/spill.2bk#cs:576 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/spill.sbk#cs:576 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/stdarg.1bk#cs:576 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/stdarg.2bk#cs:576 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/stdarg.sbk#cs:576 was modified on source and will replace the destination version The item /common/aselib.c has been moved to /q3asm/aselib.c on source and will be moved as result of the merge The item /code/client/FileSystem-renamed.cs has been moved to /code/botlib/FileSystem.cs on source and will be moved as result of the merge The file /code/client/FileSystem-renamed.cs needs to be merged from cs:575 to cs:578 base cs:573. Changed by both contributors.

As you can see in the last line, FileSystem-renamed.cs now needs a 3-way merge since it was modified by the two contributors.

Now I'll run the merge adding the --merge modifier to the merge command:

>cm merge main/fix-1342 --merge The file /q3radiant/Bmp.cpp#cs:577 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/sort.sbk#cs:576 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/spill.2bk#cs:576 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/spill.sbk#cs:576 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/stdarg.1bk#cs:576 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/stdarg.2bk#cs:576 was modified on source and will replace the destination version The file /q3radiant/alpha/osf/tst/stdarg.sbk#cs:576 was modified on source and will replace the destination version The item /common/aselib.c has been moved to /q3asm/aselib.c on source and will be moved as result of the merge The item /code/client/FileSystem-renamed.cs has been moved to /code/botlib/FileSystem.cs on source and will be moved as result of the merge The file /code/client/FileSystem-renamed.cs needs to be merged from cs:575 to cs:578 base cs:573. Changed by both contributors. Merging c:\Users\pablo\wkspaces\quake_path\q3asm\aselib.c c:\Users\pablo\wkspaces\quake_path\common\aselib.c has been moved to c:\Users\pablo\wkspaces\quake_path\q3asm\aselib.c Merging c:\Users\pablo\wkspaces\quake_path\code\botlib\FileSystem.cs c:\Users\pablo\wkspaces\quake_path\code\client\FileSystem-renamed.cs has been moved to c:\Users\pablo\wkspaces\quake_path\code\botlib\FileSystem.cs Merging c:\Users\pablo\wkspaces\quake_path\q3radiant\Bmp.cpp The revision c:\Users\pablo\wkspaces\quake_path\q3radiant\Bmp.cpp@cs:577 has been loaded Merging c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\sort.sbk The revision c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\sort.sbk@cs:576 has been loaded Merging c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\spill.2bk The revision c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\spill.2bk@cs:576 has been loaded Merging c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\spill.sbk The revision c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\spill.sbk@cs:576 has been loaded Merging c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\stdarg.1bk The revision c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\stdarg.1bk@cs:576 has been loaded Merging c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\stdarg.2bk The revision c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\stdarg.2bk@cs:576 has been loaded Merging c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\stdarg.sbk The revision c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\stdarg.sbk@cs:576 has been loaded Merging c:\Users\pablo\wkspaces\quake_path\code\botlib\FileSystem.cs Merge done

As you can see, it applies all merges to the workspace and it launches the 3-way merge tool you've configured (typically the default Plastic's Xmerge) to solve the conflicts in FileSystem.cs. Please note how FileSystem.cs has been properly moved and renamed and the file contents were correctly merged.

Now if you run a status command, all merged files are in checkout status:

>cm status cs:578@rep:quake@repserver:localhost:6060 Modified items (CH = changed, CO = checkout, CP = copied (new), RP = replaced) CO code\botlib\FileSystem.cs (Merge from 577) RP q3radiant\alpha\osf\tst\sort.sbk (Merge from 577) RP q3radiant\alpha\osf\tst\spill.2bk (Merge from 577) RP q3radiant\alpha\osf\tst\spill.sbk (Merge from 577) RP q3radiant\alpha\osf\tst\stdarg.1bk (Merge from 577) RP q3radiant\alpha\osf\tst\stdarg.2bk (Merge from 577) RP q3radiant\alpha\osf\tst\stdarg.sbk (Merge from 577) RP q3radiant\Bmp.cpp (Merge from 577) Moved items (MV = moved, LM = locally moved) MV 100% code\client\FileSystem-renamed.cs -> code\botlib\FileSystem.cs (Merge from 577) MV 100% common\aselib.c -> q3asm\aselib.c (Merge from 577)

You see new statuses in use now: replaced (RP) which means that the file won't be copied in the version control but just kept as a pointer to the original location in the branch, and then the FileSystem.cs file marked as a real checkout (CO) since it was merged.

At this point my Branch Explorer looks like this:

Status after merge before ci

The dashed-line means the merge is still in progress and it is not yet checkedin.

Now I can simply checkin using the cm ci command:

>cm ci -m "merged from fix-1342" The selected items are about to be checked in. Please wait ... Assembling checkin data Validating checkin data Uploading file data Uploaded 0 bytes of 2.80 KB (0%) Confirming checkin operation Modified c:\Users\pablo\wkspaces\quake_path\common Modified c:\Users\pablo\wkspaces\quake_path\q3asm Move from c:\Users\pablo\wkspaces\quake_path\common\aselib.c to c:\Users\pablo\wkspaces\quake_path\q3asm\aselib.c Modified c:\Users\pablo\wkspaces\quake_path\code\client Modified c:\Users\pablo\wkspaces\quake_path\code\botlib Modified and moved from c:\Users\pablo\wkspaces\quake_path\code\client\FileSystem-renamed.cs to c:\Users\pablo\wkspaces\quake_path\code\botlib\FileSystem.cs Modified c:\Users\pablo\wkspaces\quake_path\q3radiant Replaced c:\Users\pablo\wkspaces\quake_path\q3radiant\Bmp.cpp Replaced c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\sort.sbk Replaced c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\spill.2bk Replaced c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\spill.sbk Replaced c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\stdarg.1bk Replaced c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\stdarg.2bk Replaced c:\Users\pablo\wkspaces\quake_path\q3radiant\alpha\osf\tst\stdarg.sbk Created changeset cs:579@br:/main@quake@localhost:6060 (mount:'/')

Applying a label

Labelling the new merged code just involves running the cm label command as follows:

>cm mklabel BL612 cs:579

And the Branch Explorer now looks as follows:

Status after label


List the available repos

Listing the repos on a given server is easy, just use the lrep command:

>cm lrep codice@localhost:6060 pnunit@localhost:6060 nervathirdparty@localhost:6060 quake@localhost:6060

By default lrep shows the repos in the default server, which is the server you configure in your config wizard and is written in your client.conf:

> type client.conf <ClientConfigData> <Language>en</Language> <WorkspaceServer>localhost:6060</WorkspaceServer> <WorkingMode>UPWorkingMode</WorkingMode> <SecurityConfig>pablo:dM629yb8hWO6qD+8jAqaag==</SecurityConfig> <CurrentWorkspace>c:\Users\pablo\wkspaces\four</CurrentWorkspace> <MergeTools> <MergeToolData> <FileExtensions>.cs</FileExtensions> <Tools> ...

The lrep command is extremely helpful to diagnose connection issues with your server because you can also type different servers as follows:

>cm lrep tube:dianaserver@codice.es --format=TABLE 4 codice tube:dianaserver@codice.es 4_1 codice/unitymerge tube:dianaserver@codice.es 5 pnunit tube:dianaserver@codice.es 6 nervathirdparty tube:dianaserver@codice.es 6_1 nervathirdparty/yamldotnet tube:dianaserver@codice.es 6_2 nervathirdparty/yamldotnet_buildutils tube:dianaserver@codice.es 35 licensetools tube:dianaserver@codice.es 55 plasticscm.com tube:dianaserver@codice.es 64 indexertest tube:dianaserver@codice.es 1741 tts tube:dianaserver@codice.es

List the available workspaces

Plastic SCM keeps a list of the workspaces you have on your machine (at least the ones it knows about, because you can always copy a workspace from somewhere and then Plastic will not have it on the list).

>cm lwk codebase@MODOK c:\Users\pablo\wkspaces\four doc@MODOK c:\Users\pablo\wkspaces\doc mkt@MODOK c:\Users\pablo\wkspaces\marketing quakecode@MODOK c:\Users\pablo\wkspaces\testwkspaces\quakewk codicediana@MODOK c:\Users\pablo\wkspaces\codicediana

Last updated

August 24, 2015
  • The cm log and cm diff examples have been updated: now these commands print the workspace root relative paths by default, instead of the full workspace paths.
  • Improved format string for lrep and lwk commands.