NAnt trouble with checkin

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

Moderator: SourceGear

Post Reply
CharlesNewman
Posts: 4
Joined: Fri Jan 06, 2006 10:53 pm

NAnt trouble with checkin

Post by CharlesNewman » Fri Jan 06, 2006 11:00 pm

I am using NAnt and Vault 3.0.6. I want to checkin an entire project folder at once and have so far been unsucessful. Is this possible?

NAnt task:

<vaultcheckin url:="http://localhost" username="admin" password="admin" repository="Default Repository" path="$/BuildingSolution" diskfile="c:\projects\BuildingSolution"

when I execute NAnt I get the following error:
The folder $/BuildingSolution could not be checked in.

The project remains checked out in the Vault client. I can use the exact same task but specify a specific file and it checks in fine.

Thanks in advance!

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Sat Jan 07, 2006 1:30 pm

Can you checkin the entire project using the Vault Client?
Linda Bauer
SourceGear
Technical Support Manager

CharlesNewman
Posts: 4
Joined: Fri Jan 06, 2006 10:53 pm

Post by CharlesNewman » Sat Jan 07, 2006 1:33 pm

I am able to checkin the whole project using the Vault Client GUI.

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Post by ian_sg » Mon Jan 09, 2006 1:33 pm

Charles,

It looks like the checkin task does not support the distpath attribute. It works only on the user's current working folder.
Ian Olsen
SourceGear

CharlesNewman
Posts: 4
Joined: Fri Jan 06, 2006 10:53 pm

Post by CharlesNewman » Mon Jan 09, 2006 1:40 pm

Ian,

Thanks for the reply. So if I am understanding correctly, I will have to checkin each individual file if I want to checkin via a NAnt build?

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Post by ian_sg » Mon Jan 09, 2006 1:46 pm

Only if you need to use a non-working directory. If you leave off the diskfile attribute, Vault will attempt to checkin the file using the user's working directory, which should work fine.

So using your example:

user: admin
Repository Path: $/BuildingSolution
disk path: c:\projects\BuildingSolution

If you set the admin user's working for $/BuildingSolution to c:\projects\BuildingSolution and remove the diskfile attribute from your nant checkin, it should work.
Ian Olsen
SourceGear

CharlesNewman
Posts: 4
Joined: Fri Jan 06, 2006 10:53 pm

Post by CharlesNewman » Mon Jan 09, 2006 1:48 pm

Is there a separate NAnt task that sets the working directory?

Can you give me example tasks?

Thanks!

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Post by ian_sg » Mon Jan 09, 2006 2:18 pm

There's no NAnt task to set a working folder, but you can do it with the command-line client (from NAnt) if you need to automate it.

The vault command looks like this:

Code: Select all

vault setworkingfolder $/BuildingSolution c:\projects\BuildingSolution -user admin -password admin -host localhost -repository "Default Repository"
So to run this from NAnt you'd do something like this:

Code: Select all

<exec workingdir="c:\projects\BuildingSolution" program="C:\Program Files\SourceGear\Vault Client\vault.exe" >
	<arg line="setworkingfolder $/BuildingSolution c:\projects\BuildingSolution -user admin -password admin -host localhost -repository "Default Repository"" />
</exec>
Ian Olsen
SourceGear

Post Reply