Display GUI history dialog for file from command line

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

Moderator: SourceGear

Post Reply
jake.almer
Posts: 2
Joined: Thu Oct 04, 2012 5:39 am

Display GUI history dialog for file from command line

Post by jake.almer » Thu Oct 04, 2012 5:44 am

I really miss the windows explorer integration provided by TortoiseSVN so I have implemented a few simple commands myself in the explorer context menu for vault. I have the checkin/checkout all working fine but it would really nice if I could display the history dialog from the GUI. Before I go about whipping up my own basic dialog there's not some command line way of getting to that dialog is there?

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

Re: Display GUI history dialog for file from command line

Post by Beth » Thu Oct 04, 2012 7:32 am

All of our command-line commands are listed here: http://download.sourcegear.com/misc/vau ... nt/clc.htm. History is http://download.sourcegear.com/misc/vau ... tm#HISTORY.

Command-line command examples can be found in a KB article: http://support.sourcegear.com/viewtopic ... 13&t=15235.
Beth Kieler
SourceGear Technical Support

jake.almer
Posts: 2
Joined: Thu Oct 04, 2012 5:39 am

Re: Display GUI history dialog for file from command line

Post by jake.almer » Thu Oct 04, 2012 9:25 am

Ok.... like I said is there a way to get to the GUI history dialog. The vault.exe HISTORY command returns a XML dump of the history.

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

Re: Display GUI history dialog for file from command line

Post by Beth » Thu Oct 04, 2012 9:55 am

Sorry, I missed that.

You might need to use the Vault API to bring up something like that. We have an entire section of the forum devoted to working with the client API that has multiple examples both in the Knowledge Base area and in the area where others have asked questions: http://support.sourcegear.com/viewforum.php?f=39.

For example, here's a snippet for outputting a file history in C# (http://support.sourcegear.com/viewtopic.php?f=31&t=8020):

//Query the file history so we can view the check in.
bool bRecursive = false;
int beginVersion = -1;
int endVersion = -1;
VaultHistoryItem[] items = ServerOperations.ProcessCommandHistory(filePath, bRecursive, DateSortOption.desc, null, null, VaultDate.EmptyDate().ToString(), VaultDate.EmptyDate().ToString(), null, null, beginVersion, endVersion, 10);

// output the history items
xml.WriteStartElement("root");

xml.WriteStartElement("History");
XmlHelper.XmlOutput(xml, items);
xml.WriteEndElement();

xml.Close();
Console.Out.WriteLine(sw.ToString());
}
Beth Kieler
SourceGear Technical Support

Post Reply