RE: Vault 1.2.3 integration with Draco.Net

"James Geurts" <[email protected]> Fri, 13 Feb 2004 21:03:32 -0500
Newsgroups gmane.comp.version-control.sourcegear-vault.user
Message-ID <[email protected]>
Hey guys,

I just wanted to let you all know that I got it to work.  After moving the
code to a separate .exe to test, I found out that vcdiff.dll and sgdiff.dll
were required along with the other 3 dlls.  So, now I'll iron out the bugs
with Draco.Net.  If anyone is interested in the code that I have, I can send
it your way.  The only thing is that after talking with Brian, I would
really like to redo the Draco integration so that draco uses the webservice
instead of calls to the assemblies.  I'll look into doing this after I
finish work on the current project that I'm working on.

Jim



-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of James Geurts
Sent: Friday, February 13, 2004 4:53 PM
To: 'SourceGear Vault MailList ([email protected])'
Subject: [vault-list] Vault 1.2.3 integration with Draco.Net

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;			

}


_______________________________________________
vault-list mailing list
[email protected]
http://lists.sourcegear.com/cgi-bin/mailman/listinfo/vault-list