Is Working Folder State Info shared by GUI & CommandLine

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

Moderator: SourceGear

Locked
Nick.Wegner
Posts: 2
Joined: Wed Jan 10, 2007 10:40 am
Location: Overland Park, KS

Is Working Folder State Info shared by GUI & CommandLine

Post by Nick.Wegner » Wed Jan 10, 2007 1:40 pm

I have been using nant to call the vault commandline via a exec task.

I was having issues w/ trying to Get Lastest files from Vault via the command line.

I was previously using -destpath and realized that ignores working folder info.

I then removed that parameter but I was getting Unknown working folder.

So I set working folder w/ a SETWORKINGFOLDER.

I noticed that the command line only thought that the 2 repository directories that I had called SETWORKINGFOLDER on, were being listed as having working folders set.

Also from commandline calling LISTWORKINGFOLDERS only showed the 2.

The problem is that I have set Working Folders on at least 2 other repository folders through the GUI and all folders in the GUI inherit from the roots working folder. (They have not been force inherited just have the folder w/ (inherited) behind it)

They don't show in the LISTWORKINGFOLDERS listing.

The root of my question stems from the fact that I would like that if I have checked out a file (either by GUI or from Visual Studio Integration) and I have it checked out, I want to be able to run the nant script and it will get all files that are currently old but will not mess w/ my checked out file.

I can do this with the GUI by doing a Get Latest and Merge Later.

I also eventually added the -workingfolder ... to my commandline parameters and w/ a -merge overwrite it gets only the changed files but it a) overwrote a locally modified file w/o checkout from vault (somewhat ok)
b) overwrote a checked out & modified file. (Not ok)
c) After overwriting from the commandline the GUI thinks that I need to merge the file.

we would like a get latest on all old files & potentially renegade files while leaving checked out files alone from command line and then refreshing the GUI shows that they are updated.

So it seems that the working folders state info is not shared between the GUI and the command line interface.

If that is true, can I make them share?

If not is there something I am doing wrong w/ the command line args.

Here is the exec task
<exec basedir="." program="${VaultExe}"
commandline="GET ${VaultProjectDir} -verbose
-backup ${VaultBackup}
-merge ${VaultMerge}
-setfiletime ${VaultSetFileTime}
-host ${VaultURL}
-username ${VaultUID}
-password ${VaultPWD}
-repository ${VaultRepository}
-workingfolder ${FullSourcePath} " />

VaultUID=admin
VaultPWD=[our pass]
VaultExe=c:\progra~1\sourcegear\vaultc~1\vault.exe
VaultURL=[our url]
VaultBackup=yes
VaultMerge=overwrite
VaultSetFileTime=modification
VaultProjectDir=$/Trunk/Scripts
VaultRepository=[Our repository]
FullSourcePath=c:\products\fspv3\trunk\scripts

w/ the file retrieved from history version 5 current is version 7
VaultMerge=automatic
VaultMerge=later
neither get the latest version.

Thanks for your help.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Thu Jan 11, 2007 11:49 am

What version of Vault are you using?

I ran some checks on how the working folders would work between command line and GUI and did not come up with the same results, but I was using Vault 3.5.1.
1. I checked that the Get command uses the working folder in GUI by default.
2. I performed a Get using –destpath, and then I performed another Get afterwards without the –destpath and it returned to the working folder that was set for it in the GUI.
3. I used Setworkingfolder. Then performed a list working folders. The listworkingfolders did list the one I set at root via the GUI as well as the new one on the cmd line.
5. I returned to the GUI and set 2 more working folders, returned to the command line, and ran listworkingfolders, and saw everything I did previously and the ones I just set.

With the overwrite option, Vault doesn't check to see if it's overwriting changes, it just does the overwrite, so unless you're sure that's what you want, you may wish to avoid it. I also don't get the same result with the overwrite. The GUI didn't complain.

Was your GUI possibly open at the same time as when you run the command line? Since they access the same cache, that may be confusing it. Are other people working with the files at the same time that you are trying things out? If a different user uploaded a change, you would see a needs merge.

Nick.Wegner
Posts: 2
Joined: Wed Jan 10, 2007 10:40 am
Location: Overland Park, KS

Post by Nick.Wegner » Thu Jan 11, 2007 11:25 pm

I realized that what I was doing dumb is that I was using my id for the Vault Client and I was using the Build Server Id for my Nant scripts I had moved locally to my machine.

After I fixed the nant script to use the same id as the Vault GUI Client I got the list of Working directories that I should see from Vault GUI as well as the file behavior worked better as well.

Sorry for the dumb question.

Thanks for your help

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Fri Jan 12, 2007 11:31 am

I wouldn't consider that dumb. Besides, you're a Vault user, so you can consider yourself pretty smart. :wink:

Locked