List Source Control Files and Folder under a given TFS Path (without work-space mapping)

牧云@^-^@ 提交于 2019-12-06 13:29:39

问题


I'm redesigning a control that lists the contents (files and folders) under a given TFS path. The tricky part is that I don't want to create a workspace for achieving this, as my intention is just to list the contents and display the history of a selected item. The current implementation creates a local workspace mapping in the background to achieve this, is this needed? Can I attain this without a local workspace mapping?

Thanks Joe.


回答1:


Use GetItems, which does not require a workspace. For example:

TeamFoundationServer tfs = new TeamFoundationServer("http://tfs:8080/tfs/DefaultCollection");   
VersionControlServer versionControl = tfs.GetService<VersionControlServer>();   
ItemSet items = versionControl.GetItems(tfsPath, RecursionType.Full);


来源:https://stackoverflow.com/questions/26505190/list-source-control-files-and-folder-under-a-given-tfs-path-without-work-space

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!