开发者

Programatically checkout a file in TFS 2010

I have a program which create a new branch when I give it the required arguments.

After creating the new branch, I would like to check-out a project file, add some post-build events, and then check it in again.

开发者_运维技巧How can I do that?


You need to use the workspace method, PendEdit(string Path) http://msdn.microsoft.com/en-us/library/bb139369.aspx

So you could do this,

GetStatus status = workspace.Get(new GetRequest("FilePath", RecursionType.None, VersionSpec.Latest),GetOptions.Overwrite);
workspace.PendEdit("FilePath");

HTH Cheers, Tarun

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜