Is it possible?

Examples of programs integrating with Vault and Fortress API. Also, information on integrating with NAnt, CruiseControl.Net and other third-party tools

Moderator: SourceGear

Post Reply
Tom888
Posts: 4
Joined: Wed Oct 26, 2011 9:39 am

Is it possible?

Post by Tom888 » Wed Oct 26, 2011 9:59 am

Before I start, I would like to know if this is possible:

1) Application that can read the file names that I have on my local computer and get my local version number. I plan to save the results to a simple text file. The Vault Client lists the file versions on the local machine but I havent found a command to use to do this programatically.

2) Application that reads the text file generated in step 1 and Gets each file at the specified version. This seems possible using the commands that I saw in the API.

Thanks.

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

Re: Is it possible?

Post by lbauer » Wed Oct 26, 2011 4:20 pm

The Vault Command Line Client has a Listfolder command that will get the contents and status of files in the working folder.

http://download.sourcegear.com/misc/vau ... LISTFOLDER

However the version it returns is the Remote, or server version. So if your files are pinned to an earlier version the report will show those pinned version numbers. But if you did a GET of an old version to the working folder, it does not list the version of the actual file on disk.

Perhaps if you could tell us what your ultimate goal is, we would have some suggestions.
Linda Bauer
SourceGear
Technical Support Manager

Tom888
Posts: 4
Joined: Wed Oct 26, 2011 9:39 am

Re: Is it possible?

Post by Tom888 » Fri Dec 16, 2011 7:38 am

Often I have a collection of files that are not the latest or the pinned versions. I find that this particular collection of files works so I want to save that collection. I tried labeling them but that is difficult because the files are in a dozen different folders. The other reason to be able to store the version numbers and retrieve those files later is to work with another person. I get to a particular point on my computer and another person wants to pick up from there. When I logout, make a copy of the VM and send it to them, they login and have to create their own working directory. Their working directory now has the correct files but the relationship to the repository is broken. In either case I have been creating lists on paper or screen shots (dozens) to recreate these collections.

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

Re: Is it possible?

Post by lbauer » Tue Dec 20, 2011 8:59 am

You might be able to use the Shelve feature for this.

Shelve allows you to create shelvesets from items in the Pending Change set that you store in the database. The Pending Change set has Checkouts, Adds, and other uncommitted transactions. All this can be shelved.

You can undo any changes in the working folder, then later you can unshelve that shelveset at any time to get the working folder contents back to what they were before.

For this to work in your case, you would need to checkout any files that you want to put into the shelveset. You can make modifications to the files if you wish. To include older versions of files in the shelveset, go into file history and Checkout the older versions of the files you want.

You colleague can unshelve your shelveset and get your set of older files and file modifications into their working directory.

Note: Shelve is a feature of Vault 5.0 and later versions.
Linda Bauer
SourceGear
Technical Support Manager

Tom888
Posts: 4
Joined: Wed Oct 26, 2011 9:39 am

Re: Is it possible?

Post by Tom888 » Tue Dec 20, 2011 10:15 am

Sounds way complicated.

Is there any way for me to get the version numbers of the files in my working folder?

Tom888
Posts: 4
Joined: Wed Oct 26, 2011 9:39 am

Re: Is it possible?

Post by Tom888 » Tue Dec 20, 2011 10:27 am

I just thought of a simple solution. Simple for me at least.

Allow the Client to export a text file of what in on the screen. I could read that and use it to get the version numbers of the files in each folder.

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

Re: Is it possible?

Post by lbauer » Tue Dec 20, 2011 10:31 am

We have feature 13483 request logged for the ability of the Command Line Client to list file versions in the working folder; I'll add your vote.

It will be evaluated for an upcoming release of Vault.

Also, if you use the ListFolder command with the Command Line Client it will list the versions of files that you did a GET on from history, etc.

Thanks for your feedback!
Linda Bauer
SourceGear
Technical Support Manager

Post Reply