Unexpected overwrite on Get Latest Version

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
mhousholder
Posts: 1
Joined: Thu Jul 31, 2008 12:29 pm

Unexpected overwrite on Get Latest Version

Post by mhousholder » Thu Jul 31, 2008 1:33 pm

Vault version: 4.1.2.18185
IDE: Visual Studio 2008
Vault Integration: Vault Enhanced Client
Concurrent Development Style: CVS Style
VS Project type: C# Web Application
Reproducible: Yes

Scenario:
Developer1 modifies DirectoryA/FileA.
Developer2 adds a file to the project and commits changes (change to sln and csproj)
Developer1 modifies DirectoryB/FileB.
Developer1 decides to revert the changes of DirectoryB/FileB by:
Right-click on DirectoryB/FileB in Solution Explorer
Select Get Latest Version
Select Modified Local File: Overwrite
Click OK

Expected Behavior:
Developer1 retrieves DirectoryB/FileB from Vault.
No other changes to the local project
Project still shows "The file is out of date." due to Developer2 having adding a file, modifying sln and csproj.

Unexpected, Actual Behavior:
Developer1 retrieves entire project from Vault.
Overwritten DirectoryA/FileA with file from Vault (backup in _sgbak).

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Unexpected overwrite on Get Latest Version

Post by lbauer » Thu Jul 31, 2008 3:18 pm

So you're trying to get latest on a single file, but you're getting the entire project, which overwrites everything.

We'll try to reproduce it here.
Linda Bauer
SourceGear
Technical Support Manager

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Unexpected overwrite on Get Latest Version

Post by lbauer » Thu Sep 11, 2008 9:40 am

We try to reproduce this, but were unable to. If this is still causing a problem, contact me at support at sourcegear.com, Attn: Linda.
Linda Bauer
SourceGear
Technical Support Manager

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

Re: Unexpected overwrite on Get Latest Version

Post by TelmoSilva » Thu May 21, 2009 5:38 am

Dear Linda,

We have just recently encountered a similar issue.

Scenario is as follows:

1. In Visual Studio 2008 using Enhanced Fortress/Vault Client
2. I check out file "test.aspx" in folder "main".
3. I go to folder "secondary" and "Get Latest" on that folder with "Overwrite".
4. File "test.aspx" (even though in a different folder and checked out) is overwritten.

Here we have two different behaviours from two differnt users.
a) User "A" gets a warning giving options to overwrite, merge later, etc.
b) User "B" does not get any warning and local checkout gets overwritten.

What are we doing wrong, why the two different behaviours, how is getting latest supposed to work (file, folder or solution level?)

Thanks in advance for the assistance,
Telmo

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Unexpected overwrite on Get Latest Version

Post by lbauer » Thu May 21, 2009 12:24 pm

What kind of project is this?

Could you post or email a screenshot of your directory structure in Vaullt and also what it looks like in VS? If you email, send it to support at sourcegear.com, Attn: Linda. Please include a link to this forum post.
a) User "A" gets a warning giving options to overwrite, merge later, etc.
b) User "B" does not get any warning and local checkout gets overwritten.
The user's options could cause this behavior. For instance, Vault Client options under Tools->Local Files->Modified working copy are: "Attempt automatic merge, " "Merge later," and "Overwrite." Also, you can enable or suppress any command dialogs under Tools->Options->Command Dialogs.
(In Visual Studio, these options are set under Tools->Options->Source Control->Vault Options.)

So if both User A and User B have locally modified files when they do a Get Latest, User A will get prompted if they have enabled the Get dialog.
If User B has chosen "Overwrite" as his default and has disabled the Get Latest command dialog, then files will be overwritten with no prompt.

This may or may not be the case with your users, but it's one way this can happen.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply