Using the <vaultgetfile> task with NAnt

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
Tony
Posts: 28
Joined: Wed Apr 13, 2005 6:18 am
Location: Pennsylvania
Contact:

Using the <vaultgetfile> task with NAnt

Post by Tony » Wed Apr 20, 2005 7:33 am

I have been successfully using the <vaultgetfile> NAnt task for a few days now and it's been working like a champ.

This morning, I added a new file to the solution. The file appears in Vault and is within the "root" of the folder specified in my task (see below).

The problem is that when the <vaultgetfile> task executes, it is not pulling down the new file. It looks as if the task only updates the previously retreived files with the latest version, but doesn't pull down new files or delete local copies of files removed from the server.

Is this expected functionality? If so, is there a way to tell the task to do a full sync. between the local folder and the server? Should I just be doing a delete on the local directory prior to executing the <vaultgettask> task? Or should I go back to the <exec> method and use the Vault command line interface?

Here's my NAnt target definition, if that helps.

<target name="update">
<vaultgetfile url="${vault.host}"
username="${vault.user}"
password="${vault.password}"
repository="${vault.repository}"
path="${vault.path}"
destination="${ccnet.working.directory}" />
</target>

Tony
Posts: 28
Joined: Wed Apr 13, 2005 6:18 am
Location: Pennsylvania
Contact:

More information ...

Post by Tony » Wed Apr 20, 2005 7:55 am

Actually, if I delete the working directory contents before I call the <vaultgetfile> task, then nothing comes back from Vault and I get no errors. It's as if the task says "I successfully updated every file in your local directory (of which there are none) with the latest version from the server. Have a nice day."

Okay, I made up the "have a nice day" part, but the rest is what's apparantly happening.

What are my options, here?

Tony

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Apr 20, 2005 8:28 am

Tony,

Email me using the button below this post so that I can help figure out what's going on here.

joshyeager
Posts: 60
Joined: Wed Aug 18, 2004 11:15 am

Post by joshyeager » Tue Jan 24, 2006 10:14 pm

Did you ever figure out what the problem was? I have the same problem (NAnt 0.85rc3, Vault 3.0.1, VaultNantTasks_3.0.6_0.85.rc2).

Thanks!
Josh

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Jan 25, 2006 7:46 am

Josh,

Tony's email to me included this:
I may have tripped across something. The vault.path variable in my NAnt script was being reset to the vault.exe path, not the repository project path.
Does that help you?

joshyeager
Posts: 60
Joined: Wed Aug 18, 2004 11:15 am

Post by joshyeager » Wed Jan 25, 2006 11:32 am

I checked the Vault directory, but the files are not there.

It seems like Vault is just skipping the entire "get" process, but it's not throwing any errors.

I also tried upgrading to the latest Vault client and NAnt tasks, but that did not help.

Any ideas? Or should I just use the "exec" task to call the command line client?

Thanks,
Josh

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Jan 25, 2006 1:53 pm

What does your call to vaultgetfile look like? Can you echo the values of all of your parameters?

joshyeager
Posts: 60
Joined: Wed Aug 18, 2004 11:15 am

Post by joshyeager » Wed Jan 25, 2006 3:46 pm

My vaultgetfile call looks like this:

Code: Select all

<vaultgetfile url="${vault.server}" username="${vault.username}" password="${vault.password}" repository="${vault.repository}" path="${vault.path}\BasePages" destination="${build.folder}\BasePages" />
My variables are (I think) correct:

Code: Select all

     [echo] Server: genesis
     [echo] Username: admin
     [echo] Password: <password>
     [echo] Repository: SwiftProjects
     [echo] Vault Path: $\JT\JT\BasePages
     [echo] Local Path: Build\BasePages
Last edited by joshyeager on Mon Jun 19, 2006 7:56 am, edited 1 time in total.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Jan 25, 2006 3:51 pm

The problem may be that your ${vault.path} variable has backslashes instead of forward slashes. Try switching the slashes.

joshyeager
Posts: 60
Joined: Wed Aug 18, 2004 11:15 am

Post by joshyeager » Wed Jan 25, 2006 4:12 pm

That did it! Thanks, Jeremy! :D

Josh

Locked