change.activation.constructor.signature
[tfs.git] / docs / tf.txt
blobc600b0a25ed87b0b59610a5556ff986ad01a8704
1 tf(1)
2 =====
4 NAME
5 ----
6 tf - Team Foundation Client
9 SYNOPSIS
10 --------
11 'tf' [/server:<server name or ip address>] [/login:<login credentials>]
12                 <command> [<command arguments>]
14 DESCRIPTION
15 -----------
17 'tf' is a source control client for Microsoft Team Foundation Server.
19 OPTIONS
20 -------
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
33   cache file.
35 COMMANDS
36 --------
37 *add <filenames>*::
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
71   changeset.
73 *dir <server path>*::
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.
77 *explore*::
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.
81 *get [ <path> ]*::
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 
89   completion code.
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 *online <path> [ /added | /modified | /deleted | /preview ]*::
116   Finds all writable files and marks them as pending changes on the server.
117         It also finds all unknown files and marks them as pending adds, missing
118   files are marked as pending deletes. A great command to use if you apply
119         a patch to a clean tfs-managed tree and want to pend the changes to the 
120         server for checkin. The /added, /modified, /deleted flags can be used
121         to show just additions, just modifications, or just deletions respectively.
122         These flags may be combined. With no flags, all changes are shown.
124 *perm <filename>*::
125         Show server permissions on a file. Command alias: permission.
127 *properties <filenames> [ /recursive ]*::
128         Show detailed properties for each filename including server locks, encoding,
129   last modified date, changeset id, and whether the file has a newer version
130   on the server.
132 *rename <oldname> <newname>*::
133         Rename a file or files in the repository.
135 *shelvesets [ <name> | <name;owner> ] [ /owner:<owner> ]*::
136   Show shelvesets on the server. Use /owner:"*" and no name argument to view all 
137   shelvesets.
139 *show [ build | cache | ident | stats | tools ]*:: 
140         Show information about build configuration, cache settings, identity info,
141         usage statistics, or registered server tools.
143 *status [ <filenames> /recursive ]*::
144   Show status of all pending changes in local workspace. Optional paths/filenames
145         may be added to narrow the resulting output.
147 *treeclean*::
148   Delete all files not under version control. Use /preview to see what 
149         would be deleted.
151 *undo [ <filenames> /recursive ]*::
152   Undo pending changes. With no filenames, undoes all pending changes.
154 *unlabel <labelname> <itemspec>*::
155   Remove a label or tag from an item.
157 *workspace [ /new | /delete ]*::
158   Manage workspaces.
160 *workspaces [ /format:detailed <workspace-name> ]*::
161         List workspaces in server repository. Use /format:detailed for additional
162   information. Specify a workspace name to filter results.
164 *workfold [ <server path> <local path> | /unmap <local path> ]*::
165   Manage working folders. With no arguments, print current working folder 
166   mappings. With a server path and local path, creates a new working folder
167   mapping.
169 *version*::
170   Displays the version of the program.
172 *view <filenames | server paths>*::
173         Displays the latest version of the specified file or files.
175 EXAMPLES
176 --------
178 *List all workspaces on the server 10.2.10.2, using a username of "domain\\username" and a password of "password".*::
179   tf workspaces /server:10.2.10.2 /login:domain\\username,password /owner:"+++*+++" /computer:"+++*+++"
181 *Create a workspace with the name "workspaceName" with an owner name of ownerName.*::
182   tf workspace /new "workspaceName;ownerName"
184 *Setup a working folder for the project "ProjectName" in directory ~/src/project.*::
185   tf workfold "$/ProjectName" /home/username/src/project
187 *Fetch/Get all files in folder in project "ProjectName" to local machine.*::
188   tf get /recursive /home/username/src/project
190 *Delete the workspace "workspaceName" created above.*::
191  tf workspace /delete workspaceName
193 *Add all unknown files to the repository.*::
194  tf ls-files /others %% add
196 MULTIPLE COMMANDS
197 -----------------
198 You can execute multiple commands in sequence in a single run of TF, 
199 by separating the commands with '%'. Here's how you might checkin a 
200 patch with a single run of TF:
203 ------------
204 $  patch -p1 < ~/new-feature.diff
205 $  tf online % checkin
206 ------------
208 If you'd like to pipe the output from the ls-files or diff (brief
209 mode only) subcommands to the next subcommand in the chain use
210 '%%' instead. This can be particularly useful with ls-files.
212 CONFIGURATION
213 -------------
214 The TF client stores configuration settings in ~/.tf/TfClient.config.
216 *Checkin.Validate*::
217         The TF client will display a summary of pending
218   changes and ask for confirmaton below committing changes to the server
219   when set to "true". The default is "false". It's non-trivial to rollback
220   a committed change, so this option is highly recommended.
222 *Checkout.Latest*::
223   The TF client will always checkout the latest version rather than
224   the workspace version if this setting is set to "true". Note: this option
225         only effects the checkout command, not the "online" command.
227 *Credentials.Save*:: 
228         The TF client will store login credentials if this
229   setting is set to "true". The default is "false".
231 *File.Excludes*::
232         A comma separated list of files to ignore. Currently, only the "online"
233         command honors this setting. The wildcard characters * and ? are supported.
234         Example setting: "*.dll,*.pdb".
236 *File.ReadWrite*::
237   The TF client defaults to setting all non-checked out files to readonly. Set
238   this setting to "true" to make them read-write.
240 *Get.Recursive*::
241         The TF client will automatically do recursive gets when set
242         to "true". IMHO, this is far more useful than the default       behavior.
244 *History.Detailed*::
245         The TF client defaults to brief output of history which does not include 
246         file level information. Set this setting to "true" to get file level history.
248 *History.DefaultToCwd*::
249         The TF client will default to the current working directory if not options
250         are given when running the subcommand "history". The default behavior of the
251         standard client is to require a path for all history queries. This option
252   provides an optional and more sensible default.
254 *History.Recursive*::
255         The TF client will automatically do recursive history queries when set
256         to "true". IMHO, this is far more useful than the default       behavior.
258 *History.StopAfter*::
259   The TF client defaults to showing the last 255 checkins in history output.
260   Set this option to an integer to change the default.
262 *Online.Recursive*::
263         The TF client will automatically do a recursive online command when set
264         to "true". IMHO, this is far more useful than the default       behavior for
265         clean trees. Not as helpful for trees littered with build output files.
267 *Server.Default*::
268   If the TF client cannot determine the server to connect to, first from 
269         the "/server:" option, and second the workspace cache, then it will
270   use the Server.Default setting if non-null.
272 WORKSPACE CACHE
273 ---------------
274 The TF client keeps a cache of workspaces and folder mappings in 
275 ~/.tf/Cache/VersionControl.config. Here's a sample file:
277 The contents of the cache can be seen with the *tf cache* command.
279 ------------
280 <VersionControlServer>
281   <Servers>
282     <ServerInfo uri="http://10.2.1.2:8080/">
283       <WorkspaceInfo name="neo" ownerName="DOMAIN\USER" computer="MYBOX" comment="" LastSavedCheckinTimeStamp="4/26/2007 11:55:50 PM">
284         <MappedPaths>
285           <MappedPath path="/home/jreed/Source/xyz-project" />
286           <MappedPath path="/home/jreed/Source/abc-project" />
287         </MappedPaths>
288       </WorkspaceInfo>
289     </ServerInfo>
290   </Servers>
291 </VersionControlServer>
292 ------------
295 IMPLEMENTATION NOTES
296 --------------------
297 TFS doesn't have built in support for tracking file attributes, for
298 example, whether the file is executable or not. The TF client included 
299 in this package makes use of libmagic to determine whether a file 
300 should be marked executable or not.
303 MORE INFORMATION
304 ----------------
305 http://groups.google.com/group/opentf
306 http://msdn2.microsoft.com/en-us/library/bb130146(VS.80).aspx
307 http://msdn2.microsoft.com/en-us/teamsystem/default.aspx
308 http://msdn2.microsoft.com/en-us/cc31bk2e(VS.80).aspx
311 AUTHOR
312 ------
313 Written by Joel Reed <joelwreed@gmail.com>
316 DOCUMENTATION
317 --------------
318 Documentation by Joel Reed <joelwreed@gmail.com>