Lets say I have an Item-Id or ServerItem (path). I need to know, where this Item has been moved
Current and old locations. How do I acchieve this with given Information on Serverside ?
Visual Studio can display all locations when you display the history of an item.
I tried versioncontrol.QueryHistory, however this only returns the history of the current itemid. Moving a file does change the itemid but i dont know how to get the different ids.
Querying merges doesnt seem to work either.
Lets say I query for ItemId 1234, i want the result to be something like this:
- ItemId 1789 ServerItem $/somwhere/path1/hadTobeRenamedAsWell.cs //newest
- ItemId 1234 ServerItem $/somwhere/path2/item.cs
- ItemId 1200 ServerItem $/somwhere/path3/item.cs
- ItemId 1001 ServerItem $/somwhere/path4/item.cs // oldest
If this doesnt work serverside, does it on clientside?
This is the method i use to obtain the Items
private static TeamFoundationDataReader queryVersionControl(
TeamFoundationRequestContext requestContext,
TeamFoundationVersionControlService versionConrol,
IEnumerable<string> items,
string workspaceName,
string workspaceOwnername)
{
return versionConrol.QueryItems(requestContext,
workspaceName,
workspaceOwnername,
items.Select(i => new ItemSpec(i, RecursionType.None)).ToArray(),
new LatestVersionSpec(),
DeletedState.Any,
ItemType.File,
false,
0);
}