vvnurmi
vvnurmi

Reputation: 448

Safely update Plastic workspace from command-line

I'm writing a command-line script (bat file) to update a few Plastic workspaces. Some users of the script use Plastic SCM GUI and others use Gluon. That means that the workspaces are either in "full mode" (Plastic SCM GUI) or in partial mode (Gluon). A full workspace can be updated with cm update and a partial workspace with cm partial update.

Question 1: What happens if I update a full workspace with cm partial update or a partial workspace with cm update? Does the workspace then change its full/partial configuration?

Question 2: Is there a way to detect from command-line if a workspace is full or partial?

Upvotes: 0

Views: 909

Answers (1)

MrCatacroquer
MrCatacroquer

Reputation: 2068

Question 1: What happens if I update a full workspace with cm partial update or a partial workspace with cm update? Does the workspace then change its full/partial configuration?

That's right, you will be converting a regular workspace to partial by running a "cm partial update" command and the other way around, by executing a regular "cm update" command form a partial workspace you will convert it to regular.

Question 2: Is there a way to detect from command-line if a workspace is full or partial?

It's not obvious but pretty straightforward once you know it.

In a regular workspace the following "cm status --nochanges" command will return a changeset greater or equal than 0:

$regular-Wks>cm status --nochanges
cs:24@rep:SleepSurvivalFighter@repserver:localhost:8087

In a partial workspace the same command will return a negative number:

$partial-Wks>cm status --nochanges
cs:-1@rep:SleepSurvivalFighter@repserver:localhost:8087

Upvotes: 2

Related Questions