列出给定 TFS 路径下的源控制文件和文件夹(没有工作空间映射) [英] List Source Control Files and Folder under a given TFS Path (without work-space mapping)

查看:23
本文介绍了列出给定 TFS 路径下的源控制文件和文件夹(没有工作空间映射)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在重新设计一个控件,用于列出给定 TFS 路径下的内容(文件和文件夹).棘手的部分是我不想创建一个工作区来实现这一点,因为我的目的只是列出内容并显示所选项目的历史记录.当前的实现在后台创建了一个本地工作区映射来实现这一点,这需要吗?我可以在没有本地工作区映射的情况下实现这一点吗?

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?

谢谢乔.

推荐答案

使用 GetItems,不需要工作区.例如:

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);

这篇关于列出给定 TFS 路径下的源控制文件和文件夹(没有工作空间映射)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆