开发者

TFS Get latest Version from Specific Folder

I want to create at button to get latest Version of my code from a specific folder w开发者_如何学Cithout using Team Explorer -> Source Control tree every time.

So I am trying to make and external tools reference to run the tf.exe get command.

This is what I have so far.

TFS Get latest Version from Specific Folder

When I run this is gives me this error:

Unrecognized command option 'workspace'

I cant figure out how to provide the workspace name?


You can omit the workspace name. tf.exe can resolve the server path and local path mappings because it stores workspace information locally.

The command you gave is correct (assuming you have $/Dev mapped):

tf.exe get /recursive $/Dev

However it's critical that you have $/Dev mapped directly (not just having children mapped) and unambiguously (you cannot have $/Dev mapped in two different workspaces) or else tf.exe will not be able to determine the correct local path.

Since a given local path can only be mapped to a single server path, the easiest way to do this is simply by specifying the local path you wish to get. For example:

tf.exe get /recursive C:\Dev

Again, this assumes that you have $/Dev mapped to C:\Dev.


Command to get latest is

tf get /force /recursive /version:W<workspacename>

1 thing to be noticed is the workspace which you have not provided in the Initial Directory text box. Provide some path where it will download local copy of files (i.e. nothing but called workflow). Provide some path like C:\TFS\Apps


Aside from the answer that Mrchief gave: if you install the TFS power tools you can use the contextmenü in windows-explorer to check-in/out, etc.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜