How to Extract Vault Path

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

Moderator: SourceGear

Post Reply
jkonline
Posts: 33
Joined: Mon Mar 23, 2009 7:03 am

How to Extract Vault Path

Post by jkonline » Thu Aug 30, 2012 9:19 am

We have a few versions of our code, the trunk and set of branches.

When the build machine gets the latest of the files it will always place them in the same location no matter if it gets the truck or branch.

We cannot add a unique file to the branch or trunk as they are merged regularly

Is there a way inside the code to determine or print where the file was retrieved from in vault?

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

Re: How to Extract Vault Path

Post by lbauer » Thu Aug 30, 2012 10:00 am

You could try the Keyword Expansion feature. Keywords allow you to specify strings in your source control files that get expanded to contain dynamic content in the file when retrieved to a client.

There are several Keywords, such as $Author: $, $Date: $, $Revision: $, etc.

The $Archive: $ keyword expands to show the file path in the repository.

I enabled keyword expansion in the Vault Admin Web Client.

Then I typed $Archive: $ into a file, edited and checked it in. The keyword expanded to:

Code: Select all

$Archive: /TestFolder/Admin_Help.txt $
Keywords must be enabled in the Admin Web Client before they will work on files. Also, they only work on mergeable (not binary) file types that are specified in the Admin Web Client.

You can enable keyword expansion in the Admin Web Client under Source Control Repositories->(Repository name)->Keyword Expansion.

You can get complete information in the Vault Admin Web Client Help or online at this link.
http://download.sourcegear.com/misc/vau ... thelp.html
Look under Source Control Repositories->Keyword expansion.

In the Vault GUI Client Help, the information is under Contents->Reference Guide->Keyword Expansion.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply