Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-19-2004, 06:03 AM
Kim Kim is online now
Registered User
 
Join Date: 04-03-2003
Location: Norway
Posts: 26
Question Checkout recursively from Vault

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.
Reply With Quote
  #2  
Old 10-19-2004, 08:47 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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).
Reply With Quote
  #3  
Old 10-19-2004, 09:13 AM
Kim Kim is online now
Registered User
 
Join Date: 04-03-2003
Location: Norway
Posts: 26
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?
Reply With Quote
  #4  
Old 10-19-2004, 10:18 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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.
Reply With Quote
  #5  
Old 10-20-2004, 01:20 AM
kevina kevina is online now
Registered User
 
Join Date: 03-27-2003
Posts: 825
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...
Reply With Quote
  #6  
Old 10-20-2004, 10:23 AM
Kim Kim is online now
Registered User
 
Join Date: 04-03-2003
Location: Norway
Posts: 26
Smile

Thank you - this code snippet is working perfectly
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 05:35 PM.


Copyright © 1999-2023 Kinook Software, Inc.