简体   繁体   English

从命令行安全更新Plastic工作区

[英]Safely update Plastic workspace from command-line

I'm writing a command-line script (bat file) to update a few Plastic workspaces. 我正在编写一个命令行脚本(bat文件)以更新一些Plastic工作区。 Some users of the script use Plastic SCM GUI and others use Gluon. 该脚本的某些用户使用Plastic SCM GUI,而其他用户则使用Gluon。 That means that the workspaces are either in "full mode" (Plastic SCM GUI) or in partial mode (Gluon). 这意味着工作空间处于“完整模式”(Plastic SCM GUI)或部分模式(Gluon)。 A full workspace can be updated with cm update and a partial workspace with cm partial update . 完整的工作空间可以使用cm update进行更新,而部分工作空间可以使用cm partial update

Question 1: What happens if I update a full workspace with cm partial update or a partial workspace with cm update ? 问题1:如果我使用cm partial update整个工作区,或者使用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? 问题2:有没有一种方法可以从命令行检测工作空间是完整的还是部分的?

Question 1: What happens if I update a full workspace with cm partial update or a partial workspace with cm update? 问题1:如果我用cm部分更新来更新整个工作区,或者用cm更新来更新部分工作区,会发生什么? 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. 没错,您将通过运行“ cm部分更新”命令将常规工作空间转换为部分工作空间,反之亦然,通过从部分工作空间执行常规“ cm update”命令将其转换为常规工作空间。

Question 2: Is there a way to detect from command-line if a workspace is full or partial? 问题2:有没有一种方法可以从命令行检测工作空间是完整的还是部分的?

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: 在常规工作区中,以下“ cm status --nochanges”命令将返回大于或等于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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM