26.04.2015 Views

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Accessing Version Control<br />

• Consider using command-line tools.<br />

• Use <strong>Team</strong> <strong>Foundation</strong> Power Tools to unshelve a change.<br />

• Use <strong>Team</strong> <strong>Foundation</strong> Power Tools to roll back a change.<br />

• Use <strong>Team</strong> <strong>Foundation</strong> Power Tools to work offline.<br />

• Use <strong>Team</strong> <strong>Foundation</strong> Power Tools to get a changeset.<br />

• Use <strong>Team</strong> <strong>Foundation</strong> Power Tools to remove pending edits.<br />

Consider Using Command-Line Tools<br />

For operations not available from <strong>Visual</strong> <strong>Studio</strong>, or if you need to schedule operations,<br />

consider using command-line tools such as the <strong>Team</strong> <strong>Foundation</strong> Power Tools (Tfpt.exe)<br />

that are provided <strong>with</strong> <strong>Team</strong> <strong>Foundation</strong> <strong>Server</strong> (TFS). The Tfpt.exe tools are available as<br />

a separate download. You can use these command-line tools to schedule operations by<br />

using the Windows Task Scheduler.<br />

To ensure that the appropriate path and other environment variables are set up, run Tf.exe<br />

from the <strong>Visual</strong> <strong>Studio</strong> 2005 Command Prompt window, or run the Vsvars32 batch file,<br />

which is normally located in DriveLetter:\Program Files\Microsoft <strong>Visual</strong> <strong>Studio</strong><br />

8\Common7\Tools. The Tf.exe tool supports most source control commands including<br />

Checkin, Checkout, Get, History, Shelve, Branch, Merge, Label, Status, Undelete,<br />

and Undo.<br />

The following are common operations you might want to execute from the command line<br />

by using Tf.exe:<br />

• Synchronize files from the server to your local machine – tf get<br />

• Add a file to the server – tf add<br />

• Check out a file for editing – tf checkout<br />

• Check in pending changes – tf checkin<br />

• Retrieve a particular changeset from the server – tf get /version<br />

There are certain operations that you can only be perform from the command line:<br />

• Delete another user’s workspace – tf workspace /delete<br />

• Undo another user’s check-in – tf undo<br />

• Unlock another user’s lock – tf lock<br />

• Define label scope – tf label<br />

• Perform a baseless merge – tf merge<br />

Additional Resources<br />

• For more information, see “Walkthrough: Working <strong>with</strong> <strong>Team</strong> <strong>Foundation</strong> Source<br />

Control from Command Line” on the Microsoft MSDN® Web site at<br />

http://msdn2.microsoft.com/en-us/library/zthc5x3f.aspx

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!