使用Visual Studio 2005和ClearCase Eclipsed文件

时间:2023-01-14 18:48:21

I'm trying to use Visual Studio 2005 with ClearCase eclipsed files (view private which "eclipse" a versioned file), but any time I save the file in VS, it becomes uneclipsed, and returns to the versioned file. In Linux, I use VIM instead of Visual Studio, and get around this problem by setting backupcopy=yes, thereby forcing it to save files by writing to a new file and then copying the new file over the existing one, instead of moving the original file out of the way (which undoes the eclipse) and then writing a new file, but in Windows, I'd like to use Visual Studio (since the tree also includes C# code compiled under VS). Is there any way to teach it to save files this way?

我正在尝试使用带有ClearCase eclipsed文件的Visual Studio 2005(查看私有“eclipse”版本化文件),但是每当我将文件保存在VS中时,它就会变得松散,并返回到版本化文件。在Linux中,我使用VIM而不是Visual Studio,并通过设置backupcopy = yes来解决这个问题,从而强制它通过写入新文件然后将新文件复制到现有文件来保存文件,而不是移动原始文件文件不碍事(撤消eclipse)然后编写一个新文件,但在Windows中,我想使用Visual Studio(因为树也包含在VS下编译的C#代码)。有没有办法教它以这种方式保存文件?

2 个解决方案

#1


I do not think Visual Studio does save file in a particular way that may cause the file to be first removed, then written.

我不认为Visual Studio会以特定方式保存文件,这可能导致文件首先被删除,然后写入。

Considering that, with developer's environment as Windows with Visual Studio, eclipsed files often happen just by writing a file case sensitive and later not case sensitive.
Hence, did you check the case of your file ?

考虑到,将开发人员的环境作为带有Visual Studio的Windows,通常只需编写一个区分大小写的文件,然后不区分大小写就会发生重叠文件。因此,你检查了你的文件的情况?

Could you also check the config spec associated with your Windows view ? (and compare it to your Linux view).

您还可以查看与Windows视图关联的配置规范吗? (并将其与Linux视图进行比较)。


I just spend 1/2h with a Visual Studio 2005 / ClearCase / dynamic view and... I do see the same thing!

我只花了1 / 2h的Visual Studio 2005 / ClearCase /动态视图......我确实看到了同样的事情!

The only workaround I can fathom is to add a non-selection rule:

我能理解的唯一解决方法是添加一个非选择规则:

element /my/private/file -none

That way, even though VS2005 remove then add the private file when saving it, ClearCase does not try to restore the versionned file, since it is not selected at all.

这样,即使VS2005删除然后在保存时添加私有文件,ClearCase也不会尝试恢复版本化文件,因为它根本没有被选中。

Si, the answer may not reside within VS2005 (I studied the options without seeing any obvious setting altering the saving process...), but rather within ClearCase.

Si,答案可能不在VS2005中(我研究了选项而没有看到任何改变保存过程的明显设置......),而是在ClearCase中。

Let me know if it helps.

如果有帮助,请告诉我。


As noted in the comment, the downside of this approach is "un-eclipse" can no longer be a matter of moving/removing the private file to let ClearCase dynamically restore the versionned file.

正如评论中所指出的,这种方法的缺点是“un-eclipse”不再是移动/删除私有文件以让ClearCase动态恢复版本化文件的问题。

Now, that step must be complemented with another one, which is to comment the non-selection rule in the config spec.

现在,该步骤必须补充另一个步骤,即在配置规范中注释非选择规则。

#2


If anyone is still reading this... I just discovered that Visual Studio 2008 appears to work just fine. Go figure...

如果有人还在读这个...我刚刚发现Visual Studio 2008似乎运行得很好。去搞清楚...

#1


I do not think Visual Studio does save file in a particular way that may cause the file to be first removed, then written.

我不认为Visual Studio会以特定方式保存文件,这可能导致文件首先被删除,然后写入。

Considering that, with developer's environment as Windows with Visual Studio, eclipsed files often happen just by writing a file case sensitive and later not case sensitive.
Hence, did you check the case of your file ?

考虑到,将开发人员的环境作为带有Visual Studio的Windows,通常只需编写一个区分大小写的文件,然后不区分大小写就会发生重叠文件。因此,你检查了你的文件的情况?

Could you also check the config spec associated with your Windows view ? (and compare it to your Linux view).

您还可以查看与Windows视图关联的配置规范吗? (并将其与Linux视图进行比较)。


I just spend 1/2h with a Visual Studio 2005 / ClearCase / dynamic view and... I do see the same thing!

我只花了1 / 2h的Visual Studio 2005 / ClearCase /动态视图......我确实看到了同样的事情!

The only workaround I can fathom is to add a non-selection rule:

我能理解的唯一解决方法是添加一个非选择规则:

element /my/private/file -none

That way, even though VS2005 remove then add the private file when saving it, ClearCase does not try to restore the versionned file, since it is not selected at all.

这样,即使VS2005删除然后在保存时添加私有文件,ClearCase也不会尝试恢复版本化文件,因为它根本没有被选中。

Si, the answer may not reside within VS2005 (I studied the options without seeing any obvious setting altering the saving process...), but rather within ClearCase.

Si,答案可能不在VS2005中(我研究了选项而没有看到任何改变保存过程的明显设置......),而是在ClearCase中。

Let me know if it helps.

如果有帮助,请告诉我。


As noted in the comment, the downside of this approach is "un-eclipse" can no longer be a matter of moving/removing the private file to let ClearCase dynamically restore the versionned file.

正如评论中所指出的,这种方法的缺点是“un-eclipse”不再是移动/删除私有文件以让ClearCase动态恢复版本化文件的问题。

Now, that step must be complemented with another one, which is to comment the non-selection rule in the config spec.

现在,该步骤必须补充另一个步骤,即在配置规范中注释非选择规则。

#2


If anyone is still reading this... I just discovered that Visual Studio 2008 appears to work just fine. Go figure...

如果有人还在读这个...我刚刚发现Visual Studio 2008似乎运行得很好。去搞清楚...