Opening one branch changes the bindings of another

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

Moderator: SourceGear

Post Reply
cshaw
Posts: 2
Joined: Mon Sep 20, 2004 4:20 pm

Opening one branch changes the bindings of another

Post by cshaw » Mon Sep 20, 2004 4:27 pm

I have a "main" devlopment line of our project, and I have created a new branch (using the Vault client) and opened that branch in VS .NET 2003 using "Open from Source Control..."

When I open the Main branch of the project, everything is fine. When I open the New branch, the bindings of the Main branch in the Vault (as viewed in the Vault client) have been set to my (local) New branch. When I chack in my work on the New branch, the files also "check in" (ie: CHANGE) the Main branch.

I can solve this by always remembering to change the bindings (using the Vault client) of the Main branch when I open the New branch. This strikes me as unreliable. Might there be another way?

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Tue Sep 21, 2004 7:33 am

There might be a terminology overflow here:

"Binding" is a term used only by Visual Studio to associate a project with a Vault server, repository, and folder (within the repository). The Vault GUI uses the term "working folder" to associate a folder on the local machine with a repository folder. Vault working folders don't know anything about VS projects.

I'm a little confused about what is happening. Is it that the trunk working folder gets changed after a branch? If so, can you give an example of the steps that caused it? Is it that the VS binding points somewhere it shouldn't after the branch? Again, an example might help.

Note that when branching a Visual Studio project, there are some known problems within Visual Studio. See this link for more info:
http://support.microsoft.com/default.as ... -us;317925

cshaw
Posts: 2
Joined: Mon Sep 20, 2004 4:20 pm

Post by cshaw » Tue Sep 21, 2004 9:27 am

I'll try to be a bit clearer:
I'm a little confused about what is happening. Is it that the trunk working folder gets changed after a branch? If so, can you give an example of the steps that caused it?
This is exactly what happens. Here are the steps:
- Open Main branch (through VS)
- Open Vault Client and check - Main's Working Folder is set to my local copy of the "Main branch" project
- Open New branch (with another instance of VS)
- Check Vault client - Main's Working Folder is now set to my local copy of the "New branch" project

If I reset Main's Working Folder to where it should be, all is well. If I don't, changes made in the New branch are saved there (in the Vault), _and_ at least once overwrote files of the same name in the Main branch.

Note that when branching a Visual Studio project, there are some known problems within Visual Studio. See this link for more info:
http://support.microsoft.com/default.as ... -us;317925
This sounds similar, except that I'm using VS .NET 2003. Also, this problem seems confined to the two projects mentioned above. I tried to get this to happen again with a new branch, and nothing was wrong. I think that the Vault is confused about these particular projects, and I'd like to know how to straighten it out. Where should I look, and what should I look for?

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Wed Sep 22, 2004 8:13 am

Vault never programatically changes a working folder association, but Visual Studio does change working folder associations when it does an Open From Source Control. I'm not sure why VS is changing the working folder underneath.

Do the steps in the MS KB article help at all? Based on my reading of it, I think that if you branch in Vault and use VS integration, there are going to be some manual steps you need to take to correct the bindings.

Post Reply