Hi
I'm trying to get the name of the parent branch through the TFS API.
(TFS 2010 and VS2012)
Assume a branch trunk to child1.
Input "changeset" is the changeset where a given branch is created.
ChangesetVersionSpec csv = new ChangesetVersionSpec(changeset.ChangesetId); BranchHistoryTreeItem[][] branchHistoryTree = mVersionControlServer.GetBranchHistory(new ItemSpec[] { new ItemSpec("$/Project/child1", RecursionType.None) }, csv); var treeItem = branchHistoryTree[0][0].GetRequestedItem();
if (null != branchHistoryTree[0][0].Parent)//Parent is always null
What would be the right query to perform, to get this info ?
PS
The child1 branch doesn't exist anymore, in a 2008 TFS it was moved to a new name, say "release1". I dont think that matters though, as I can read all other information of these "moved" change-sets.
Hope.....
BR Henrik.