Question About <vaultgetbylabel> NAnt task

Post your questions regarding using the Vault and Fortress API in your programs.

Moderator: SourceGear

Post Reply
xara
Posts: 4
Joined: Tue Aug 14, 2007 6:30 am

Question About <vaultgetbylabel> NAnt task

Post by xara » Fri Aug 24, 2007 4:02 am

Hi,

I am trying to pull out a specifically labelled version of code from Vault using v3.5.2 of the Vault NAnt tasks.

Let's say I have a structure a bit like:
Folder 1-->
Folder 2-->
Folder 3

Label 'label1' was applied to Folder 1. Thus when I select 'Show Labels...' on Folder 2 in the Vault client, the icon shows an up arrow to indicate that the 'label1' cascades down from a higher level.

However, at a certain point in my build script, I only want the source that is rippling down from folder2. (Let's say that folder1 simply contains stuff I'm not presently interested in).

My NAnt script is something like this:
<vaultgetbylabel url="http://server/vaultservice"
labelstring="label1"
username="*"
password="*"
repository="repo"
path="$/Development/folder1/folder2"
destination="C:/folder2"/>

This scriptlet fails (with a 'GetLatestVersionFailedException', which seems a bit inappropriate). If I change the path to '$/Development/folder1' it works. Ergo it seems that if you do a getbylabel you have to specifically do so on the folder from which the label is cascading down.

Can someone confirm that this is by design?

shannon

Post by shannon » Mon Aug 27, 2007 8:47 am

The result you want can be produced by the 4.0.x nant tasks. These nant tasks are based off the clc implementation. I would suggest trying to shell out to the clc for this one command to see if it performs the way you're expecting.

Post Reply