Programatically checkout a file in TFS 2010

2019-06-05 16:43发布

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?

1条回答
兄弟一词,经得起流年.
2楼-- · 2019-06-05 17:18

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

查看更多
登录 后发表回答