Multiple Repositories and VS 2003 IDE

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

Moderator: SourceGear

Post Reply
texasbecker
Posts: 14
Joined: Tue Apr 13, 2004 8:49 am
Contact:

Multiple Repositories and VS 2003 IDE

Post by texasbecker » Mon Sep 20, 2004 12:59 pm

I am working with a UI framework in one repository, and an application in another. The IDE always prompts me for a repository when I fire it up, which is fine.

If I open a solution within the framework, and select its repository, the IDE (or Vault) appears to remember this as long as I keep that IDE instance open. For example, if I am done with the framework code and then open an application solution, it (the IDE, Vault, whoever...) tries to open a binding between the application and the =framework's= repository. When changing solutions I do not get the same prompt for a repository that I do when starting VS initially.

I work around this with multiple instances of the IDE at present. Or else I choose "Work Disconnected", since I am stuck at that point, and then exit the IDE so I can restart, pick the correct repository, and re-bind that solution again. Easy for me, tougher for someone who does not yet understand how all the pieces fit together.

Is there a way to tell the IDE what repository each solution should bind to, versus the pick list that comes up initially? I hope I've explained this thoroughly enough...

Thanks,

Andy

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

Post by dan » Tue Sep 21, 2004 8:02 am

If I understand the issue, I think there is a way around it, but you'll have to try it out to be sure:

There is an Vault option called "Always disconnect from server on Add/Open To/From source control" that will cause a relogin when you switch projects, and thus allow you to switch repositories. It is located in Visual Studio->Tools->Options->Source Control->SCC Provder->Advanced button.

texasbecker
Posts: 14
Joined: Tue Apr 13, 2004 8:49 am
Contact:

Post by texasbecker » Tue Sep 21, 2004 8:14 am

Yes, that looked pretty good to me also. I am using the 2.0.2 client. Think it's possible that it does what's being asked of it in a newer version?

Best Regards,

Andy

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

Post by dan » Tue Sep 21, 2004 8:59 am

texasbecker wrote:Yes, that looked pretty good to me also. I am using the 2.0.2 client. Think it's possible that it does what's being asked of it in a newer version?
Not sure I understand the question - this hasn't changed since 2.0 (I think), and should work the same way in any future version.

texasbecker
Posts: 14
Joined: Tue Apr 13, 2004 8:49 am
Contact:

Post by texasbecker » Tue Sep 21, 2004 9:57 am

this hasn't changed since 2.0 (I think)
You understood perfectly, as that answers the question!

What I was not clear on was the fact that it didn't change the behavior. <sigh> So I guess it's just a behavioral anomaly.

texasbecker
Posts: 14
Joined: Tue Apr 13, 2004 8:49 am
Contact:

Post by texasbecker » Wed Sep 22, 2004 9:47 am

So here is a question for you, Dan -

In the MSSCCPRJ.SCC file which Vault uses to track VS links to servers and repositories, there is a value in SCC_Aux_Path. It appears to take the form of URL|ServerName:X, where X is an integer.

For those things I have under source control using Vault, this X value appears to be the tblrepositories.repid value from the sgvault database. In other words, it is directly related to what repository I have placed the file(s) into.

If that is indeed the case, wouldn't it be possible for the Vault IDE integration to read this value when opening a solution?

It is almost like this is something the IDE should be doing, but it not.

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

Post by dan » Thu Sep 23, 2004 7:23 am

Yes, that integer is indeed the repository ID from the database, and we use it when logging in.

The problem is that when switching projects in the IDE, there currently isn't code to relogin. I'd have to look into it see whether it could be done - sometimes tasks that seem like they should be easy in the IDE are not because the API is not always deterministic (e.g., is this a brand new solution, or is it merely re-loading a project that is part of the current solution for some random reason?)

texasbecker
Posts: 14
Joined: Tue Apr 13, 2004 8:49 am
Contact:

Post by texasbecker » Thu Sep 23, 2004 8:13 am

there currently isn't code to relogin. I'd have to look into it see whether it could be done
Sounds great to me, add it to the wish list. Thanks for the assist!

Post Reply