views:

967

answers:

2

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?

+2  A: 

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

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 ?

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


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

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.

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.

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.

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

VonC
The eclipsing is on purpose. In vim (both win+linux), I can control the style of saves and see this behavior. Another editor that behaves like MSVC, Multi-Edit, shows it even clearer, as the temporary file is left in the directory.The configspecs are identical, and the files are all lowercase only
Mikeage
I understand eclipsing is on purpose (like on purpose hijacked files in a snapshot view). I did not realize Visual Studio had that kind of process when saving a file. I will ask the developers I am in contact with for more information tomorrow.
VonC
Interesting idea; I'll setting my eclipse script to add this automatically.OTOH, it was nice to be able to un-eclipse files just by deleting them.
Mikeage
A: 

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

Mikeage