I'd like to see an example for the use of VaultDiff in nant. I want to compare all files of a folder in vault with a folder on a local drive. If different then get the latest version and build, if all files match then leave everything alone. I have a working build process but I think that I need to use VaultDiff to do what I want the build process to do.
Thank in advance,
Larry
Vault and Nant VaultDiff
Moderator: SourceGear
Re: Vault and Nant VaultDiff
Have you looked at CC.Net? We have some nice integration with it that can do exactly what you're trying to do from the sound of it. It will monitor a Vault folder and when changes are detected perform a get and it can even kick off your build script.
-
- Posts: 11
- Joined: Tue Nov 07, 2006 9:38 am
Re: Vault and Nant VaultDiff
Hi yes I started looking in to that a few weeks ago. I thought that if everything is there to do what I need to do then I will just write a script for it.
Re: Vault and Nant VaultDiff
I don't think the VaultDiff nant task is going to do what you need. It's going to launch the diff program of your choice to compare the two files. Here is the example, if you want to try it:
objectPathLeft can be either a diskpath or a repository path, objectPathRight changes based on what compareToOption is set to.
If the files are in a working folder, then just doing a get latest will only get the files that have changed since the last get.
Code: Select all
<project name="testSourceControl" default="testSourceControlTasks" xmlns="http://nant.sf.net/schemas/nant.xsd">
<target name="testSourceControlTasks">
<loadtasks path="C:/path/to/nanttasks/bin/" verbose="true" />
<!--Set login options: username, password, url, repository.-->
<vaultsetloginoptions user="username" password="password" URL="http://localhost/VaultService" repository="Your Repository" />
<vaultdiff diffProgram="C:\path\to\your\diff\program" diffArguments="" recursive="false" objectPathLeft="$/path/to/file/to/diff" objectPathRight="null" compareToOption="current"/>
</target>
</project>
If the files are in a working folder, then just doing a get latest will only get the files that have changed since the last get.
-
- Posts: 11
- Joined: Tue Nov 07, 2006 9:38 am
Re: Vault and Nant VaultDiff
Ok, that makes sense. It's kind of what I thought would happen. Anyway, here's the reason for looking in to this. I am building custom controls everynight. After a successful build those files are copied to a directory we like to call "CommonControls" What my ultimate goal to do is have the files in the "CommonControl" directory stored in Vault. The problem is I need to check the file out replace it with the new one and then check the files back in. The versions are all the same but vault sees them as being different. This can be confusing to the developer because it appears as though they have the wrong version when the look in Vault. They say ok I'll get the latest version but when they look they are still seeing the same version numbers. Then I get people pestering me telling me that they are doing a get latest version but it doesn't look anything different...
Oh and the reason I want them files in CommonControls stored in Vault is because we frequently visit client locations. Vault allows us to get the latest version of software through their locked down firewalls.
So for this type of scenario should I still be looking at CC?
Thanks again,
Larry
Oh and the reason I want them files in CommonControls stored in Vault is because we frequently visit client locations. Vault allows us to get the latest version of software through their locked down firewalls.
So for this type of scenario should I still be looking at CC?
Thanks again,
Larry