Are the possible values for HistItemType in VaultHistoryItem (and other fields) found by calling ServerOperations.ProcessCommandHistoryEx() listed anywhere? I'm trying to use this list but I'm not sure what the values are supposed to mean.
HistItemType
10 = Add Child (MiscInfo1 has name of child, Name is a folder of course (type 1))
20 = ? possible move ? (MiscInfo1 has old full path, MiscInfo2 has new full path?)
30 = Share? See txid 13620;;
60 = Modify
70 = Add
80 = Delete Child (MiscInfo1 has name)
90 = Label (TxId is 0, MiscInfo1 has label text)
170 = Rename?
HistItemType reference?
Moderator: SourceGear
Re: HistItemType reference?
If you are looking to view history, then this should provide you with what you need.
//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();
If you're looking to do something else, they please describe further.
//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();
If you're looking to do something else, they please describe further.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: HistItemType reference?
Thanks for the quick response. That's the method I'm using, I just don't know what the values mean in the HistItemType field in the results. I think I know what those ones above mean, but I also see there are some history items with HistItemType values of 40, 120, 130, 150, 160, 180, 190, 220 and 230 and I have no clue what those mean.
I am hoping to be able to replay history of what happened in Vault. We are going through and checking to see if any passwords were inadvertently checked it and might re-create history for a project in a new folder with those passwords and keys removed in preparation for making the source code (and history) for our project more widely available. We may also want to remove some shared folders as they are their own projects and can be gotten separately.
I though about using ProcessCommandVersionHistory() and walking through the distinct versions of the main folder, then using ProcessCommandGetBranchStructure() for each version and manually figuring out what has changed and doing the appropriate change and checking in if there are any changes (I might ignore a version if there are changes only in a shared subfolder I don't care about). If I can just figure out what all those values are, I think ProcessCommandHistory() will be what I need though. I can just walk through that history and do each thing (add this file, delete this file, etc) and ignore it if the Name is in a subdirectory I want to ignore.
I am hoping to be able to replay history of what happened in Vault. We are going through and checking to see if any passwords were inadvertently checked it and might re-create history for a project in a new folder with those passwords and keys removed in preparation for making the source code (and history) for our project more widely available. We may also want to remove some shared folders as they are their own projects and can be gotten separately.
I though about using ProcessCommandVersionHistory() and walking through the distinct versions of the main folder, then using ProcessCommandGetBranchStructure() for each version and manually figuring out what has changed and doing the appropriate change and checking in if there are any changes (I might ignore a version if there are changes only in a shared subfolder I don't care about). If I can just figure out what all those values are, I think ProcessCommandHistory() will be what I need though. I can just walk through that history and do each thing (add this file, delete this file, etc) and ignore it if the Name is in a subdirectory I want to ignore.
Re: HistItemType reference?
Check the VaultLib.VaultHistoryType members or use VaultHistoryType.GetHistoryTypeName(int) to convert the history types to their English strings.jgoemat wrote:Thanks for the quick response. That's the method I'm using, I just don't know what the values mean in the HistItemType field in the results. I think I know what those ones above mean, but I also see there are some history items with HistItemType values of 40, 120, 130, 150, 160, 180, 190, 220 and 230 and I have no clue what those mean.
Jeff Clausius
SourceGear
SourceGear
Re: HistItemType reference?
EXACTLY what I was looking for (except it doesn't have type 230 which I'll ignore, using Vault 6.1), thanks!jclausius wrote: Check the VaultLib.VaultHistoryType members or use VaultHistoryType.GetHistoryTypeName(int) to convert the history types to their English strings.
Re: HistItemType reference?
If you can browse VaultLib's VaultHistoryType, it should list all types by property. In any case, I believe 230 may be Rollback.
Jeff Clausius
SourceGear
SourceGear