Folder Rename and VaultHistoryItem
Posted: Tue Aug 31, 2010 3:23 pm
Hello,
We are having a problem when parsing through the Vault history items supplied by the API.
The issue we are having resolves around renamed folders.
It appears that renaming a folder at a given point in time pushes that folder name change back through the past history, obliterating the history of the original folder name.
Here are the steps taken in Vault to recreate an example case:
In a given repository:
Create a folder named NewFolder
Inside that folder we add a file named NewFile.txt and Check it in
We rename that file from NewFile.txt to code.txt
We rename the folder NewFolder to Source.
resulting in the following folder/file structure... Source/code.txt
Now, through the API, we get a list of all the VaultHistoryItems using ProcessCommandHistory.
What we find when looping over these items is, that when we come to the item with a VaultHistoryType of Renamed (170), for the rename of "NewFolder/NewFile.txt" to "NewFolder/code.txt", the item details are thus:
Name = "parentfolders/Source/code.txt"
HistoricName = "parentfolders/Source/code.txt"
MiscInfo1 = "code.txt"
MiscInfo2 = "NewFile.txt"
This is somewhat bewildering, as at the time of the file rename, the folder it was in was named NewFolder, not "Source". "Source" is the name of the folder in the future! Is this the intended behavior?
When we view the history in the vault client, we also notice that any reference to "NewFolder" is now renamed "Source", from the point that the folder was created to the point that it was ACTUALLY renamed, it is listed as "Source".
Is this a bug?
Is there any way to get the actual path at the point in time that file was renamed?
We are having a problem when parsing through the Vault history items supplied by the API.
The issue we are having resolves around renamed folders.
It appears that renaming a folder at a given point in time pushes that folder name change back through the past history, obliterating the history of the original folder name.
Here are the steps taken in Vault to recreate an example case:
In a given repository:
Create a folder named NewFolder
Inside that folder we add a file named NewFile.txt and Check it in
We rename that file from NewFile.txt to code.txt
We rename the folder NewFolder to Source.
resulting in the following folder/file structure... Source/code.txt
Now, through the API, we get a list of all the VaultHistoryItems using ProcessCommandHistory.
What we find when looping over these items is, that when we come to the item with a VaultHistoryType of Renamed (170), for the rename of "NewFolder/NewFile.txt" to "NewFolder/code.txt", the item details are thus:
Name = "parentfolders/Source/code.txt"
HistoricName = "parentfolders/Source/code.txt"
MiscInfo1 = "code.txt"
MiscInfo2 = "NewFile.txt"
This is somewhat bewildering, as at the time of the file rename, the folder it was in was named NewFolder, not "Source". "Source" is the name of the folder in the future! Is this the intended behavior?
When we view the history in the vault client, we also notice that any reference to "NewFolder" is now renamed "Source", from the point that the folder was created to the point that it was ACTUALLY renamed, it is listed as "Source".
Is this a bug?
Is there any way to get the actual path at the point in time that file was renamed?