vaultpro 5.1.2 HISTORY command vault.exe

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

Moderator: SourceGear

Post Reply
mikemu
Posts: 5
Joined: Wed Nov 21, 2012 4:44 pm

vaultpro 5.1.2 HISTORY command vault.exe

Post by mikemu » Wed Nov 21, 2012 4:48 pm

I have several modules with a "prod" label that i want to find (*i added it in the gui)

without -endlabel -beginlabel i get a return data set, with i get the error below.

I can't find anything in support that indicates this is an issue

Y:\Scripts.Vault>vault.exe HISTORY -host localhost -user mikemu -repository ICI $/ -beginlabel prod -endlabel prod

<vault>
<!--The label prod could not be found.-->
<history>
<error>
<exception>System.NullReferenceException: Object reference not set to an instance of an object.
at VaultClientIntegrationLib.XmlHelper.XmlOutput(XmlWriter xml, VaultHistoryItem[] histitems)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg)
at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)</exception>
</error>
<result>
<success>False</success>
</result>
</history>

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

Re: vaultpro 5.1.2 HISTORY command vault.exe

Post by Beth » Thu Nov 22, 2012 9:25 am

To just find a label "prod" you need to use the label command and provide the location that label was applied at and not just give $ (unless it was applied at $).

I can log a feature request though.
Beth Kieler
SourceGear Technical Support

mikemu
Posts: 5
Joined: Wed Nov 21, 2012 4:44 pm

Re: vaultpro 5.1.2 HISTORY command vault.exe

Post by mikemu » Mon Nov 26, 2012 12:56 pm

I want to generate a list of files that have a "prod" label

During builds we get a list of all checked out modules, pin them at the "prod" version, then do a "get" on that delta of files.

You idea requires i already know what files to ask .... any other ideas?

VSS also supports labeling with an already used label, i.e. labeling "prod" when it already exists, so that the "prod" label moves when the source is checked in and built

These are 2 critical functions to our build processing, and is stopping our VSS migration

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

Re: vaultpro 5.1.2 HISTORY command vault.exe

Post by Beth » Mon Nov 26, 2012 1:56 pm

Is there a problem with using -beginlabel and -endlabel as you were initially doing to generate your list?

You can reuse a label if you delete the previous label of that same name.
Beth Kieler
SourceGear Technical Support

mikemu
Posts: 5
Joined: Wed Nov 21, 2012 4:44 pm

Re: vaultpro 5.1.2 HISTORY command vault.exe

Post by mikemu » Mon Nov 26, 2012 4:31 pm

note the lack of output and the error it causes. begin/end label doesn't work

is any of this fixed in v6?

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

Re: vaultpro 5.1.2 HISTORY command vault.exe

Post by Beth » Mon Nov 26, 2012 5:03 pm

I don't think a situation like this has come up before, so there wouldn't be anything different in the latest version as far as I know right now. Let me do a little more research and check with rest of the team, and I'll post back.
Beth Kieler
SourceGear Technical Support

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

Re: vaultpro 5.1.2 HISTORY command vault.exe

Post by Beth » Mon Nov 26, 2012 5:15 pm

One thing you could try is vault history -includeactions label $. That will get you everything, but then you could parse out the stuff you don't want.
Beth Kieler
SourceGear Technical Support

mikemu
Posts: 5
Joined: Wed Nov 21, 2012 4:44 pm

Re: vaultpro 5.1.2 HISTORY command vault.exe

Post by mikemu » Mon Nov 26, 2012 5:38 pm

5.1.1 doesn't have vault history -includeactions, just -excludeactions

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

Re: vaultpro 5.1.2 HISTORY command vault.exe

Post by Beth » Wed Nov 28, 2012 3:41 pm

At this point, the options I see are to either upgrade to Vault 6.0 so that you can use the Vault -includeactions or use the -excludeactions and exclude all but label.
Beth Kieler
SourceGear Technical Support

mikemu
Posts: 5
Joined: Wed Nov 21, 2012 4:44 pm

Re: vaultpro 5.1.2 HISTORY command vault.exe

Post by mikemu » Tue Dec 04, 2012 5:54 pm

Previous question ....

"note the lack of output and the error it causes. begin/end label doesn't work, is any of this fixed in v6? "


So if i upgrade to V6 does begin label/end label work ?

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

Re: vaultpro 5.1.2 HISTORY command vault.exe

Post by Beth » Wed Dec 12, 2012 11:58 am

The beginlabel/endlabel commands also only work on the location that the label was applied at. They aren't recursive. The way they work in the command line is the same way they work in the Vault GUI client.

Even if they were recursive, since you are reusing the same label, I don't think you would get the results you are looking for.

I can put in a feature request for something like a List Label command.
Beth Kieler
SourceGear Technical Support

Post Reply