Get folder history

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

Moderator: SourceGear


Posts: 3
Joined: Mon May 09, 2011 9:37 am
PostPosted: Mon May 09, 2011 9:44 am
Hi,

I am very new to sourcegear. I just want to get the current folder history. How can I do that by just passing the repository path?

thank you very much.
Jack

Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear
PostPosted: Mon May 09, 2011 1:38 pm
Check the API examples here:

viewtopic.php?f=31&t=8020
Specifically:

Code: Select all
//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());
        }

        public static void WildcardTasks()
        {
            string url = "http://VaultServer/VaultService";
            string username = "username";
            string password = "password";
            string repository = "Your Repository";
Linda Bauer
SourceGear
Technical Support Manager

Return to Examples (API)

Who is online

Users browsing this forum: No registered users and 2 guests