Tuesday 15 April 2014

c# 4.0 - get old item name for renamed files using TFS API -


My current tfs will be retired in the next few months. I'm using tfs api to create parallel tfs on a new server. I have an existing folder and the solution that has been renamed. I am repeating items and based on their variable types (Add, Edit, Delete, Sources, etc.), I am checking them at destination TFS.

I am not able to get the old filename for a file, when the item is being threaded to use the penderer, then Delete | SourceRename or Rename.

I mentioned the solution:

However, there have been a lot of changes in my changes and therefore it seems difficult to identify a particular file.

Do we have something that is repeated in two objects (deleted and rename) apart from the changes, because there is a need to be a specific identifier that is connected to two objects so that they can be used together with TFS See history together?

I read it somewhere and modify it for my purpose so that I could get a given server item Can get the original branch for:

ItemSpec itemSpec = new ItemSpec (serverItem, RecursionType.None);

BranchHistoryTreeItem [] [] Results = sourceTFSHelper.VCS.GetBranchHistory (new item Spec [] {itemSpec}, VersionSpec.Latest); BranchHistoryTreeItem [] thisBranchResults = Result [0]; Foreach (BranchHistoryTreeItem treeItem results in this branch) (ITEM = FindRequestedItem (treeItem) requested by Branch; if (requestItem! = Null) {return (requestItem.BranchFromItem == empty)? Empty: Requested item.BrunchFrame Item.Service item;} }

No comments:

Post a Comment