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

Safely update Plastic workspace from command-line

我正在编写一个命令行脚本(bat 文件)来更新一些 Plastic 工作区。该脚本的一些用户使用 Plastic SCM GUI,而其他用户使用 Gluon。这意味着工作区要么处于 "full mode"(塑料 SCM GUI),要么处于部分模式(Gluon)。可以使用 cm update 更新完整工作区,使用 cm partial update.

更新部分工作区

问题 1:如果我用 cm partial update 更新整个工作区或用 cm update 更新部分工作区会怎样?然后工作区会更改其 full/partial 配置吗?

问题 2:有没有办法从命令行检测工作区是满的还是部分的?

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?

没错,您将通过 运行 一个 "cm partial update" 命令将常规工作区转换为部分工作区,反之,通过从部分工作区执行常规 "cm update" 命令你会把它转换成普通的。

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

它并不明显,但一旦你知道它就非常简单。

在常规工作区中,以下 "cm status --nochanges" 命令将 return 一个大于或等于 0 的变更集:

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

在部分工作空间中,相同的命令将 return 一个负数:

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