6 tf - Team Foundation Client
11 'tf' [/server:<server name or ip address>] [/login:<login credentials>]
12 <command> [<command arguments>]
17 'tf' is a source control client for Microsoft Team Foundation Server.
21 */login:username [,password]*::
22 Provide authentication credentials. If you don't specify a
23 password you will be prompted for one. If you have
24 gnome-keyring support enabled, TF will store the login
25 credentials on your default keyring if configured to do so
26 (see "Credentials.Save" configuration option below). The login username
27 can be a domain account, in which case use the syntax "domain\\username".
29 */server:<server name or ip address>*::
30 Specify the Team Foundation Server. If you are within a mapped
31 working folder, you don't need to specify the /server option,
32 as this information is stored in the VersionControl.config
38 Pend an add on a file or files to the repository. To commit, you
39 must issue a checkin command.
41 *changeset <changeset id>*::
42 Show changeset details: committer, date, comment, and files changed.
43 The changeset id is just an integer - no "C" prefix is required as in
44 the diff command below.
46 *checkin [ <filenames or path> /recursive /comment:<comment> ]*::
47 Checkin pending changes in workspace. With no arguments, this command
48 will checkin all files in your workspace, not just all files underneath
49 your current working directory. Due to a limitation in Mono.GetOptions,
50 the /comment parameter cannot include spaces. This will be fixed soon!
52 *checkout <filenames>*::
53 Checkout a file for editing. Command alias: edit.
55 *configure [ <key> | <key> <value> ]*::
56 With no arguments, displays current configuration. With 1 argument,
57 deletes the configuration setting <key>. With 2 arguments,
58 sets the value of <key> to <value>. See Configuration section below
59 for more details on valid settings.
61 *delete <filenames> [ /recursive ]*::
62 Pend a delete against a file or files from the repository. To commit, you
63 must issue a checkin command.
65 *diff <filename or path or changeset id> [ /old | /modified ]*::
66 Show pending changes as a diff. With /old, shows changes from current
67 workspace to latest on the server as a diff. With /modified, shows
68 changes to writable workspace files as a diff - another way to preview
69 changes before using the *online* command. With a changeset id, like
70 C12278, the command will show you a diff of the files changed in that
74 List files in specified server path. A way to explore the folders on the server
75 without setting up a workspace and downloading the files.
78 Graphically explore a TF repository. Changeset view, directory view, and file view
79 options. Control-C will copy currently selected path to the clipboard.
82 Update local repository copy with latest versions from the server.
83 Think "cvs/svn update". Note: Files are initially set to read-only, until
84 checked out with the *checkout* command.
86 *help [ <cmd> | /list ]*::
87 Show builtin help. Optionally, specify a tf command for which to
88 show detailed help. The /list option is primarily a helper for shell
91 *history <filename | path > [ /format:<format> /recursive /stopafter:X ]*::
92 Display changelog history for specified file. If you are looking for a
93 git-log/svn log type function use this and add /recursive. Use /stopafter
94 to limit the number of entries returned. Valid format specifiers include
95 "brief" (the default), "detailed", and "byowner". The "detailed" format displays
96 all files changed in a changeset and the "byowner" format summarizes the history
97 by owner, showing how many changes each user committed.
99 *label <labelname> <itemspec> [ /recursive ]*::
100 Add a label or tag to an item.
102 *labels [ <labelname> /owner:<ownername> /format:detailed ]*::
103 Displays labels or tags. Can optionally filter by <labelname> and <ownername>.
105 *lock /lock:[None | Checkin | Checkout] <itemspec> [ /recursive ]*::
106 Locks a file in the repository. Use /lock:none to remove the lock.
108 *ls-files <path> [ /deleted | /modified | /old | /unknown ]*::
109 Shows known, deleted, modified, old, or unknown files under the given path.
110 With no options, ls-files shows known files. /old option by default shows
111 only files in your workspace which are out of date, not new files on the
112 server you've not yet fetched. To show those files as well, use "/old /all".
113 This behavior may change in future releases, based on user feedback.
115 *merges [<source>] <destination>*::
116 Lists merge points in the history of the destination item. The destination
117 item can either be expressed as a server item or a local item.
119 *online <path> [ /added | /modified | /deleted | /preview ]*::
120 Finds all writable files and marks them as pending changes on the server.
121 It also finds all unknown files and marks them as pending adds, missing
122 files are marked as pending deletes. A great command to use if you apply
123 a patch to a clean tfs-managed tree and want to pend the changes to the
124 server for checkin. The /added, /modified, /deleted flags can be used
125 to show just additions, just modifications, or just deletions respectively.
126 These flags may be combined. With no flags, all changes are shown.
129 Show server permissions on a file. Command alias: permission.
131 *properties <filenames> [ /recursive ]*::
132 Show detailed properties for each filename including server locks, encoding,
133 last modified date, changeset id, and whether the file has a newer version
136 *rename <oldname> <newname>*::
137 Rename a file or files in the repository.
139 *shelve <name> [ <path> | /delete ]*::
140 Create or delete a shelveset. A shelveset is a way to store local changes
141 on the server without checking them in.
143 *shelvesets [ <name> | <name;owner> ] [ /owner:<owner> ]*::
144 Show shelvesets on the server. Use /owner:"*" and no name argument to view all
147 *show [ build | cache | ident | stats | tools ]*::
148 Show information about build configuration, cache settings, identity info,
149 usage statistics, or registered server tools.
151 *status [ <filenames> /recursive ]*::
152 Show status of all pending changes in local workspace. Optional paths/filenames
153 may be added to narrow the resulting output.
156 Delete all files not under version control. Use /preview to see what
159 *undo [ <filenames> /recursive ]*::
160 Undo pending changes. With no filenames, undoes all pending changes.
162 *unlabel <labelname> <itemspec>*::
163 Remove a label or tag from an item.
165 *workspace [ /new | /delete ]*::
168 *workspaces [ /format:detailed <workspace-name> ]*::
169 List workspaces in server repository. Use /format:detailed for additional
170 information. Specify a workspace name to filter results.
172 *workfold [ <server path> <local path> | /unmap <local path> ]*::
173 Manage working folders. With no arguments, print current working folder
174 mappings. With a server path and local path, creates a new working folder
178 Displays the version of the program.
180 *view <filenames | server paths>*::
181 Displays the latest version of the specified file or files.
186 *List all workspaces on the server 10.2.10.2, using a username of "domain\\username" and a password of "password".*::
187 tf workspaces /server:10.2.10.2 /login:domain\\username,password /owner:"+++*+++" /computer:"+++*+++"
189 *Create a workspace with the name "workspaceName" with an owner name of ownerName.*::
190 tf workspace /new "workspaceName;ownerName"
192 *Setup a working folder for the project "ProjectName" in directory ~/src/project.*::
193 tf workfold "$/ProjectName" /home/username/src/project
195 *Fetch/Get all files in folder in project "ProjectName" to local machine.*::
196 tf get /recursive /home/username/src/project
198 *Delete the workspace "workspaceName" created above.*::
199 tf workspace /delete workspaceName
201 *Add all unknown files to the repository.*::
202 tf ls-files /others %% add
206 You can execute multiple commands in sequence in a single run of TF,
207 by separating the commands with '%'. Here's how you might checkin a
208 patch with a single run of TF:
212 $ patch -p1 < ~/new-feature.diff
213 $ tf online % checkin
216 If you'd like to pipe the output from the ls-files or diff (brief
217 mode only) subcommands to the next subcommand in the chain use
218 '%%' instead. This can be particularly useful with ls-files.
222 The TF client stores configuration settings in ~/.tf/TfClient.config.
225 The TF client will display a summary of pending
226 changes and ask for confirmaton below committing changes to the server
227 when set to "true". The default is "false". It's non-trivial to rollback
228 a committed change, so this option is highly recommended.
231 The TF client will always checkout the latest version rather than
232 the workspace version if this setting is set to "true". Note: this option
233 only effects the checkout command, not the "online" command.
236 The TF client will store login credentials if this
237 setting is set to "true". The default is "false".
240 A comma separated list of files to ignore. Currently, only the "online"
241 command honors this setting. The wildcard characters * and ? are supported.
242 Example setting: "*.dll,*.pdb".
245 The TF client defaults to setting all non-checked out files to readonly. Set
246 this setting to "true" to make them read-write.
249 The TF client will default to updating all registered working folders if no
250 folder arguments are given when running the subcommand "get". By enabling
251 this option, the TF client will instead look for updates starting with
252 the current working folder and subfolders (as needed). If you have lots of
253 registered working folders but only actively track a few of these folders,
254 the default behavior can become quite tedious.
257 The TF client will automatically do recursive gets when set
258 to "true". IMHO, this is far more useful than the default behavior.
261 The TF client defaults to brief output of history which does not include
262 file level information. Set this setting to "true" to get file level history.
264 *History.DefaultToCwd*::
265 The TF client will default to the current working directory if not options
266 are given when running the subcommand "history". The default behavior of the
267 standard client is to require a path for all history queries. This option
268 provides an optional and more sensible default.
270 *History.Recursive*::
271 The TF client will automatically do recursive history queries when set
272 to "true". IMHO, this is far more useful than the default behavior.
274 *History.StopAfter*::
275 The TF client defaults to showing the last 255 checkins in history output.
276 Set this option to an integer to change the default.
279 The TF client will automatically do recursive merge queries when set
280 to "true". IMHO, this is far more useful than the default behavior.
283 The TF client will automatically do a recursive online command when set
284 to "true". IMHO, this is far more useful than the default behavior for
285 clean trees. Not as helpful for trees littered with build output files.
288 If the TF client cannot determine the server to connect to, first from
289 the "/server:" option, and second the workspace cache, then it will
290 use the Server.Default setting if non-null.
292 *Workspace.Default*::
293 If the TF client cannot determine the active workspace, first from
294 the "/workspace:" option, and second the workspace cache, then it will
295 use the Workspace.Default setting if non-null.
299 The TF client keeps a cache of workspaces and folder mappings in
300 ~/.tf/Cache/VersionControl.config. Here's a sample file:
302 The contents of the cache can be seen with the *tf cache* command.
305 <VersionControlServer>
307 <ServerInfo uri="http://10.2.1.2:8080/">
308 <WorkspaceInfo name="neo" ownerName="DOMAIN\USER" computer="MYBOX" comment="" LastSavedCheckinTimeStamp="4/26/2007 11:55:50 PM">
310 <MappedPath path="/home/jreed/Source/xyz-project" />
311 <MappedPath path="/home/jreed/Source/abc-project" />
316 </VersionControlServer>
322 TFS doesn't have built in support for tracking file attributes, for
323 example, whether the file is executable or not. The TF client included
324 in this package makes use of libmagic to determine whether a file
325 should be marked executable or not.
330 http://groups.google.com/group/opentf
331 http://msdn2.microsoft.com/en-us/library/bb130146(VS.80).aspx
332 http://msdn2.microsoft.com/en-us/teamsystem/default.aspx
333 http://msdn2.microsoft.com/en-us/cc31bk2e(VS.80).aspx
338 Written by Joel Reed <joelwreed@gmail.com>
343 Documentation by Joel Reed <joelwreed@gmail.com>