尝试使用 TFS 查看项目上的给定文件名及其行号来了解代码的编写者
我正在尝试编写一个使用 TFS API 的小型应用程序。
我将有一个方法,该方法采用三个参数,例如项目名称、文件名和行号。然后它给了我编写该部分代码的人的名字。
public string GetProgrammer(string projectname, string file, int linenumber)
{
//implementation
return programmerName;
}
我对 TFS API 进行了一些搜索,但找不到解决此问题的确切信息。 TFS API 是否提供此信息?
提前致谢,
I am trying to write an small application that will use TFS API .
I will have a method and this method takes three parameters such as project name, filename, and the line number. Then it gives me the name of the person who wrote that part of code.
public string GetProgrammer(string projectname, string file, int linenumber)
{
//implementation
return programmerName;
}
I have made some search for TFS API but I couldnt find an exact information to solve this problem. Does TFS API provide this information ?
Thanks in advance,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
很好的问题。但是,没有直接的方法可以用来执行此操作。相反,您需要执行以下操作,
一些悬而未决的问题,
- 在文件开发过程中,同一行或同一代码块多次被多个用户修改。你打算如何处理这个问题?
查看这些博客文章,它们可能会帮助您开始连接到 TFS、使用 versionControlServer 获取文件的更改集并循环更改集。 http://geekswithblogs.net/TarunArora/category/12804.aspx
HTH
干杯,塔伦
Excellent Question. However, there is no direct method you could use to do this. Instead you will need to do the following,
Some outstanding questions,
- Several times, the same line or rather the same block of code is modified by several users in the development of a file. How to you plan to handle that?
Look at these blog posts that might help you get started on connecting to TFS, using the versionControlServer to get changesets for a file and loop through changesets. http://geekswithblogs.net/TarunArora/category/12804.aspx
HTH
Cheers, Tarun