Nant VaultGetFile doesn't merge

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

Moderator: SourceGear

Post Reply
erict
Posts: 33
Joined: Fri Sep 10, 2004 9:32 am

Nant VaultGetFile doesn't merge

Post by erict » Thu Apr 06, 2006 9:07 am

Hi, I'm exploring using vaultgetfile instead of <exec>vault. The problem with getfile is that if a file is currently checked out, it will still be retrieved and any changes are effectively rolled back. Is there a way to run vaultgetfile in "attempt merge" and fail if the merge is not successful? Because currently I'm using <exec program="vault"> and that will merge, but it won't tell me if the merge failed.

Thanks for any help.

PS: I'm using Nant 0.85rc3, Vault 3.1.2, and the bin "VaultNantTasks_3.0.6..." downloaded from vaultpub.

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

Post by ian_sg » Thu Apr 06, 2006 9:23 am

Unfortunately the NAnt task doesn't support this now. I'll add a feature request for it.

As you mentioned, the only workaround would be to exec vault.exe, but you'd have to parse the XML results to know if the merge failed.
Ian Olsen
SourceGear

erict
Posts: 33
Joined: Fri Sep 10, 2004 9:32 am

Post by erict » Thu Apr 06, 2006 11:10 am

Thanks for putting it onto the wishlist. In the meantime I'm trying to parse the output, and I've captured it, but all I get is: <vault><result success="yes"/></vault>. This is because I already know from my GUI that I have a merge to do, so when I try to build with Nant, the get has nothing to do. And the build therefore doesn't fail.
My command-line includes the -verbose switch.
Eric

mitch.wheat
Posts: 40
Joined: Thu Apr 06, 2006 10:33 pm

Post by mitch.wheat » Wed Jun 07, 2006 8:22 pm

Related to another post: I really would like to see vaultgetfile having more sensible behaviour! It really should attempt a merge. Were these Vault Nant taks written in a hurry, because this does seem to be a glaring omission?

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

Post by ian_sg » Thu Jun 08, 2006 10:14 am

Mitch,

I attempted to explain the thinking behind this behavior in the other thread: http://support.sourcegear.com/viewtopic.php?p=25192. Let me know if you have additional questions or concerns.
Ian Olsen
SourceGear

Post Reply