PDA

View Full Version : Checkout recursively from Vault


Kim
10-19-2004, 06:03 AM
Hi,
Is there a way to checkout files recursively from Vault - just like the checkbox available when using sourcesafe checkout?

I would like to checkout all AssemblyInfo.cs files before build, to have correct build number in vault.

kinook
10-19-2004, 08:47 AM
With Vault, all commands that support a recursive option are recursive by default (you can make it *non-recursive* by checking the 'Do not recursively process folders' checkbox on the Flags tab of the Vault action).

Kim
10-19-2004, 09:13 AM
The checkbox "Do not recursively process folders" is not checked. Does that mean that I have to create my own "search" logic? Or are there any other options available?

kinook
10-19-2004, 10:18 AM
It appears that the Vault command-line client does not support recursive checkouts with file masks (folders only?). You may want to submit a request to SourceGear to add support for this.

kevina
10-20-2004, 01:20 AM
If you are first retrieving the files using get (so they are available on the build machine) when you do the checkout, you could you a Process Files step to workaround this Vault limitation.

The xml fragment below can be copied and pasted into Visual Build Pro to see an example. This hasn't been tested, but should work with minimal effort.


<step action='Process Files' type='0'>
<FileExtensions>AssemblyInfo.cs</FileExtensions>
<FilePath>c:\temp\visbuildpro\assemblyinfocheckout</FilePath>
<FilePathOnly type='11'>-1</FilePathOnly>
<FileRecurse type='11'>-1</FileRecurse>
<indent type='3'>1</indent>
<name>Iterate over folders containing AssemblyInfo.cs</name>
</step>
<step action='Set Macro' type='0'>
<MacroDescr>the above converts an absolute path to a valid Vault repository path for use by the Vault Checkout command</MacroDescr>
<MacroName>VAULT_FOLDER_PATH</MacroName>
<MacroValue>[Replace(Replace("%PROCFILES_FULLPATH%", "c:\temp", "$"), "\", "/")]</MacroValue>
<indent type='3'>2</indent>
<name>Populate Macro with Vault compatible path</name>
</step>
<step action='Vault' type='0'>
<Command>checkout</Command>
<Host>%VAULT_SERVER%</Host>
<Project>%VAULT_FOLDER_PATH%AssemblyInfo.cs</Project>
<Repository>%VAULT_REPOS%</Repository>
<ShowCmd type='11'>-1</ShowCmd>
<Username>%VAULT_USER%</Username>
<indent type='3'>2</indent>
<name>Checkout the AssemblyInfo.cs file</name>
</step>

Hope that helps...

Kim
10-20-2004, 10:23 AM
Thank you - this code snippet is working perfectly