Loss of changes when using VS2010 Enhanced Client

If you are having a problem using Vault, post a message here.
Post Reply
TelmoSilva
Posts: 15
Joined: Sun May 17, 2009 4:31 pm

Loss of changes when using VS2010 Enhanced Client

Post by TelmoSilva » Fri Mar 04, 2011 5:20 am

Currently running Visual Studio 2010 Professional, Vault Professional 5.1.1.19216.

If using VS2010 in debug mode, VS stops user from making changes to the project. Vault however allows things such as Undo Checkout, Get latest, etc to be performed.

When doing those, the file(s) look like they are checked out or have the latest but in fact they are not. If our developers forget to stop VS debug mode, loss of code happens. Unfortunately this is a very common occurrence.

An example: if you are in debug mode in VS and undo check out on a file for instance. VS will keep your modification in the file, Vault won’t complain and will fakely uncheck out your file; and you can get latest overwrite, the file won’t come back to the last Vault version. So, the next time you checkout the file, you will have your modifications instead of the last ones.

This is a huge issue and it took us a long time to determine why we have been losing changes/etc over the last few weeks.

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

Re: Loss of changes when using VS2010 Enhanced Client

Post by Beth » Fri Mar 04, 2011 8:52 am

First, to get your changes back, open a Vault GUI client, right-click the parent folder for files that changes were lost and select Properties. Click on the backup tab. In there are copies of modified files that were overwritten. Your changes should reside in one of those files and you can restore those changes.

In VS 2010, do you use the Vault Classic Client or the Vault Enhanced Client?
Beth Kieler
SourceGear Technical Support

TelmoSilva
Posts: 15
Joined: Sun May 17, 2009 4:31 pm

Re: Loss of changes when using VS2010 Enhanced Client

Post by TelmoSilva » Wed Mar 09, 2011 4:01 pm

Hi Beth,

We are aware how to recover overwritten files. Thanks.

We are using the enhanced client.

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

Re: Loss of changes when using VS2010 Enhanced Client

Post by Beth » Fri Apr 01, 2011 3:12 pm

I've run some tests on this and here's what I found.

There appears to be a difference in how files are treated on memory versus on disk. The files in memory cannot be edited, which is what VS is dealing with. Vault performs actions on the files on disk, and those aren't reloaded into memory while in debug mode.

If I close the files I performed a Get or Undo Checkout and reopen them, then VS gives an error one the files. If one continues and opens them, then the version that was retrieved and on disk is loaded.

You mention that the changes are kept and then you say that changes are lost. Are your users wanting to keep the changes they had before the Get or Undo check out? If so, the way they can deal with it now is to select the option to Leave when they Undo Checkout instead of Revert, and don't use the Overwrite option when they perform a Get.

I can put in a feature request for Vault to detect that VS is in debug mode and not allow changes like VS does if you would like.
Beth Kieler
SourceGear Technical Support

Post Reply