Challenge with history listing
Posted: Mon Jun 30, 2008 11:35 am
I'm attempting to retrieve a list of all items checked in as of a date range and am not getting back all results.
ServerOperations.client.LoginOptions.URL = "http://devsrv";
ServerOperations.client.LoginOptions.User = "user";
ServerOperations.client.LoginOptions.Password = "pass";
ServerOperations.client.LoginOptions.Repository = "dev-rep";
ServerOperations.client.AutoCommit = true;
ServerOperations.client.Verbose = true;
ServerOperations.client.LoginOptions.AccessLevel = VaultClientNetLib.VaultConnection.AccessLevelType.Admin;
ServerOperations.Login();
string filePath = "$/filepath";
StringWriter sw = new StringWriter();
System.Xml.XmlTextWriter xml = new XmlTextWriter(sw);
xml.Formatting = System.Xml.Formatting.Indented;
//Query the file history so we can view the check in.
bool bRecursive = false;
int beginVersion = -1;
int endVersion = -1;
string excludedList = "add,create,label";
string startDate = "06/01/2008";
string endDate = "06/30/2008";
VaultHistoryItem[] items = ServerOperations.ProcessCommandHistory(filePath, bRecursive, DateSortOption.desc, null, excludedList, startDate, endDate, null, null, beginVersion, endVersion, 30);
// output the history items
xml.WriteStartElement("root");
xml.WriteStartElement("History");
XmlHelper.XmlOutput(xml, items);
xml.WriteEndElement();
xml.Close();
Console.Out.WriteLine(sw.ToString());
I've checked in new items today and do not see them in the list. Any ideas would be appreciated.
ServerOperations.client.LoginOptions.URL = "http://devsrv";
ServerOperations.client.LoginOptions.User = "user";
ServerOperations.client.LoginOptions.Password = "pass";
ServerOperations.client.LoginOptions.Repository = "dev-rep";
ServerOperations.client.AutoCommit = true;
ServerOperations.client.Verbose = true;
ServerOperations.client.LoginOptions.AccessLevel = VaultClientNetLib.VaultConnection.AccessLevelType.Admin;
ServerOperations.Login();
string filePath = "$/filepath";
StringWriter sw = new StringWriter();
System.Xml.XmlTextWriter xml = new XmlTextWriter(sw);
xml.Formatting = System.Xml.Formatting.Indented;
//Query the file history so we can view the check in.
bool bRecursive = false;
int beginVersion = -1;
int endVersion = -1;
string excludedList = "add,create,label";
string startDate = "06/01/2008";
string endDate = "06/30/2008";
VaultHistoryItem[] items = ServerOperations.ProcessCommandHistory(filePath, bRecursive, DateSortOption.desc, null, excludedList, startDate, endDate, null, null, beginVersion, endVersion, 30);
// output the history items
xml.WriteStartElement("root");
xml.WriteStartElement("History");
XmlHelper.XmlOutput(xml, items);
xml.WriteEndElement();
xml.Close();
Console.Out.WriteLine(sw.ToString());
I've checked in new items today and do not see them in the list. Any ideas would be appreciated.