2

我的工作区状态有问题。Plastic SCM 给人的印象是我已经提交了所有更改,并且现在已同步到特定的更改集。它没有列出未决的更改。但我知道有些源代码文件不同步。顺便说一下,这些文件不在任何忽略列表中。如果我更改了一些不重要的空格,Plastic SCM 会将文件列为待处理,并将显示空格更改之前不同步的实际代码更改。

所以问题是:有没有办法让 100% 确保我的工作区与服务器上选定的变更集同步?一些cm命令来计算校验和,查找不同步的项目,强制更新,什么?

注意:切换到当前变更集没有帮助。将整个存储库签出到新工作区不是一种选择。

4

2 回答 2

2

I suspect your timestamps are not being changed properly, but there is an option under "Other Options" called Compare file contents instead of timestamps when determining "Changed" status. Check this option and see if that doesn't solve your problem.

UPDATE

Actually, reading the documentation I may have been wrong about this:

Compare files contents instead of timestamps when determining "Changed" status

Controls how Plastic SCM determines whether a source-controlled file has Changed status. When this option is not set, Plastic SCM uses the timestamps of the files. When the option is set, the content of the files that have a changed timestamp is hashed to see if has really changed. The latter option is slower but completely accurate, while the first is faster but may mark a file as changed when it actually is not.

It sounds like this will only do a hash check of the file if the timestamp has already changed. So if the problem is that the timestamps are not updating on your files, this might not help. You might want to test with the GUI client and see if this solves your problem. If it does, then I think the cm command will also obey this setting as they both check the client.conf file for settings.

于 2014-06-28T13:39:02.970 回答
1

老线程,但我们遇到了同样的问题。已同步到变更集,没有待处理的更改,但有些文件显然已过时。

设置变更集本身似乎还不够。一旦您设置了该变更集,查看工作区我们发现一些文件仍在使用旧版本(出于某种原因,可能在某些时候有些不同步)。

TL;DR 在工作区资源管理器中点击“更新工作区”按钮似乎是神奇的“修复”按钮。

我相信“待定更改”没有显示任何更改的原因是文件设置为旧的变更集编号,并且与该过时的变更集没有变化。

例如,工作区位于变更集 100 上,但某处的某个文件设置为变更集 25。没有显示任何更改,因为该文件与其变更集版本 25 相比未更改。但是,点击“更新工作区”会将该文件同步到最新的变更集。(在本例中不需要为 100;该文件可能上次更新为 unchangeset 75,但自 25 以来仍然更新......我希望这是有道理的;))

于 2019-09-27T19:57:28.577 回答