Vault keeps adding files back...

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

Moderator: SourceGear

neal007
Posts: 225
Joined: Tue Feb 17, 2004 10:13 am

Vault keeps adding files back...

Post by neal007 » Fri Oct 12, 2007 9:30 am

Hello,

Here is what is happening:

Two people working on a project (VS 2005 solution using Vault VS 2003 legacy client). I delete a file from the Logs folder. I close/check-in the solution. Other person opens up VS.NET and Vault sees the file in the Logs folder so it wants to ADD it back. The yellow plus symbol appears. When he checks in the file is back in the solution again.

So it seems that we have to open VS.NET, do a Get Latest, close the solution and click CANCEL when prompted to check-in, then open the solution again.

We're using Vault 4.0.4

Is this a Vault issue, VS.NET issue, or what? Would this issue still occur if we used the Vault VS 2005 Client? It's really becoming a problem as we can't keep our files maintained properly, i.e. one delete's the other adds it back without knowing it.

Thanks
Neal Culiner
NC Software, Inc.
http://www.nc-software.com

Vault 5.1.2
VS 2010/C#
Windows 7 Ultimate x64

VB.NET Forums: http://www.vbdotnetforums.com

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

Post by jclausius » Fri Oct 12, 2007 11:47 am

Neal:

Please give me some time while I set up a configuration for Vault 4.0 to test this scenario. I'll test both the Classic IDE and Visual Studio Advanced IDE clients as there might be some behavioral differences between them.

For those of you using Vault 3.x and before with the Classic MSSCCI (VS 2003 Compatible) IDE client with Visual Stduio, you should be prompted with a dialog asking you to remove the file from the working folder. With Visual Studio 2005, you may also get a different dialog about removing the file from version control. Is that the behavior you are seeing? In any case, once the file has been removed, save the project and commit the project changes to the repository.

Now, for other users, whenever there is a project change (including adding and removing files) committed to the repository, that user will need to do a GET at the project level (or higher). Visual Studio should then download the new project file containing the project changes, and reload the project. At this point the file should be removed from their Solution Explorer (or shown not contained within the project). The for this part is ensuring the new project file has been downloaded and Visual Studio detects the new file. Things that can cause problems where are having the project files changed to be a mergeable type within the Admin Tool, or configuring the Classic IDE client to NOT merge in any new file changes.
Jeff Clausius
SourceGear

neal007
Posts: 225
Joined: Tue Feb 17, 2004 10:13 am

Post by neal007 » Fri Oct 12, 2007 11:58 am

We don't have a problem getting new files with a GET LATEST operation. The problem is when I remove a file and then the other user opens up VS.NET the file gets added back in because it exists in their solution. So again, I have to open VS.NET 2005, do a GET LATEST, close the solution and cancel the check-in (as it's trying to add files back in that the other user removed) and then re-open the solution.
Neal Culiner
NC Software, Inc.
http://www.nc-software.com

Vault 5.1.2
VS 2010/C#
Windows 7 Ultimate x64

VB.NET Forums: http://www.vbdotnetforums.com

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

Post by jclausius » Fri Oct 12, 2007 12:47 pm

Yes. Just in case there was a misunderstanding in my post, the *other* user will see the file as a part of their project until they do a GET on the project file itself. Once the new project file has been retrieved through GET, Visual Studio will remove the file from the project (Solution Explorer will not treat the file as a part of the project), and it should not add it to the pending changes.

I tested this with Vault 3.5, and know this works as described in my post. Once I've got everything set up, I'll report what back on my Vault 4 findings.
Jeff Clausius
SourceGear

neal007
Posts: 225
Joined: Tue Feb 17, 2004 10:13 am

Post by neal007 » Fri Oct 12, 2007 12:56 pm

Thanks Jeff. That seems to be the problem, when I do a GET LATEST the files are not being removed in 4.0.4 MSSCCI client.
Neal Culiner
NC Software, Inc.
http://www.nc-software.com

Vault 5.1.2
VS 2010/C#
Windows 7 Ultimate x64

VB.NET Forums: http://www.vbdotnetforums.com

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

Post by jclausius » Fri Oct 12, 2007 2:16 pm

Neal:

This post will deal with the VS 2003 Compatible client.

I tested with two users within the same project, user A and user B. Both users had a Vault connection to the same repository project which was correctly bound (user A by Add to Source Control and user B by Open from Source Control) within Visual Studio 2005.

First, user A deleted a file from a test project. Visual Studio 2005 prompted with a dialog to remove from local working folders or from local working folders AND source code control. I chose to remove from both locations.

Moving over to user B, I refreshed User B's status of the project. At this point, the file had an exclamation within Solution Explorer, and it was pended as an Add in the pending changes tree.

Switching back to user A, the project file had not been saved, and committed to the repository. It was still seen in the pending change list. So, I saved and committed the project file so everything was up to date, and the pending changes tree was empty.

Finally, I switched back to User B, and invoked a GET on the project from within Solution Explorer. At this point, the client retrieved the new project file, the file disappeared from solution explorer as well as from my pending change set.

Note, the test file removed from the project removed in user B's working folder even after the GET.

The behavior here is no different from my description of Vault 3.5.x.


Are your steps any different than I tested here? Did the project file of the person issuing the delete get committed to the repository?
Jeff Clausius
SourceGear

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

Post by jclausius » Fri Oct 12, 2007 2:35 pm

Using the Visual Studio 2005 IDE client, I created a test console solution (similar to the test above).

With both projects correctly bound and open, I ran through the same steps. I deleted a file, which concatenated the delete to the change set view. I did notice the project file still stated unmodified, so I saved the project, and committed the changes.

I went to user B, and issued a refresh. No change within Visual Studio. I next did a GET at the project level. A Vault dialog came up, and I chose to do the GET with merge options. Next, Visual Studio notified me the project had changed, and it reloaded the project, afterwards the file was removed from the Solution Explorer.

Also note, the file was also removed from User B's working folder.

The key on both of these clients is ensuring the project has been saved, and committing the changes of the project to the repository. Then on other users, they will need to do a GET at the project level to make sure Visual Studio sees those changes.
Jeff Clausius
SourceGear

neal007
Posts: 225
Joined: Tue Feb 17, 2004 10:13 am

Post by neal007 » Fri Oct 12, 2007 2:51 pm

I never see the MSSCCI client ask for a reload of a project, I've only seen that in the VS 2005 Vault Client. Can you confirm in your test that you used the Vault VS 2003 Client for the source control option?
Neal Culiner
NC Software, Inc.
http://www.nc-software.com

Vault 5.1.2
VS 2010/C#
Windows 7 Ultimate x64

VB.NET Forums: http://www.vbdotnetforums.com

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

Post by jclausius » Fri Oct 12, 2007 3:42 pm

neal007 wrote:I never see the MSSCCI client ask for a reload of a project, I've only seen that in the VS 2005 Vault Client. Can you confirm in your test that you used the Vault VS 2003 Client for the source control option?
Yes. When Visual Studio retrieves a file through the Classic VS2003 Compatible client's GET command, it silently reloads the new project. This is a design of Visual Studio and the IDE client, as it decides how projects files are handled.

The Vault Visual Studio 2005 client does prompt to reload the project.


If you would like to "force" a reload dialog with the MSSCCI client you could try the following steps using a solution bound with the VS 2003 Compatible client.

1) Open the same project for two distinct users using the VS 2003 Compatible client.
2) Delete one of the files within Visual Studio. Save the project and commit the project changes to the repository.
3) Open a Vault GUI client, and log into Vault as the second user. Within the folders, the project file should say "Old" and be one version behind.
4) Do a GET on the project file from within Vault. Overwrite the file if necessary to get the project file's status from "Old" to "". This contrasts to the GET in my previous post which occurs from within Visual Studio.
5) Switch back to Visual Studio and it will ask you to reload the project.
6) Once reloaded, the file should disappear from the Solution Explorer.

I don't have access to the Visual Studio code, but my guess is that since VS knows the project file changed on disk from the GET (as done in the previous post) it is not displaying the reload message. However, in this example, when the the project file is modified by a process from outside VS it defaults to display the reload dialog.
Jeff Clausius
SourceGear

neal007
Posts: 225
Joined: Tue Feb 17, 2004 10:13 am

Post by neal007 » Fri Oct 12, 2007 4:08 pm

Jeff,

Can you confirm you tested my scenario using the Classic VS 2003 Vault client? It sounds to me your test was with the Vault 2005 Client. I need to make sure while using VS.NET and doing a GET LATEST that we don't have this issue of files getting added back in.
Neal Culiner
NC Software, Inc.
http://www.nc-software.com

Vault 5.1.2
VS 2010/C#
Windows 7 Ultimate x64

VB.NET Forums: http://www.vbdotnetforums.com

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

Post by jclausius » Fri Oct 12, 2007 9:26 pm

neal007 wrote:Jeff,

Can you confirm you tested my scenario using the Classic VS 2003 Vault client? It sounds to me your test was with the Vault 2005 Client. I need to make sure while using VS.NET and doing a GET LATEST that we don't have this issue of files getting added back in.
The post of "Oct 12, 2007 2:16 pm" was using the "Vault VS 2003 Compatible Client".

Did the steps I use there match the same set of steps you used to re-create the problem?
Jeff Clausius
SourceGear

neal007
Posts: 225
Joined: Tue Feb 17, 2004 10:13 am

Post by neal007 » Fri Oct 12, 2007 9:58 pm

Hello,

The scenario you described seems right but that's not the behavior we're seeing. We are both using Windows Vista as well.

I have the check-in on solution close in the VS.NET source code settings area so I assume the project is saving and then we're checking in. So it's a simple situation, I work on the solution, close VS.NET which saves and checks everything in. The other dev opens up VS.NET 2005 and gets yellow + (add) symbols on the files I deleted and they are added back when he checks in. He is doing a Get Latest. Are you saying that after he does a get latest he should do a save and that will clear the files trying to get added back that the other dev deleted?
Neal Culiner
NC Software, Inc.
http://www.nc-software.com

Vault 5.1.2
VS 2010/C#
Windows 7 Ultimate x64

VB.NET Forums: http://www.vbdotnetforums.com

neal007
Posts: 225
Joined: Tue Feb 17, 2004 10:13 am

Post by neal007 » Sat Oct 13, 2007 2:49 pm

We're using the Get Latest (Recursive) menu option when right-clicking on the solution node in VS 2005. We continue to have a problem with this, just today, I do a get latest, I see an image that was deleted by the other dev, in my list it's "imagename renambed by vault" then when I check-in it adds it back from my system. I've tried save, get latest, save, you name it, doesn't work.
Neal Culiner
NC Software, Inc.
http://www.nc-software.com

Vault 5.1.2
VS 2010/C#
Windows 7 Ultimate x64

VB.NET Forums: http://www.vbdotnetforums.com

neal007
Posts: 225
Joined: Tue Feb 17, 2004 10:13 am

Post by neal007 » Sun Oct 14, 2007 6:53 am

One detail I failed to mentioned, these projects are asp.net web site projects.
Neal Culiner
NC Software, Inc.
http://www.nc-software.com

Vault 5.1.2
VS 2010/C#
Windows 7 Ultimate x64

VB.NET Forums: http://www.vbdotnetforums.com

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

Post by jclausius » Mon Oct 15, 2007 8:03 am

neal007 wrote:Are you saying that after he does a get latest he should do a save and that will clear the files trying to get added back that the other dev deleted?
Yes. When I execute a GET within Visual Studio, that is the information I am seeing.
Jeff Clausius
SourceGear

Post Reply