Vault 1.2.3 integration with Draco.Net
"James Geurts" <[email protected]> Fri, 13 Feb 2004 16:53:04 -0500
| Newsgroups | gmane.comp.version-control.sourcegear-vault.user |
|---|---|
| Message-ID | <[email protected]> |
Hey all,
I'm having some troubles getting Vault 1.2.3 to work with Draco.Net.
Everything seems fine until I issue a clientInstance.Refresh() command or
something similar. I've listed my login code below, and it goes fine until
the SetActiveRepositoryID call. If I change the 4th parameter (doRefresh)
to false for that call, then the program continues on until I call
clientInstance.Refresh() later on. Is there any reason why a refresh would
not work?
Also, the code is being run as a windows service and I've tried running the
service as both the local system account and a user account.
Thanks for any help with this
Jim
public void Login()
{
VaultConnection.AccessLevelType accessLevel =
VaultConnection.AccessLevelType.Client;
clientInstance.Init(accessLevel);
clientInstance.Login(url, user, password);
if (clientInstance.ConnectionStateType !=
ConnectionStateType.Connected)
{
throw new VaultException(String.Format("Login to Vault
repository failed.\nUser: {0}\nPass: {1}\nUrl: {2}", user, password, url));
}
VaultRepositoryInfo currentRepository = null;
VaultRepositoryInfo[] repositories = null;
clientInstance.ListRepositories(ref repositories);
foreach (VaultRepositoryInfo r in repositories)
{
if (r.RepName.ToLower() == repository.ToLower())
{
currentRepository = r;
break;
}
}
if (currentRepository == null)
{
throw new VaultException(String.Format("Unable to locate
repository.\nUser: {0}\nPass: {1}\nUrl: {2}\nRepository: {3}\n", user,
password, url, repository));
}
else
{
clientInstance.SetActiveRepositoryID(currentRepository.RepID, user,
currentRepository.UniqueRepID, true, true);
}
clientInstance.WorkingFolderOptions.RequireCheckOutBeforeCheckIn =
false;
}