Visual Studio acts like all shares of a file are checked out

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
joshyeager
Posts: 60
Joined: Wed Aug 18, 2004 11:15 am

Visual Studio acts like all shares of a file are checked out

Post by joshyeager » Wed Oct 25, 2006 2:04 pm

We have a RESX file that is shared in Vault between all of the CSPROJ files that make up our product (several separate WinForms apps). These projects are all in one SLN file, so we usually have them all open in Visual Studio at once.

The problem starts when we check out the RESX file in one of the projects. Visual Studio checks it out correctly, and Vault shows that it is checked out. All of the other shares remain non-checked out, which is correct.

BUT, if we close Visual Studio and reopen it, it suddenly thinks that all of the copies are checked out, even though Vault still only shows the first one as checked out. This means that when we are ready to check in our changes, Visual Studio tries to check in all 8 copies of the RESX file. Since they are shared, the unchanged copies overwrite the changed copy, and our changes are lost.

How can we fix this? We either need to make Visual Studio realize that only one copy is checked out, or we need to make it check in only the changed one.

joshyeager
Posts: 60
Joined: Wed Aug 18, 2004 11:15 am

Post by joshyeager » Wed Oct 25, 2006 2:09 pm

I forgot to mention that we're using Visual Studio 2003 and Vault 3.1.9.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Thu Oct 26, 2006 2:08 pm

When a file or folder is shared, when one receives changes, all the copies do. If you only want one of those shares to have changes, then you may wish to consider performing a branch instead.

Actually, if a file is shared, when one is checked out, the copy should reflect that.

joshyeager
Posts: 60
Joined: Wed Aug 18, 2004 11:15 am

Post by joshyeager » Thu Oct 26, 2006 2:15 pm

I understand that all shared copies of a file are changed - that's why we have these files shared. The problem is that Visual Studio thinks they are all checked out, even though Vault says that only one is. That's what is causing the problem.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Thu Oct 26, 2006 3:53 pm

How soon after performing these actions are you checking Vault? Did you try a refresh in Vault and then see if all the shared files show a check out?

joshyeager
Posts: 60
Joined: Wed Aug 18, 2004 11:15 am

Post by joshyeager » Thu Oct 26, 2006 3:57 pm

Ok... this is interesting. I checked out one of the shared files, and that file was the only one that showed up in my Pending Change Set.

However, all of the other shared files suddenly have a "checked out" mark on their icons, even though some of them are not even the latest version of the file.

Apparently, Vault only considers the one that I checked out to be a pending change, but it tells Visual Studio that they are all checked out, which is why Visual Studio wants to check them all in.

joshyeager
Posts: 60
Joined: Wed Aug 18, 2004 11:15 am

Post by joshyeager » Thu Oct 26, 2006 3:58 pm

So... Any ideas about how we can avoid accidentally losing our changes because of this?

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Fri Oct 27, 2006 9:34 am

You won't lose changes. Even when a file gets overwritten in the working folder, a back-up is created in a _sgbak folder.

If a file is shared, then all the shares will match. They won't be different versions. Did you look at the files and see that they are different? If so, then something else is going on than just a regular share I think.

If you want, you can send an email to support at sourcegear.com, and I'll collect some more detailed information that you might not want to post here or we can connect and see what's happening.

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Fri Oct 27, 2006 9:39 am

joshyeager:

There seems to be a bug in the Vault IDE client for shared files within projects of the same solution. This will be addressed in a future Vault 3.5.x maintenance release.

In the meantime, the only work around is to make sure users are mindful of the shared files, and DIFF any of those files to verify they are checking in the correct file.
Jeff Clausius
SourceGear

joshyeager
Posts: 60
Joined: Wed Aug 18, 2004 11:15 am

Post by joshyeager » Mon Oct 30, 2006 8:11 am

jclausius:
Thanks for the info. I hope we can get it fixed soon, but until then I will tell my team to be careful when they are working on the shared files.

Locked