简体   繁体   English

比较TFS中的文件夹

[英]Compare Folders in TFS

I'm using TFS and C# and I want to programmatically get a list of files that have changed between 2 different folders. 我正在使用TFS和C#,我想以编程方式获取在两个不同文件夹之间发生更改的文件列表。
I want to be able to enter the path & label, just like the Compare option in the Source Control Explorer in Visaul Studio. 我希望能够输入路径和标签,就像Visaul Studio中Source Control Explorer中的Compare选项一样。
thanks, John. 谢谢,约翰。

The API you're looking for is in Microsoft.TeamFoundation.VersionControl.Controls.FolderDiff. 您正在寻找的API位于Microsoft.TeamFoundation.VersionControl.Controls.FolderDiff中。 Unfortunately it's marked internal-only. 不幸的是,它标记为仅限内部。 You'll have to bust open Reflector and access it the "fun" way. 你必须打开Reflector并以“有趣”的方式访问它。

Alternatively, you could parse the output of tf.exe folderdiff $/folder1 $/folder2 . 或者,您可以解析tf.exe folderdiff $ / folder1 $ / folder2的输出

thanks for the answer, however the API you suggested is internal. 谢谢你的答案,但你建议的API是内部的。

I was able to find an great example of how to do this called Diffing two trees in TFS version control 我能够找到一个很好的例子,说明如何在TFS版本控制中使用Diffing两棵树

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM