New command line "find file" utility available

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

Moderator: SourceGear

Ramesh

Post by Ramesh » Mon Nov 22, 2004 12:15 pm

You are right.

The vault.exe that is disitributed with the latest Vault distribution is version 2.0.6.2219. This version does not support the SETLABELWORKINGFOLDER.

However, since I need to modify the behavior of the client, I downloaded the modified "gvault.exe" source, and changed it to get the desired behavior wrt the REMEMBERLOGIN command. But this version seems to be based off of the older vault source and therefore has the implementation of SETLABELWORKINGFOLDER and also has the older(?) GETLABEL - that does not allow for the -labelworkingfolder option!

Thats why I was requesting the latest vault.exe source, so that I could make the desired modication, and have the getlabel command work correctly :)

Thanks!

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

Post by dan » Mon Nov 22, 2004 12:29 pm

Ah - I see.

You can get the latest source at http://www.sourcegear.com/vault/downloads.asp - it is the Client API link.

However, we will be releasing 3.0 in the next week, so you may want to wait for it to come out before diving in, since the source will have changed quite a bit to reflect all the new 3.0 functionality.

Ramesh
Posts: 9
Joined: Mon Nov 22, 2004 3:55 pm
Location: Atlanta, GA

Post by Ramesh » Wed Nov 24, 2004 1:39 pm

Thanks! That was what I was looking for. ( I had seen that link before, but it wasn't obvious that it contained the implementation source for the client :) )

If you have the time to make the change part of the client before 3.0 ships, that would be great, and the change is really really simple..

The need:
Eliminate the username/password from the build scripts.

The solution:
You achieve that by running the REMEMBERLOGIN command on the build machine once and the scripts no longer need to specify them.

The problem:
However, REMEMBERLOGIN today requires that the repository be specified as part of the command when -host, -ssl, -user, and -password are specified. But in our case, we get the source from one repository and the build scripts and 3rd party library stuff from a different repository. So this makes the REMEMBERLOGIN command ineffective for us.

The fix:
The change needed is to make the repository be optional in the REMEMBERLOGIN command. The change needs a total of 3 lines of code change.

1st change

Code: Select all

public static bool CommandNeedsRepositorySpecified(Command c)
		{
			bool bRet = true;
			switch (c)
			{
				case Command.ADDREPOSITORY:
                                 ...
				case Command.REMEMBERLOGIN:<======
					bRet = false;
					break;
			}
			return bRet;
		}

Second change

Code: Select all

void Login(bool bAllowAuto, bool bSaveSession)
		{
                ...
			// lower case - used later in the method
			if( strRepository != null && strRepository.Length == 0)<======
				strRepository = _args.Repository;<======
			if ( strRepository != null )
			{
				strRepository = strRepository.ToLower();
			}
...
}
If you think the above makes sense for other users too, please include it in the 3.0 client... :-)
Thanks

Ramesh

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

Post by dan » Wed Nov 24, 2004 3:58 pm

It is too late to put this in 3.0, but we'll add it for later.

christian
Posts: 202
Joined: Tue Sep 14, 2004 1:02 pm
Location: UK

Post by christian » Thu Nov 25, 2004 2:32 am

dan wrote:It is too late to put this in 3.0, but we'll add it for later.
Can I add my vote to this change as this will be important for our build scripts.
Thanks
Christian

oafcmetty
Posts: 9
Joined: Wed Feb 16, 2005 9:37 am

Post by oafcmetty » Wed Feb 16, 2005 10:29 am

I'm trying to use the vaultcmdlineclient utility against 3.0.2, and I've copied the contents of the vaultcmdlineclient.zip into my VaultClient folder, but on execution I get the following error:

<vault>
<error>
Could not load type VaultClientNetLib.ClientService.VaultRepositoryInfo from assembly VaultClientNetLib, Version=3.0.2.2812, Culture=neutral, PublicKeyToken=null.
</error>
<exception>
System.TypeLoadException: Could not load type VaultClientNetLib.ClientService.VaultRepositoryInfo from assembly VaultClientNetLib, Version=3.0.2.2812, Culture=neutral, PublicKeyToken=null.
at VaultCmdLineClient.VaultCmdLineClient.Login(Boolean bAllowAuto, Boolean bSaveSession)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommandGetLabelledFiles(String strReposPath, String strLabel)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg)
at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)
</exception>
<result success="no" />
</vault>

Any thoughts as to what is going wrong?

oafcmetty

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

Post by dan » Wed Feb 16, 2005 11:10 am

Is the CLC in the same folder as the Vault Client DLLs? It won't run unless they are in the same folder.

oafcmetty
Posts: 9
Joined: Wed Feb 16, 2005 9:37 am

Post by oafcmetty » Wed Feb 16, 2005 12:13 pm

Yep - in C:\Program Files\SourceGear\Vault Client

oafcmetty

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

Post by dan » Wed Feb 16, 2005 2:46 pm

The command line client is installed by default with the client installer, and the Client API should be an installer as well. What zip file are you getting the files from?

oafcmetty
Posts: 9
Joined: Wed Feb 16, 2005 9:37 am

Post by oafcmetty » Wed Feb 16, 2005 3:02 pm

I downloaded the zip from the following location:

http://support.sourcegear.com/viewtopic.php?t=1054

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

Post by dan » Wed Feb 16, 2005 3:42 pm

That looks to be a special build from a Vault customer that was built from 2.0.x version of Vault, and has not been updated for 3.0. You'll need to either recompile the source with 3.0 dlls, or download the 3.0 client API if you were wanting the source of the 3.0 command line client.

nvhbao
Posts: 1
Joined: Sat May 07, 2005 3:48 am

gvault problem

Post by nvhbao » Sat May 07, 2005 4:14 am

I have downloaded the gvault.exe from http://support.sourcegear.com/viewtopic.php?t=1054. I also downloaded the Client_API (3.0.7) from http://www.sourcegear.com/vault/downloads.html. I copied the gvault to the folder that contains vault.exe (C:\Program Files\SourceGear\Vault Client).

- When I run the command line:
vault.exe getlabel -host vault.ndex.net -user baonvh -password <my password> -repository "API Documenter" -destfolder C:\Temp\ $/03.Management Test
The vault client can download the files from vault server.
- When I ran the command line:
gvault.exe getlabelledfiles -host vault.ndex.net -user baonvh -password <my password> -repository "API Documenter" -destfolder C:\Temp\ $/03.Management Test
The gvault.exe couldn't download files from vault server :-(. It returned the below error: System.TypeLoadException: Could not load type VaultClientNetLib.ClientService.VaultResposityInfo from assembly VaultClientNetLib, Version=3.0.5.2833 (I check version of current DLL and saw that it has correct version)

Can everyone help me resovle this problem?

Thanks a lot.
Storm

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

Post by dan » Mon May 09, 2005 7:30 am

gvault is for use in version 2.0 of Vault, and the functionality in it has been put in the 3.0 command line client, so I would suggest just using the 3.0 command line client instead.

Post Reply