Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you create new windows workspace with TFS command line client that is running on unix

How would I work with the TFS command line client that is running on a aix/unix box to run the tf commands. For example I'm unable to create local windows workspaces that connect to the tfs version control folders that are on a windows server. The version of command line client that is running on the unix box is (/TFS/TEE-CLC-12.0.0). I can't find any documentation how the client can be used when running on unix to connect local windows files to the version control files on a server.

like image 782
jjohnston Avatar asked Feb 12 '14 23:02

jjohnston


People also ask

What is the command line statement to edit workspace settings in TFS?

To make the current directory a working folder for an existing workspace on your computer, type tf workspace workspacename, where workspacename is the name of the existing workspace. The Edit Workspace dialog box appears.

What is TFS workspace?

You use the TFS workspace to map a local working folder on your PC to a Source Control Folder within a TFS project repository.


1 Answers

Getting source files down from the server requires three steps on any platform:

  1. Create a workspace on your server. A workspace is what contains the metadata about the files you want on the server and the files you have locally.

    (Technically, you don't create a workspace on the server, you do it on a Team Project Collection which is a logical unit in the server; by default you have a single Team Project Collection on your server called - uncreatively - "DefaultCollection".)

  2. Create one or more working folder mappings that indicate the server's file paths you want to get, and where to put them on your local disk. For an uncomplicated project, this is as simple as mapping $/Project/Folder to C:\Project\Folder or /project/folder.

  3. Do a get, to download the files from the server, placing them in the local folders you configured in step 2.

For example, I have a cross-platform project which happens to be Team Explorer Everywhere itself. In this case my server is https://tee.visualstudio.com/DefaultCollection. My source is located on the server at $/TEE/Main. And I want to place it on my AIX box is /build/tee/main.

Neither the server nor the server folder change because I'm not on Windows. The only thing that changes is - unsurprisingly - the local path. I'll walk through these steps on my AIX 5.2 box:

  1. Create a workspace:

    ethomson@aix:~% tf workspace -new MyWorkspace -collection:https://tee.visualstudio.com/DefaultCollection
    Workspace 'MyWorkspace' created.
    
  2. Create a working folder mapping from $/TEE/Main to /build/tee/main:

    ethomson@aix:~% tf workfold -map '$/TEE/Main' /build/tee/main -collection:https://tee.visualstudio.com/DefaultCollection -workspace:MyWorkspace 
    
  3. Get the files. (Now that you have configured a working folder mapping, you do not need to specify the server URL or the workspace name as long as you specify the local path.)

    ethomson@aix:~% cd /build/tee/main
    ethomson@aix:/build/tee/main% tf get -recursive .
    /build/tee:
    Getting main
    
    /build/tee/main:
    Getting build
    
    /build/tee/main/build:
    Getting .project
    Getting .settings
    ...etc...
    
like image 143
Edward Thomson Avatar answered Oct 05 '22 06:10

Edward Thomson