English 中文(简体)
如何在使用TFS物体模型的工作空间归还文件版本(改动)?
原标题:How to return the version (changeset) of a file in a workspace using the TFS object model?
  • 时间:2010-06-28 05:14:31
  •  标签:
  • tfs

如何利用TFS物体模型将工作空间的档案版本(改动)归还? 我希望能够在我的工作空间通过档案,并恢复变化。

最佳回答

此处采用一般做法:

var versionControl = projectCollection.GetService<VersionControlServer>();

var item =
    versionControl.GetItem(
        "$/TeamProject/Main/Solution/Program.cs",
        new WorkspaceVersionSpec("workspace", "user"));

int changesetId = item.ChangesetId;

关键是工地物体。

问题回答

暂无回答




相关问题
Why not use TFS as a build / CI solution?

Currently our build solution is set up using TFS + MS Build scripts. TFS is also being used as a CI server. I ve seen several posts on this site telling people about other CI solutions. Are there ...

Get files from TFS under Linux [closed]

is there a free (command line) tool for linux which with I can get all files from a TFS-Repository (no Check in / Check out required - only get actual version)?

upgrading tfs 2008 sp1 to use sql server 2008

I have an instance of tfs 2008 supported by sql server 2005. I want to change the sql server machine by doing a restore based move. I also want to change the version of sql server to 2008. I know ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...

TFSReg in 2010 Beta 2?

does anybody know what is the equivalent of the TFSReg.exe command-line tool in 2010 Beta 2? I cannot find it anywhere, I searched the entire Program Files tree. Was it renamed? Moved? Replaced by ...

热门标签