##// END OF EJS Templates
progress: deprecate the progress extension...
Pierre-Yves David -
r25522:15c2c580 default
parent child Browse files
Show More
@@ -1,14 +1,12
1 # progress.py show progress bars for some actions
1 # progress.py show progress bars for some actions
2 #
2 #
3 # Copyright (C) 2010 Augie Fackler <durin42@gmail.com>
3 # Copyright (C) 2010 Augie Fackler <durin42@gmail.com>
4 #
4 #
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 """show progress bars for some actions
8 """show progress bars for some actions (DEPRECATED)
9
9
10 This extension uses the progress information logged by hg commands
10 This extension has been merged into core, you can remove it from your config.
11 to draw progress bars that are as informative as possible. Some progress
11 See hg help config.progress for configuration options.
12 bars only offer indeterminate information, while others have a definite
13 end point.
14 """
12 """
@@ -1,2255 +1,2254
1 Short help:
1 Short help:
2
2
3 $ hg
3 $ hg
4 Mercurial Distributed SCM
4 Mercurial Distributed SCM
5
5
6 basic commands:
6 basic commands:
7
7
8 add add the specified files on the next commit
8 add add the specified files on the next commit
9 annotate show changeset information by line for each file
9 annotate show changeset information by line for each file
10 clone make a copy of an existing repository
10 clone make a copy of an existing repository
11 commit commit the specified files or all outstanding changes
11 commit commit the specified files or all outstanding changes
12 diff diff repository (or selected files)
12 diff diff repository (or selected files)
13 export dump the header and diffs for one or more changesets
13 export dump the header and diffs for one or more changesets
14 forget forget the specified files on the next commit
14 forget forget the specified files on the next commit
15 init create a new repository in the given directory
15 init create a new repository in the given directory
16 log show revision history of entire repository or files
16 log show revision history of entire repository or files
17 merge merge another revision into working directory
17 merge merge another revision into working directory
18 pull pull changes from the specified source
18 pull pull changes from the specified source
19 push push changes to the specified destination
19 push push changes to the specified destination
20 remove remove the specified files on the next commit
20 remove remove the specified files on the next commit
21 serve start stand-alone webserver
21 serve start stand-alone webserver
22 status show changed files in the working directory
22 status show changed files in the working directory
23 summary summarize working directory state
23 summary summarize working directory state
24 update update working directory (or switch revisions)
24 update update working directory (or switch revisions)
25
25
26 (use "hg help" for the full list of commands or "hg -v" for details)
26 (use "hg help" for the full list of commands or "hg -v" for details)
27
27
28 $ hg -q
28 $ hg -q
29 add add the specified files on the next commit
29 add add the specified files on the next commit
30 annotate show changeset information by line for each file
30 annotate show changeset information by line for each file
31 clone make a copy of an existing repository
31 clone make a copy of an existing repository
32 commit commit the specified files or all outstanding changes
32 commit commit the specified files or all outstanding changes
33 diff diff repository (or selected files)
33 diff diff repository (or selected files)
34 export dump the header and diffs for one or more changesets
34 export dump the header and diffs for one or more changesets
35 forget forget the specified files on the next commit
35 forget forget the specified files on the next commit
36 init create a new repository in the given directory
36 init create a new repository in the given directory
37 log show revision history of entire repository or files
37 log show revision history of entire repository or files
38 merge merge another revision into working directory
38 merge merge another revision into working directory
39 pull pull changes from the specified source
39 pull pull changes from the specified source
40 push push changes to the specified destination
40 push push changes to the specified destination
41 remove remove the specified files on the next commit
41 remove remove the specified files on the next commit
42 serve start stand-alone webserver
42 serve start stand-alone webserver
43 status show changed files in the working directory
43 status show changed files in the working directory
44 summary summarize working directory state
44 summary summarize working directory state
45 update update working directory (or switch revisions)
45 update update working directory (or switch revisions)
46
46
47 $ hg help
47 $ hg help
48 Mercurial Distributed SCM
48 Mercurial Distributed SCM
49
49
50 list of commands:
50 list of commands:
51
51
52 add add the specified files on the next commit
52 add add the specified files on the next commit
53 addremove add all new files, delete all missing files
53 addremove add all new files, delete all missing files
54 annotate show changeset information by line for each file
54 annotate show changeset information by line for each file
55 archive create an unversioned archive of a repository revision
55 archive create an unversioned archive of a repository revision
56 backout reverse effect of earlier changeset
56 backout reverse effect of earlier changeset
57 bisect subdivision search of changesets
57 bisect subdivision search of changesets
58 bookmarks create a new bookmark or list existing bookmarks
58 bookmarks create a new bookmark or list existing bookmarks
59 branch set or show the current branch name
59 branch set or show the current branch name
60 branches list repository named branches
60 branches list repository named branches
61 bundle create a changegroup file
61 bundle create a changegroup file
62 cat output the current or given revision of files
62 cat output the current or given revision of files
63 clone make a copy of an existing repository
63 clone make a copy of an existing repository
64 commit commit the specified files or all outstanding changes
64 commit commit the specified files or all outstanding changes
65 config show combined config settings from all hgrc files
65 config show combined config settings from all hgrc files
66 copy mark files as copied for the next commit
66 copy mark files as copied for the next commit
67 diff diff repository (or selected files)
67 diff diff repository (or selected files)
68 export dump the header and diffs for one or more changesets
68 export dump the header and diffs for one or more changesets
69 files list tracked files
69 files list tracked files
70 forget forget the specified files on the next commit
70 forget forget the specified files on the next commit
71 graft copy changes from other branches onto the current branch
71 graft copy changes from other branches onto the current branch
72 grep search for a pattern in specified files and revisions
72 grep search for a pattern in specified files and revisions
73 heads show branch heads
73 heads show branch heads
74 help show help for a given topic or a help overview
74 help show help for a given topic or a help overview
75 identify identify the working directory or specified revision
75 identify identify the working directory or specified revision
76 import import an ordered set of patches
76 import import an ordered set of patches
77 incoming show new changesets found in source
77 incoming show new changesets found in source
78 init create a new repository in the given directory
78 init create a new repository in the given directory
79 log show revision history of entire repository or files
79 log show revision history of entire repository or files
80 manifest output the current or given revision of the project manifest
80 manifest output the current or given revision of the project manifest
81 merge merge another revision into working directory
81 merge merge another revision into working directory
82 outgoing show changesets not found in the destination
82 outgoing show changesets not found in the destination
83 paths show aliases for remote repositories
83 paths show aliases for remote repositories
84 phase set or show the current phase name
84 phase set or show the current phase name
85 pull pull changes from the specified source
85 pull pull changes from the specified source
86 push push changes to the specified destination
86 push push changes to the specified destination
87 recover roll back an interrupted transaction
87 recover roll back an interrupted transaction
88 remove remove the specified files on the next commit
88 remove remove the specified files on the next commit
89 rename rename files; equivalent of copy + remove
89 rename rename files; equivalent of copy + remove
90 resolve redo merges or set/view the merge status of files
90 resolve redo merges or set/view the merge status of files
91 revert restore files to their checkout state
91 revert restore files to their checkout state
92 root print the root (top) of the current working directory
92 root print the root (top) of the current working directory
93 serve start stand-alone webserver
93 serve start stand-alone webserver
94 status show changed files in the working directory
94 status show changed files in the working directory
95 summary summarize working directory state
95 summary summarize working directory state
96 tag add one or more tags for the current or given revision
96 tag add one or more tags for the current or given revision
97 tags list repository tags
97 tags list repository tags
98 unbundle apply one or more changegroup files
98 unbundle apply one or more changegroup files
99 update update working directory (or switch revisions)
99 update update working directory (or switch revisions)
100 verify verify the integrity of the repository
100 verify verify the integrity of the repository
101 version output version and copyright information
101 version output version and copyright information
102
102
103 additional help topics:
103 additional help topics:
104
104
105 config Configuration Files
105 config Configuration Files
106 dates Date Formats
106 dates Date Formats
107 diffs Diff Formats
107 diffs Diff Formats
108 environment Environment Variables
108 environment Environment Variables
109 extensions Using Additional Features
109 extensions Using Additional Features
110 filesets Specifying File Sets
110 filesets Specifying File Sets
111 glossary Glossary
111 glossary Glossary
112 hgignore Syntax for Mercurial Ignore Files
112 hgignore Syntax for Mercurial Ignore Files
113 hgweb Configuring hgweb
113 hgweb Configuring hgweb
114 merge-tools Merge Tools
114 merge-tools Merge Tools
115 multirevs Specifying Multiple Revisions
115 multirevs Specifying Multiple Revisions
116 patterns File Name Patterns
116 patterns File Name Patterns
117 phases Working with Phases
117 phases Working with Phases
118 revisions Specifying Single Revisions
118 revisions Specifying Single Revisions
119 revsets Specifying Revision Sets
119 revsets Specifying Revision Sets
120 subrepos Subrepositories
120 subrepos Subrepositories
121 templating Template Usage
121 templating Template Usage
122 urls URL Paths
122 urls URL Paths
123
123
124 (use "hg help -v" to show built-in aliases and global options)
124 (use "hg help -v" to show built-in aliases and global options)
125
125
126 $ hg -q help
126 $ hg -q help
127 add add the specified files on the next commit
127 add add the specified files on the next commit
128 addremove add all new files, delete all missing files
128 addremove add all new files, delete all missing files
129 annotate show changeset information by line for each file
129 annotate show changeset information by line for each file
130 archive create an unversioned archive of a repository revision
130 archive create an unversioned archive of a repository revision
131 backout reverse effect of earlier changeset
131 backout reverse effect of earlier changeset
132 bisect subdivision search of changesets
132 bisect subdivision search of changesets
133 bookmarks create a new bookmark or list existing bookmarks
133 bookmarks create a new bookmark or list existing bookmarks
134 branch set or show the current branch name
134 branch set or show the current branch name
135 branches list repository named branches
135 branches list repository named branches
136 bundle create a changegroup file
136 bundle create a changegroup file
137 cat output the current or given revision of files
137 cat output the current or given revision of files
138 clone make a copy of an existing repository
138 clone make a copy of an existing repository
139 commit commit the specified files or all outstanding changes
139 commit commit the specified files or all outstanding changes
140 config show combined config settings from all hgrc files
140 config show combined config settings from all hgrc files
141 copy mark files as copied for the next commit
141 copy mark files as copied for the next commit
142 diff diff repository (or selected files)
142 diff diff repository (or selected files)
143 export dump the header and diffs for one or more changesets
143 export dump the header and diffs for one or more changesets
144 files list tracked files
144 files list tracked files
145 forget forget the specified files on the next commit
145 forget forget the specified files on the next commit
146 graft copy changes from other branches onto the current branch
146 graft copy changes from other branches onto the current branch
147 grep search for a pattern in specified files and revisions
147 grep search for a pattern in specified files and revisions
148 heads show branch heads
148 heads show branch heads
149 help show help for a given topic or a help overview
149 help show help for a given topic or a help overview
150 identify identify the working directory or specified revision
150 identify identify the working directory or specified revision
151 import import an ordered set of patches
151 import import an ordered set of patches
152 incoming show new changesets found in source
152 incoming show new changesets found in source
153 init create a new repository in the given directory
153 init create a new repository in the given directory
154 log show revision history of entire repository or files
154 log show revision history of entire repository or files
155 manifest output the current or given revision of the project manifest
155 manifest output the current or given revision of the project manifest
156 merge merge another revision into working directory
156 merge merge another revision into working directory
157 outgoing show changesets not found in the destination
157 outgoing show changesets not found in the destination
158 paths show aliases for remote repositories
158 paths show aliases for remote repositories
159 phase set or show the current phase name
159 phase set or show the current phase name
160 pull pull changes from the specified source
160 pull pull changes from the specified source
161 push push changes to the specified destination
161 push push changes to the specified destination
162 recover roll back an interrupted transaction
162 recover roll back an interrupted transaction
163 remove remove the specified files on the next commit
163 remove remove the specified files on the next commit
164 rename rename files; equivalent of copy + remove
164 rename rename files; equivalent of copy + remove
165 resolve redo merges or set/view the merge status of files
165 resolve redo merges or set/view the merge status of files
166 revert restore files to their checkout state
166 revert restore files to their checkout state
167 root print the root (top) of the current working directory
167 root print the root (top) of the current working directory
168 serve start stand-alone webserver
168 serve start stand-alone webserver
169 status show changed files in the working directory
169 status show changed files in the working directory
170 summary summarize working directory state
170 summary summarize working directory state
171 tag add one or more tags for the current or given revision
171 tag add one or more tags for the current or given revision
172 tags list repository tags
172 tags list repository tags
173 unbundle apply one or more changegroup files
173 unbundle apply one or more changegroup files
174 update update working directory (or switch revisions)
174 update update working directory (or switch revisions)
175 verify verify the integrity of the repository
175 verify verify the integrity of the repository
176 version output version and copyright information
176 version output version and copyright information
177
177
178 additional help topics:
178 additional help topics:
179
179
180 config Configuration Files
180 config Configuration Files
181 dates Date Formats
181 dates Date Formats
182 diffs Diff Formats
182 diffs Diff Formats
183 environment Environment Variables
183 environment Environment Variables
184 extensions Using Additional Features
184 extensions Using Additional Features
185 filesets Specifying File Sets
185 filesets Specifying File Sets
186 glossary Glossary
186 glossary Glossary
187 hgignore Syntax for Mercurial Ignore Files
187 hgignore Syntax for Mercurial Ignore Files
188 hgweb Configuring hgweb
188 hgweb Configuring hgweb
189 merge-tools Merge Tools
189 merge-tools Merge Tools
190 multirevs Specifying Multiple Revisions
190 multirevs Specifying Multiple Revisions
191 patterns File Name Patterns
191 patterns File Name Patterns
192 phases Working with Phases
192 phases Working with Phases
193 revisions Specifying Single Revisions
193 revisions Specifying Single Revisions
194 revsets Specifying Revision Sets
194 revsets Specifying Revision Sets
195 subrepos Subrepositories
195 subrepos Subrepositories
196 templating Template Usage
196 templating Template Usage
197 urls URL Paths
197 urls URL Paths
198
198
199 Test extension help:
199 Test extension help:
200 $ hg help extensions --config extensions.rebase= --config extensions.children=
200 $ hg help extensions --config extensions.rebase= --config extensions.children=
201 Using Additional Features
201 Using Additional Features
202 """""""""""""""""""""""""
202 """""""""""""""""""""""""
203
203
204 Mercurial has the ability to add new features through the use of
204 Mercurial has the ability to add new features through the use of
205 extensions. Extensions may add new commands, add options to existing
205 extensions. Extensions may add new commands, add options to existing
206 commands, change the default behavior of commands, or implement hooks.
206 commands, change the default behavior of commands, or implement hooks.
207
207
208 To enable the "foo" extension, either shipped with Mercurial or in the
208 To enable the "foo" extension, either shipped with Mercurial or in the
209 Python search path, create an entry for it in your configuration file,
209 Python search path, create an entry for it in your configuration file,
210 like this:
210 like this:
211
211
212 [extensions]
212 [extensions]
213 foo =
213 foo =
214
214
215 You may also specify the full path to an extension:
215 You may also specify the full path to an extension:
216
216
217 [extensions]
217 [extensions]
218 myfeature = ~/.hgext/myfeature.py
218 myfeature = ~/.hgext/myfeature.py
219
219
220 See "hg help config" for more information on configuration files.
220 See "hg help config" for more information on configuration files.
221
221
222 Extensions are not loaded by default for a variety of reasons: they can
222 Extensions are not loaded by default for a variety of reasons: they can
223 increase startup overhead; they may be meant for advanced usage only; they
223 increase startup overhead; they may be meant for advanced usage only; they
224 may provide potentially dangerous abilities (such as letting you destroy
224 may provide potentially dangerous abilities (such as letting you destroy
225 or modify history); they might not be ready for prime time; or they may
225 or modify history); they might not be ready for prime time; or they may
226 alter some usual behaviors of stock Mercurial. It is thus up to the user
226 alter some usual behaviors of stock Mercurial. It is thus up to the user
227 to activate extensions as needed.
227 to activate extensions as needed.
228
228
229 To explicitly disable an extension enabled in a configuration file of
229 To explicitly disable an extension enabled in a configuration file of
230 broader scope, prepend its path with !:
230 broader scope, prepend its path with !:
231
231
232 [extensions]
232 [extensions]
233 # disabling extension bar residing in /path/to/extension/bar.py
233 # disabling extension bar residing in /path/to/extension/bar.py
234 bar = !/path/to/extension/bar.py
234 bar = !/path/to/extension/bar.py
235 # ditto, but no path was supplied for extension baz
235 # ditto, but no path was supplied for extension baz
236 baz = !
236 baz = !
237
237
238 enabled extensions:
238 enabled extensions:
239
239
240 children command to display child changesets (DEPRECATED)
240 children command to display child changesets (DEPRECATED)
241 rebase command to move sets of revisions to a different ancestor
241 rebase command to move sets of revisions to a different ancestor
242
242
243 disabled extensions:
243 disabled extensions:
244
244
245 acl hooks for controlling repository access
245 acl hooks for controlling repository access
246 blackbox log repository events to a blackbox for debugging
246 blackbox log repository events to a blackbox for debugging
247 bugzilla hooks for integrating with the Bugzilla bug tracker
247 bugzilla hooks for integrating with the Bugzilla bug tracker
248 censor erase file content at a given revision
248 censor erase file content at a given revision
249 churn command to display statistics about repository history
249 churn command to display statistics about repository history
250 color colorize output from some commands
250 color colorize output from some commands
251 convert import revisions from foreign VCS repositories into
251 convert import revisions from foreign VCS repositories into
252 Mercurial
252 Mercurial
253 eol automatically manage newlines in repository files
253 eol automatically manage newlines in repository files
254 extdiff command to allow external programs to compare revisions
254 extdiff command to allow external programs to compare revisions
255 factotum http authentication with factotum
255 factotum http authentication with factotum
256 gpg commands to sign and verify changesets
256 gpg commands to sign and verify changesets
257 hgcia hooks for integrating with the CIA.vc notification service
257 hgcia hooks for integrating with the CIA.vc notification service
258 hgk browse the repository in a graphical way
258 hgk browse the repository in a graphical way
259 highlight syntax highlighting for hgweb (requires Pygments)
259 highlight syntax highlighting for hgweb (requires Pygments)
260 histedit interactive history editing
260 histedit interactive history editing
261 keyword expand keywords in tracked files
261 keyword expand keywords in tracked files
262 largefiles track large binary files
262 largefiles track large binary files
263 mq manage a stack of patches
263 mq manage a stack of patches
264 notify hooks for sending email push notifications
264 notify hooks for sending email push notifications
265 pager browse command output with an external pager
265 pager browse command output with an external pager
266 patchbomb command to send changesets as (a series of) patch emails
266 patchbomb command to send changesets as (a series of) patch emails
267 progress show progress bars for some actions
268 purge command to delete untracked files from the working
267 purge command to delete untracked files from the working
269 directory
268 directory
270 record commands to interactively select changes for
269 record commands to interactively select changes for
271 commit/qrefresh
270 commit/qrefresh
272 relink recreates hardlinks between repository clones
271 relink recreates hardlinks between repository clones
273 schemes extend schemes with shortcuts to repository swarms
272 schemes extend schemes with shortcuts to repository swarms
274 share share a common history between several working directories
273 share share a common history between several working directories
275 shelve save and restore changes to the working directory
274 shelve save and restore changes to the working directory
276 strip strip changesets and their descendants from history
275 strip strip changesets and their descendants from history
277 transplant command to transplant changesets from another branch
276 transplant command to transplant changesets from another branch
278 win32mbcs allow the use of MBCS paths with problematic encodings
277 win32mbcs allow the use of MBCS paths with problematic encodings
279 zeroconf discover and advertise repositories on the local network
278 zeroconf discover and advertise repositories on the local network
280 Test short command list with verbose option
279 Test short command list with verbose option
281
280
282 $ hg -v help shortlist
281 $ hg -v help shortlist
283 Mercurial Distributed SCM
282 Mercurial Distributed SCM
284
283
285 basic commands:
284 basic commands:
286
285
287 add add the specified files on the next commit
286 add add the specified files on the next commit
288 annotate, blame
287 annotate, blame
289 show changeset information by line for each file
288 show changeset information by line for each file
290 clone make a copy of an existing repository
289 clone make a copy of an existing repository
291 commit, ci commit the specified files or all outstanding changes
290 commit, ci commit the specified files or all outstanding changes
292 diff diff repository (or selected files)
291 diff diff repository (or selected files)
293 export dump the header and diffs for one or more changesets
292 export dump the header and diffs for one or more changesets
294 forget forget the specified files on the next commit
293 forget forget the specified files on the next commit
295 init create a new repository in the given directory
294 init create a new repository in the given directory
296 log, history show revision history of entire repository or files
295 log, history show revision history of entire repository or files
297 merge merge another revision into working directory
296 merge merge another revision into working directory
298 pull pull changes from the specified source
297 pull pull changes from the specified source
299 push push changes to the specified destination
298 push push changes to the specified destination
300 remove, rm remove the specified files on the next commit
299 remove, rm remove the specified files on the next commit
301 serve start stand-alone webserver
300 serve start stand-alone webserver
302 status, st show changed files in the working directory
301 status, st show changed files in the working directory
303 summary, sum summarize working directory state
302 summary, sum summarize working directory state
304 update, up, checkout, co
303 update, up, checkout, co
305 update working directory (or switch revisions)
304 update working directory (or switch revisions)
306
305
307 global options ([+] can be repeated):
306 global options ([+] can be repeated):
308
307
309 -R --repository REPO repository root directory or name of overlay bundle
308 -R --repository REPO repository root directory or name of overlay bundle
310 file
309 file
311 --cwd DIR change working directory
310 --cwd DIR change working directory
312 -y --noninteractive do not prompt, automatically pick the first choice for
311 -y --noninteractive do not prompt, automatically pick the first choice for
313 all prompts
312 all prompts
314 -q --quiet suppress output
313 -q --quiet suppress output
315 -v --verbose enable additional output
314 -v --verbose enable additional output
316 --config CONFIG [+] set/override config option (use 'section.name=value')
315 --config CONFIG [+] set/override config option (use 'section.name=value')
317 --debug enable debugging output
316 --debug enable debugging output
318 --debugger start debugger
317 --debugger start debugger
319 --encoding ENCODE set the charset encoding (default: ascii)
318 --encoding ENCODE set the charset encoding (default: ascii)
320 --encodingmode MODE set the charset encoding mode (default: strict)
319 --encodingmode MODE set the charset encoding mode (default: strict)
321 --traceback always print a traceback on exception
320 --traceback always print a traceback on exception
322 --time time how long the command takes
321 --time time how long the command takes
323 --profile print command execution profile
322 --profile print command execution profile
324 --version output version information and exit
323 --version output version information and exit
325 -h --help display help and exit
324 -h --help display help and exit
326 --hidden consider hidden changesets
325 --hidden consider hidden changesets
327
326
328 (use "hg help" for the full list of commands)
327 (use "hg help" for the full list of commands)
329
328
330 $ hg add -h
329 $ hg add -h
331 hg add [OPTION]... [FILE]...
330 hg add [OPTION]... [FILE]...
332
331
333 add the specified files on the next commit
332 add the specified files on the next commit
334
333
335 Schedule files to be version controlled and added to the repository.
334 Schedule files to be version controlled and added to the repository.
336
335
337 The files will be added to the repository at the next commit. To undo an
336 The files will be added to the repository at the next commit. To undo an
338 add before that, see "hg forget".
337 add before that, see "hg forget".
339
338
340 If no names are given, add all files to the repository.
339 If no names are given, add all files to the repository.
341
340
342 Returns 0 if all files are successfully added.
341 Returns 0 if all files are successfully added.
343
342
344 options ([+] can be repeated):
343 options ([+] can be repeated):
345
344
346 -I --include PATTERN [+] include names matching the given patterns
345 -I --include PATTERN [+] include names matching the given patterns
347 -X --exclude PATTERN [+] exclude names matching the given patterns
346 -X --exclude PATTERN [+] exclude names matching the given patterns
348 -S --subrepos recurse into subrepositories
347 -S --subrepos recurse into subrepositories
349 -n --dry-run do not perform actions, just print output
348 -n --dry-run do not perform actions, just print output
350
349
351 (some details hidden, use --verbose to show complete help)
350 (some details hidden, use --verbose to show complete help)
352
351
353 Verbose help for add
352 Verbose help for add
354
353
355 $ hg add -hv
354 $ hg add -hv
356 hg add [OPTION]... [FILE]...
355 hg add [OPTION]... [FILE]...
357
356
358 add the specified files on the next commit
357 add the specified files on the next commit
359
358
360 Schedule files to be version controlled and added to the repository.
359 Schedule files to be version controlled and added to the repository.
361
360
362 The files will be added to the repository at the next commit. To undo an
361 The files will be added to the repository at the next commit. To undo an
363 add before that, see "hg forget".
362 add before that, see "hg forget".
364
363
365 If no names are given, add all files to the repository.
364 If no names are given, add all files to the repository.
366
365
367 An example showing how new (unknown) files are added automatically by "hg
366 An example showing how new (unknown) files are added automatically by "hg
368 add":
367 add":
369
368
370 $ ls
369 $ ls
371 foo.c
370 foo.c
372 $ hg status
371 $ hg status
373 ? foo.c
372 ? foo.c
374 $ hg add
373 $ hg add
375 adding foo.c
374 adding foo.c
376 $ hg status
375 $ hg status
377 A foo.c
376 A foo.c
378
377
379 Returns 0 if all files are successfully added.
378 Returns 0 if all files are successfully added.
380
379
381 options ([+] can be repeated):
380 options ([+] can be repeated):
382
381
383 -I --include PATTERN [+] include names matching the given patterns
382 -I --include PATTERN [+] include names matching the given patterns
384 -X --exclude PATTERN [+] exclude names matching the given patterns
383 -X --exclude PATTERN [+] exclude names matching the given patterns
385 -S --subrepos recurse into subrepositories
384 -S --subrepos recurse into subrepositories
386 -n --dry-run do not perform actions, just print output
385 -n --dry-run do not perform actions, just print output
387
386
388 global options ([+] can be repeated):
387 global options ([+] can be repeated):
389
388
390 -R --repository REPO repository root directory or name of overlay bundle
389 -R --repository REPO repository root directory or name of overlay bundle
391 file
390 file
392 --cwd DIR change working directory
391 --cwd DIR change working directory
393 -y --noninteractive do not prompt, automatically pick the first choice for
392 -y --noninteractive do not prompt, automatically pick the first choice for
394 all prompts
393 all prompts
395 -q --quiet suppress output
394 -q --quiet suppress output
396 -v --verbose enable additional output
395 -v --verbose enable additional output
397 --config CONFIG [+] set/override config option (use 'section.name=value')
396 --config CONFIG [+] set/override config option (use 'section.name=value')
398 --debug enable debugging output
397 --debug enable debugging output
399 --debugger start debugger
398 --debugger start debugger
400 --encoding ENCODE set the charset encoding (default: ascii)
399 --encoding ENCODE set the charset encoding (default: ascii)
401 --encodingmode MODE set the charset encoding mode (default: strict)
400 --encodingmode MODE set the charset encoding mode (default: strict)
402 --traceback always print a traceback on exception
401 --traceback always print a traceback on exception
403 --time time how long the command takes
402 --time time how long the command takes
404 --profile print command execution profile
403 --profile print command execution profile
405 --version output version information and exit
404 --version output version information and exit
406 -h --help display help and exit
405 -h --help display help and exit
407 --hidden consider hidden changesets
406 --hidden consider hidden changesets
408
407
409 Test help option with version option
408 Test help option with version option
410
409
411 $ hg add -h --version
410 $ hg add -h --version
412 Mercurial Distributed SCM (version *) (glob)
411 Mercurial Distributed SCM (version *) (glob)
413 (see http://mercurial.selenic.com for more information)
412 (see http://mercurial.selenic.com for more information)
414
413
415 Copyright (C) 2005-2015 Matt Mackall and others
414 Copyright (C) 2005-2015 Matt Mackall and others
416 This is free software; see the source for copying conditions. There is NO
415 This is free software; see the source for copying conditions. There is NO
417 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
416 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
418
417
419 $ hg add --skjdfks
418 $ hg add --skjdfks
420 hg add: option --skjdfks not recognized
419 hg add: option --skjdfks not recognized
421 hg add [OPTION]... [FILE]...
420 hg add [OPTION]... [FILE]...
422
421
423 add the specified files on the next commit
422 add the specified files on the next commit
424
423
425 options ([+] can be repeated):
424 options ([+] can be repeated):
426
425
427 -I --include PATTERN [+] include names matching the given patterns
426 -I --include PATTERN [+] include names matching the given patterns
428 -X --exclude PATTERN [+] exclude names matching the given patterns
427 -X --exclude PATTERN [+] exclude names matching the given patterns
429 -S --subrepos recurse into subrepositories
428 -S --subrepos recurse into subrepositories
430 -n --dry-run do not perform actions, just print output
429 -n --dry-run do not perform actions, just print output
431
430
432 (use "hg add -h" to show more help)
431 (use "hg add -h" to show more help)
433 [255]
432 [255]
434
433
435 Test ambiguous command help
434 Test ambiguous command help
436
435
437 $ hg help ad
436 $ hg help ad
438 list of commands:
437 list of commands:
439
438
440 add add the specified files on the next commit
439 add add the specified files on the next commit
441 addremove add all new files, delete all missing files
440 addremove add all new files, delete all missing files
442
441
443 (use "hg help -v ad" to show built-in aliases and global options)
442 (use "hg help -v ad" to show built-in aliases and global options)
444
443
445 Test command without options
444 Test command without options
446
445
447 $ hg help verify
446 $ hg help verify
448 hg verify
447 hg verify
449
448
450 verify the integrity of the repository
449 verify the integrity of the repository
451
450
452 Verify the integrity of the current repository.
451 Verify the integrity of the current repository.
453
452
454 This will perform an extensive check of the repository's integrity,
453 This will perform an extensive check of the repository's integrity,
455 validating the hashes and checksums of each entry in the changelog,
454 validating the hashes and checksums of each entry in the changelog,
456 manifest, and tracked files, as well as the integrity of their crosslinks
455 manifest, and tracked files, as well as the integrity of their crosslinks
457 and indices.
456 and indices.
458
457
459 Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more
458 Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more
460 information about recovery from corruption of the repository.
459 information about recovery from corruption of the repository.
461
460
462 Returns 0 on success, 1 if errors are encountered.
461 Returns 0 on success, 1 if errors are encountered.
463
462
464 (some details hidden, use --verbose to show complete help)
463 (some details hidden, use --verbose to show complete help)
465
464
466 $ hg help diff
465 $ hg help diff
467 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
466 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
468
467
469 diff repository (or selected files)
468 diff repository (or selected files)
470
469
471 Show differences between revisions for the specified files.
470 Show differences between revisions for the specified files.
472
471
473 Differences between files are shown using the unified diff format.
472 Differences between files are shown using the unified diff format.
474
473
475 Note:
474 Note:
476 diff may generate unexpected results for merges, as it will default to
475 diff may generate unexpected results for merges, as it will default to
477 comparing against the working directory's first parent changeset if no
476 comparing against the working directory's first parent changeset if no
478 revisions are specified.
477 revisions are specified.
479
478
480 When two revision arguments are given, then changes are shown between
479 When two revision arguments are given, then changes are shown between
481 those revisions. If only one revision is specified then that revision is
480 those revisions. If only one revision is specified then that revision is
482 compared to the working directory, and, when no revisions are specified,
481 compared to the working directory, and, when no revisions are specified,
483 the working directory files are compared to its parent.
482 the working directory files are compared to its parent.
484
483
485 Alternatively you can specify -c/--change with a revision to see the
484 Alternatively you can specify -c/--change with a revision to see the
486 changes in that changeset relative to its first parent.
485 changes in that changeset relative to its first parent.
487
486
488 Without the -a/--text option, diff will avoid generating diffs of files it
487 Without the -a/--text option, diff will avoid generating diffs of files it
489 detects as binary. With -a, diff will generate a diff anyway, probably
488 detects as binary. With -a, diff will generate a diff anyway, probably
490 with undesirable results.
489 with undesirable results.
491
490
492 Use the -g/--git option to generate diffs in the git extended diff format.
491 Use the -g/--git option to generate diffs in the git extended diff format.
493 For more information, read "hg help diffs".
492 For more information, read "hg help diffs".
494
493
495 Returns 0 on success.
494 Returns 0 on success.
496
495
497 options ([+] can be repeated):
496 options ([+] can be repeated):
498
497
499 -r --rev REV [+] revision
498 -r --rev REV [+] revision
500 -c --change REV change made by revision
499 -c --change REV change made by revision
501 -a --text treat all files as text
500 -a --text treat all files as text
502 -g --git use git extended diff format
501 -g --git use git extended diff format
503 --nodates omit dates from diff headers
502 --nodates omit dates from diff headers
504 --noprefix omit a/ and b/ prefixes from filenames
503 --noprefix omit a/ and b/ prefixes from filenames
505 -p --show-function show which function each change is in
504 -p --show-function show which function each change is in
506 --reverse produce a diff that undoes the changes
505 --reverse produce a diff that undoes the changes
507 -w --ignore-all-space ignore white space when comparing lines
506 -w --ignore-all-space ignore white space when comparing lines
508 -b --ignore-space-change ignore changes in the amount of white space
507 -b --ignore-space-change ignore changes in the amount of white space
509 -B --ignore-blank-lines ignore changes whose lines are all blank
508 -B --ignore-blank-lines ignore changes whose lines are all blank
510 -U --unified NUM number of lines of context to show
509 -U --unified NUM number of lines of context to show
511 --stat output diffstat-style summary of changes
510 --stat output diffstat-style summary of changes
512 --root DIR produce diffs relative to subdirectory
511 --root DIR produce diffs relative to subdirectory
513 -I --include PATTERN [+] include names matching the given patterns
512 -I --include PATTERN [+] include names matching the given patterns
514 -X --exclude PATTERN [+] exclude names matching the given patterns
513 -X --exclude PATTERN [+] exclude names matching the given patterns
515 -S --subrepos recurse into subrepositories
514 -S --subrepos recurse into subrepositories
516
515
517 (some details hidden, use --verbose to show complete help)
516 (some details hidden, use --verbose to show complete help)
518
517
519 $ hg help status
518 $ hg help status
520 hg status [OPTION]... [FILE]...
519 hg status [OPTION]... [FILE]...
521
520
522 aliases: st
521 aliases: st
523
522
524 show changed files in the working directory
523 show changed files in the working directory
525
524
526 Show status of files in the repository. If names are given, only files
525 Show status of files in the repository. If names are given, only files
527 that match are shown. Files that are clean or ignored or the source of a
526 that match are shown. Files that are clean or ignored or the source of a
528 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
527 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
529 -C/--copies or -A/--all are given. Unless options described with "show
528 -C/--copies or -A/--all are given. Unless options described with "show
530 only ..." are given, the options -mardu are used.
529 only ..." are given, the options -mardu are used.
531
530
532 Option -q/--quiet hides untracked (unknown and ignored) files unless
531 Option -q/--quiet hides untracked (unknown and ignored) files unless
533 explicitly requested with -u/--unknown or -i/--ignored.
532 explicitly requested with -u/--unknown or -i/--ignored.
534
533
535 Note:
534 Note:
536 status may appear to disagree with diff if permissions have changed or
535 status may appear to disagree with diff if permissions have changed or
537 a merge has occurred. The standard diff format does not report
536 a merge has occurred. The standard diff format does not report
538 permission changes and diff only reports changes relative to one merge
537 permission changes and diff only reports changes relative to one merge
539 parent.
538 parent.
540
539
541 If one revision is given, it is used as the base revision. If two
540 If one revision is given, it is used as the base revision. If two
542 revisions are given, the differences between them are shown. The --change
541 revisions are given, the differences between them are shown. The --change
543 option can also be used as a shortcut to list the changed files of a
542 option can also be used as a shortcut to list the changed files of a
544 revision from its first parent.
543 revision from its first parent.
545
544
546 The codes used to show the status of files are:
545 The codes used to show the status of files are:
547
546
548 M = modified
547 M = modified
549 A = added
548 A = added
550 R = removed
549 R = removed
551 C = clean
550 C = clean
552 ! = missing (deleted by non-hg command, but still tracked)
551 ! = missing (deleted by non-hg command, but still tracked)
553 ? = not tracked
552 ? = not tracked
554 I = ignored
553 I = ignored
555 = origin of the previous file (with --copies)
554 = origin of the previous file (with --copies)
556
555
557 Returns 0 on success.
556 Returns 0 on success.
558
557
559 options ([+] can be repeated):
558 options ([+] can be repeated):
560
559
561 -A --all show status of all files
560 -A --all show status of all files
562 -m --modified show only modified files
561 -m --modified show only modified files
563 -a --added show only added files
562 -a --added show only added files
564 -r --removed show only removed files
563 -r --removed show only removed files
565 -d --deleted show only deleted (but tracked) files
564 -d --deleted show only deleted (but tracked) files
566 -c --clean show only files without changes
565 -c --clean show only files without changes
567 -u --unknown show only unknown (not tracked) files
566 -u --unknown show only unknown (not tracked) files
568 -i --ignored show only ignored files
567 -i --ignored show only ignored files
569 -n --no-status hide status prefix
568 -n --no-status hide status prefix
570 -C --copies show source of copied files
569 -C --copies show source of copied files
571 -0 --print0 end filenames with NUL, for use with xargs
570 -0 --print0 end filenames with NUL, for use with xargs
572 --rev REV [+] show difference from revision
571 --rev REV [+] show difference from revision
573 --change REV list the changed files of a revision
572 --change REV list the changed files of a revision
574 -I --include PATTERN [+] include names matching the given patterns
573 -I --include PATTERN [+] include names matching the given patterns
575 -X --exclude PATTERN [+] exclude names matching the given patterns
574 -X --exclude PATTERN [+] exclude names matching the given patterns
576 -S --subrepos recurse into subrepositories
575 -S --subrepos recurse into subrepositories
577
576
578 (some details hidden, use --verbose to show complete help)
577 (some details hidden, use --verbose to show complete help)
579
578
580 $ hg -q help status
579 $ hg -q help status
581 hg status [OPTION]... [FILE]...
580 hg status [OPTION]... [FILE]...
582
581
583 show changed files in the working directory
582 show changed files in the working directory
584
583
585 $ hg help foo
584 $ hg help foo
586 abort: no such help topic: foo
585 abort: no such help topic: foo
587 (try "hg help --keyword foo")
586 (try "hg help --keyword foo")
588 [255]
587 [255]
589
588
590 $ hg skjdfks
589 $ hg skjdfks
591 hg: unknown command 'skjdfks'
590 hg: unknown command 'skjdfks'
592 Mercurial Distributed SCM
591 Mercurial Distributed SCM
593
592
594 basic commands:
593 basic commands:
595
594
596 add add the specified files on the next commit
595 add add the specified files on the next commit
597 annotate show changeset information by line for each file
596 annotate show changeset information by line for each file
598 clone make a copy of an existing repository
597 clone make a copy of an existing repository
599 commit commit the specified files or all outstanding changes
598 commit commit the specified files or all outstanding changes
600 diff diff repository (or selected files)
599 diff diff repository (or selected files)
601 export dump the header and diffs for one or more changesets
600 export dump the header and diffs for one or more changesets
602 forget forget the specified files on the next commit
601 forget forget the specified files on the next commit
603 init create a new repository in the given directory
602 init create a new repository in the given directory
604 log show revision history of entire repository or files
603 log show revision history of entire repository or files
605 merge merge another revision into working directory
604 merge merge another revision into working directory
606 pull pull changes from the specified source
605 pull pull changes from the specified source
607 push push changes to the specified destination
606 push push changes to the specified destination
608 remove remove the specified files on the next commit
607 remove remove the specified files on the next commit
609 serve start stand-alone webserver
608 serve start stand-alone webserver
610 status show changed files in the working directory
609 status show changed files in the working directory
611 summary summarize working directory state
610 summary summarize working directory state
612 update update working directory (or switch revisions)
611 update update working directory (or switch revisions)
613
612
614 (use "hg help" for the full list of commands or "hg -v" for details)
613 (use "hg help" for the full list of commands or "hg -v" for details)
615 [255]
614 [255]
616
615
617
616
618 $ cat > helpext.py <<EOF
617 $ cat > helpext.py <<EOF
619 > import os
618 > import os
620 > from mercurial import cmdutil, commands
619 > from mercurial import cmdutil, commands
621 >
620 >
622 > cmdtable = {}
621 > cmdtable = {}
623 > command = cmdutil.command(cmdtable)
622 > command = cmdutil.command(cmdtable)
624 >
623 >
625 > @command('nohelp',
624 > @command('nohelp',
626 > [('', 'longdesc', 3, 'x'*90),
625 > [('', 'longdesc', 3, 'x'*90),
627 > ('n', '', None, 'normal desc'),
626 > ('n', '', None, 'normal desc'),
628 > ('', 'newline', '', 'line1\nline2')],
627 > ('', 'newline', '', 'line1\nline2')],
629 > 'hg nohelp',
628 > 'hg nohelp',
630 > norepo=True)
629 > norepo=True)
631 > @command('debugoptDEP', [('', 'dopt', None, 'option is DEPRECATED')])
630 > @command('debugoptDEP', [('', 'dopt', None, 'option is DEPRECATED')])
632 > @command('debugoptEXP', [('', 'eopt', None, 'option is EXPERIMENTAL')])
631 > @command('debugoptEXP', [('', 'eopt', None, 'option is EXPERIMENTAL')])
633 > def nohelp(ui, *args, **kwargs):
632 > def nohelp(ui, *args, **kwargs):
634 > pass
633 > pass
635 >
634 >
636 > EOF
635 > EOF
637 $ echo '[extensions]' >> $HGRCPATH
636 $ echo '[extensions]' >> $HGRCPATH
638 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
637 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
639
638
640 Test command with no help text
639 Test command with no help text
641
640
642 $ hg help nohelp
641 $ hg help nohelp
643 hg nohelp
642 hg nohelp
644
643
645 (no help text available)
644 (no help text available)
646
645
647 options:
646 options:
648
647
649 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
648 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
650 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
649 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
651 -n -- normal desc
650 -n -- normal desc
652 --newline VALUE line1 line2
651 --newline VALUE line1 line2
653
652
654 (some details hidden, use --verbose to show complete help)
653 (some details hidden, use --verbose to show complete help)
655
654
656 $ hg help -k nohelp
655 $ hg help -k nohelp
657 Commands:
656 Commands:
658
657
659 nohelp hg nohelp
658 nohelp hg nohelp
660
659
661 Extension Commands:
660 Extension Commands:
662
661
663 nohelp (no help text available)
662 nohelp (no help text available)
664
663
665 Test that default list of commands omits extension commands
664 Test that default list of commands omits extension commands
666
665
667 $ hg help
666 $ hg help
668 Mercurial Distributed SCM
667 Mercurial Distributed SCM
669
668
670 list of commands:
669 list of commands:
671
670
672 add add the specified files on the next commit
671 add add the specified files on the next commit
673 addremove add all new files, delete all missing files
672 addremove add all new files, delete all missing files
674 annotate show changeset information by line for each file
673 annotate show changeset information by line for each file
675 archive create an unversioned archive of a repository revision
674 archive create an unversioned archive of a repository revision
676 backout reverse effect of earlier changeset
675 backout reverse effect of earlier changeset
677 bisect subdivision search of changesets
676 bisect subdivision search of changesets
678 bookmarks create a new bookmark or list existing bookmarks
677 bookmarks create a new bookmark or list existing bookmarks
679 branch set or show the current branch name
678 branch set or show the current branch name
680 branches list repository named branches
679 branches list repository named branches
681 bundle create a changegroup file
680 bundle create a changegroup file
682 cat output the current or given revision of files
681 cat output the current or given revision of files
683 clone make a copy of an existing repository
682 clone make a copy of an existing repository
684 commit commit the specified files or all outstanding changes
683 commit commit the specified files or all outstanding changes
685 config show combined config settings from all hgrc files
684 config show combined config settings from all hgrc files
686 copy mark files as copied for the next commit
685 copy mark files as copied for the next commit
687 diff diff repository (or selected files)
686 diff diff repository (or selected files)
688 export dump the header and diffs for one or more changesets
687 export dump the header and diffs for one or more changesets
689 files list tracked files
688 files list tracked files
690 forget forget the specified files on the next commit
689 forget forget the specified files on the next commit
691 graft copy changes from other branches onto the current branch
690 graft copy changes from other branches onto the current branch
692 grep search for a pattern in specified files and revisions
691 grep search for a pattern in specified files and revisions
693 heads show branch heads
692 heads show branch heads
694 help show help for a given topic or a help overview
693 help show help for a given topic or a help overview
695 identify identify the working directory or specified revision
694 identify identify the working directory or specified revision
696 import import an ordered set of patches
695 import import an ordered set of patches
697 incoming show new changesets found in source
696 incoming show new changesets found in source
698 init create a new repository in the given directory
697 init create a new repository in the given directory
699 log show revision history of entire repository or files
698 log show revision history of entire repository or files
700 manifest output the current or given revision of the project manifest
699 manifest output the current or given revision of the project manifest
701 merge merge another revision into working directory
700 merge merge another revision into working directory
702 outgoing show changesets not found in the destination
701 outgoing show changesets not found in the destination
703 paths show aliases for remote repositories
702 paths show aliases for remote repositories
704 phase set or show the current phase name
703 phase set or show the current phase name
705 pull pull changes from the specified source
704 pull pull changes from the specified source
706 push push changes to the specified destination
705 push push changes to the specified destination
707 recover roll back an interrupted transaction
706 recover roll back an interrupted transaction
708 remove remove the specified files on the next commit
707 remove remove the specified files on the next commit
709 rename rename files; equivalent of copy + remove
708 rename rename files; equivalent of copy + remove
710 resolve redo merges or set/view the merge status of files
709 resolve redo merges or set/view the merge status of files
711 revert restore files to their checkout state
710 revert restore files to their checkout state
712 root print the root (top) of the current working directory
711 root print the root (top) of the current working directory
713 serve start stand-alone webserver
712 serve start stand-alone webserver
714 status show changed files in the working directory
713 status show changed files in the working directory
715 summary summarize working directory state
714 summary summarize working directory state
716 tag add one or more tags for the current or given revision
715 tag add one or more tags for the current or given revision
717 tags list repository tags
716 tags list repository tags
718 unbundle apply one or more changegroup files
717 unbundle apply one or more changegroup files
719 update update working directory (or switch revisions)
718 update update working directory (or switch revisions)
720 verify verify the integrity of the repository
719 verify verify the integrity of the repository
721 version output version and copyright information
720 version output version and copyright information
722
721
723 enabled extensions:
722 enabled extensions:
724
723
725 helpext (no help text available)
724 helpext (no help text available)
726
725
727 additional help topics:
726 additional help topics:
728
727
729 config Configuration Files
728 config Configuration Files
730 dates Date Formats
729 dates Date Formats
731 diffs Diff Formats
730 diffs Diff Formats
732 environment Environment Variables
731 environment Environment Variables
733 extensions Using Additional Features
732 extensions Using Additional Features
734 filesets Specifying File Sets
733 filesets Specifying File Sets
735 glossary Glossary
734 glossary Glossary
736 hgignore Syntax for Mercurial Ignore Files
735 hgignore Syntax for Mercurial Ignore Files
737 hgweb Configuring hgweb
736 hgweb Configuring hgweb
738 merge-tools Merge Tools
737 merge-tools Merge Tools
739 multirevs Specifying Multiple Revisions
738 multirevs Specifying Multiple Revisions
740 patterns File Name Patterns
739 patterns File Name Patterns
741 phases Working with Phases
740 phases Working with Phases
742 revisions Specifying Single Revisions
741 revisions Specifying Single Revisions
743 revsets Specifying Revision Sets
742 revsets Specifying Revision Sets
744 subrepos Subrepositories
743 subrepos Subrepositories
745 templating Template Usage
744 templating Template Usage
746 urls URL Paths
745 urls URL Paths
747
746
748 (use "hg help -v" to show built-in aliases and global options)
747 (use "hg help -v" to show built-in aliases and global options)
749
748
750
749
751 Test list of internal help commands
750 Test list of internal help commands
752
751
753 $ hg help debug
752 $ hg help debug
754 debug commands (internal and unsupported):
753 debug commands (internal and unsupported):
755
754
756 debugancestor
755 debugancestor
757 find the ancestor revision of two revisions in a given index
756 find the ancestor revision of two revisions in a given index
758 debugbuilddag
757 debugbuilddag
759 builds a repo with a given DAG from scratch in the current
758 builds a repo with a given DAG from scratch in the current
760 empty repo
759 empty repo
761 debugbundle lists the contents of a bundle
760 debugbundle lists the contents of a bundle
762 debugcheckstate
761 debugcheckstate
763 validate the correctness of the current dirstate
762 validate the correctness of the current dirstate
764 debugcommands
763 debugcommands
765 list all available commands and options
764 list all available commands and options
766 debugcomplete
765 debugcomplete
767 returns the completion list associated with the given command
766 returns the completion list associated with the given command
768 debugdag format the changelog or an index DAG as a concise textual
767 debugdag format the changelog or an index DAG as a concise textual
769 description
768 description
770 debugdata dump the contents of a data file revision
769 debugdata dump the contents of a data file revision
771 debugdate parse and display a date
770 debugdate parse and display a date
772 debugdirstate
771 debugdirstate
773 show the contents of the current dirstate
772 show the contents of the current dirstate
774 debugdiscovery
773 debugdiscovery
775 runs the changeset discovery protocol in isolation
774 runs the changeset discovery protocol in isolation
776 debugfileset parse and apply a fileset specification
775 debugfileset parse and apply a fileset specification
777 debugfsinfo show information detected about current filesystem
776 debugfsinfo show information detected about current filesystem
778 debuggetbundle
777 debuggetbundle
779 retrieves a bundle from a repo
778 retrieves a bundle from a repo
780 debugignore display the combined ignore pattern
779 debugignore display the combined ignore pattern
781 debugindex dump the contents of an index file
780 debugindex dump the contents of an index file
782 debugindexdot
781 debugindexdot
783 dump an index DAG as a graphviz dot file
782 dump an index DAG as a graphviz dot file
784 debuginstall test Mercurial installation
783 debuginstall test Mercurial installation
785 debugknown test whether node ids are known to a repo
784 debugknown test whether node ids are known to a repo
786 debuglocks show or modify state of locks
785 debuglocks show or modify state of locks
787 debugnamecomplete
786 debugnamecomplete
788 complete "names" - tags, open branch names, bookmark names
787 complete "names" - tags, open branch names, bookmark names
789 debugobsolete
788 debugobsolete
790 create arbitrary obsolete marker
789 create arbitrary obsolete marker
791 debugoptDEP (no help text available)
790 debugoptDEP (no help text available)
792 debugoptEXP (no help text available)
791 debugoptEXP (no help text available)
793 debugpathcomplete
792 debugpathcomplete
794 complete part or all of a tracked path
793 complete part or all of a tracked path
795 debugpushkey access the pushkey key/value protocol
794 debugpushkey access the pushkey key/value protocol
796 debugpvec (no help text available)
795 debugpvec (no help text available)
797 debugrebuilddirstate
796 debugrebuilddirstate
798 rebuild the dirstate as it would look like for the given
797 rebuild the dirstate as it would look like for the given
799 revision
798 revision
800 debugrename dump rename information
799 debugrename dump rename information
801 debugrevlog show data and statistics about a revlog
800 debugrevlog show data and statistics about a revlog
802 debugrevspec parse and apply a revision specification
801 debugrevspec parse and apply a revision specification
803 debugsetparents
802 debugsetparents
804 manually set the parents of the current working directory
803 manually set the parents of the current working directory
805 debugsub (no help text available)
804 debugsub (no help text available)
806 debugsuccessorssets
805 debugsuccessorssets
807 show set of successors for revision
806 show set of successors for revision
808 debugwalk show how files match on given patterns
807 debugwalk show how files match on given patterns
809 debugwireargs
808 debugwireargs
810 (no help text available)
809 (no help text available)
811
810
812 (use "hg help -v debug" to show built-in aliases and global options)
811 (use "hg help -v debug" to show built-in aliases and global options)
813
812
814
813
815 Test list of commands with command with no help text
814 Test list of commands with command with no help text
816
815
817 $ hg help helpext
816 $ hg help helpext
818 helpext extension - no help text available
817 helpext extension - no help text available
819
818
820 list of commands:
819 list of commands:
821
820
822 nohelp (no help text available)
821 nohelp (no help text available)
823
822
824 (use "hg help -v helpext" to show built-in aliases and global options)
823 (use "hg help -v helpext" to show built-in aliases and global options)
825
824
826
825
827 test deprecated and experimental options are hidden in command help
826 test deprecated and experimental options are hidden in command help
828 $ hg help debugoptDEP
827 $ hg help debugoptDEP
829 hg debugoptDEP
828 hg debugoptDEP
830
829
831 (no help text available)
830 (no help text available)
832
831
833 options:
832 options:
834
833
835 (some details hidden, use --verbose to show complete help)
834 (some details hidden, use --verbose to show complete help)
836
835
837 $ hg help debugoptEXP
836 $ hg help debugoptEXP
838 hg debugoptEXP
837 hg debugoptEXP
839
838
840 (no help text available)
839 (no help text available)
841
840
842 options:
841 options:
843
842
844 (some details hidden, use --verbose to show complete help)
843 (some details hidden, use --verbose to show complete help)
845
844
846 test deprecated and experimental options is shown with -v
845 test deprecated and experimental options is shown with -v
847 $ hg help -v debugoptDEP | grep dopt
846 $ hg help -v debugoptDEP | grep dopt
848 --dopt option is DEPRECATED
847 --dopt option is DEPRECATED
849 $ hg help -v debugoptEXP | grep eopt
848 $ hg help -v debugoptEXP | grep eopt
850 --eopt option is EXPERIMENTAL
849 --eopt option is EXPERIMENTAL
851
850
852 #if gettext
851 #if gettext
853 test deprecated option is hidden with translation with untranslated description
852 test deprecated option is hidden with translation with untranslated description
854 (use many globy for not failing on changed transaction)
853 (use many globy for not failing on changed transaction)
855 $ LANGUAGE=sv hg help debugoptDEP
854 $ LANGUAGE=sv hg help debugoptDEP
856 hg debugoptDEP
855 hg debugoptDEP
857
856
858 (*) (glob)
857 (*) (glob)
859
858
860 options:
859 options:
861
860
862 (some details hidden, use --verbose to show complete help)
861 (some details hidden, use --verbose to show complete help)
863 #endif
862 #endif
864
863
865 Test commands that collide with topics (issue4240)
864 Test commands that collide with topics (issue4240)
866
865
867 $ hg config -hq
866 $ hg config -hq
868 hg config [-u] [NAME]...
867 hg config [-u] [NAME]...
869
868
870 show combined config settings from all hgrc files
869 show combined config settings from all hgrc files
871 $ hg showconfig -hq
870 $ hg showconfig -hq
872 hg config [-u] [NAME]...
871 hg config [-u] [NAME]...
873
872
874 show combined config settings from all hgrc files
873 show combined config settings from all hgrc files
875
874
876 Test a help topic
875 Test a help topic
877
876
878 $ hg help revs
877 $ hg help revs
879 Specifying Single Revisions
878 Specifying Single Revisions
880 """""""""""""""""""""""""""
879 """""""""""""""""""""""""""
881
880
882 Mercurial supports several ways to specify individual revisions.
881 Mercurial supports several ways to specify individual revisions.
883
882
884 A plain integer is treated as a revision number. Negative integers are
883 A plain integer is treated as a revision number. Negative integers are
885 treated as sequential offsets from the tip, with -1 denoting the tip, -2
884 treated as sequential offsets from the tip, with -1 denoting the tip, -2
886 denoting the revision prior to the tip, and so forth.
885 denoting the revision prior to the tip, and so forth.
887
886
888 A 40-digit hexadecimal string is treated as a unique revision identifier.
887 A 40-digit hexadecimal string is treated as a unique revision identifier.
889
888
890 A hexadecimal string less than 40 characters long is treated as a unique
889 A hexadecimal string less than 40 characters long is treated as a unique
891 revision identifier and is referred to as a short-form identifier. A
890 revision identifier and is referred to as a short-form identifier. A
892 short-form identifier is only valid if it is the prefix of exactly one
891 short-form identifier is only valid if it is the prefix of exactly one
893 full-length identifier.
892 full-length identifier.
894
893
895 Any other string is treated as a bookmark, tag, or branch name. A bookmark
894 Any other string is treated as a bookmark, tag, or branch name. A bookmark
896 is a movable pointer to a revision. A tag is a permanent name associated
895 is a movable pointer to a revision. A tag is a permanent name associated
897 with a revision. A branch name denotes the tipmost open branch head of
896 with a revision. A branch name denotes the tipmost open branch head of
898 that branch - or if they are all closed, the tipmost closed head of the
897 that branch - or if they are all closed, the tipmost closed head of the
899 branch. Bookmark, tag, and branch names must not contain the ":"
898 branch. Bookmark, tag, and branch names must not contain the ":"
900 character.
899 character.
901
900
902 The reserved name "tip" always identifies the most recent revision.
901 The reserved name "tip" always identifies the most recent revision.
903
902
904 The reserved name "null" indicates the null revision. This is the revision
903 The reserved name "null" indicates the null revision. This is the revision
905 of an empty repository, and the parent of revision 0.
904 of an empty repository, and the parent of revision 0.
906
905
907 The reserved name "." indicates the working directory parent. If no
906 The reserved name "." indicates the working directory parent. If no
908 working directory is checked out, it is equivalent to null. If an
907 working directory is checked out, it is equivalent to null. If an
909 uncommitted merge is in progress, "." is the revision of the first parent.
908 uncommitted merge is in progress, "." is the revision of the first parent.
910
909
911 Test templating help
910 Test templating help
912
911
913 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
912 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
914 desc String. The text of the changeset description.
913 desc String. The text of the changeset description.
915 diffstat String. Statistics of changes with the following format:
914 diffstat String. Statistics of changes with the following format:
916 firstline Any text. Returns the first line of text.
915 firstline Any text. Returns the first line of text.
917 nonempty Any text. Returns '(none)' if the string is empty.
916 nonempty Any text. Returns '(none)' if the string is empty.
918
917
919 Test help hooks
918 Test help hooks
920
919
921 $ cat > helphook1.py <<EOF
920 $ cat > helphook1.py <<EOF
922 > from mercurial import help
921 > from mercurial import help
923 >
922 >
924 > def rewrite(topic, doc):
923 > def rewrite(topic, doc):
925 > return doc + '\nhelphook1\n'
924 > return doc + '\nhelphook1\n'
926 >
925 >
927 > def extsetup(ui):
926 > def extsetup(ui):
928 > help.addtopichook('revsets', rewrite)
927 > help.addtopichook('revsets', rewrite)
929 > EOF
928 > EOF
930 $ cat > helphook2.py <<EOF
929 $ cat > helphook2.py <<EOF
931 > from mercurial import help
930 > from mercurial import help
932 >
931 >
933 > def rewrite(topic, doc):
932 > def rewrite(topic, doc):
934 > return doc + '\nhelphook2\n'
933 > return doc + '\nhelphook2\n'
935 >
934 >
936 > def extsetup(ui):
935 > def extsetup(ui):
937 > help.addtopichook('revsets', rewrite)
936 > help.addtopichook('revsets', rewrite)
938 > EOF
937 > EOF
939 $ echo '[extensions]' >> $HGRCPATH
938 $ echo '[extensions]' >> $HGRCPATH
940 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
939 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
941 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
940 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
942 $ hg help revsets | grep helphook
941 $ hg help revsets | grep helphook
943 helphook1
942 helphook1
944 helphook2
943 helphook2
945
944
946 Test keyword search help
945 Test keyword search help
947
946
948 $ cat > prefixedname.py <<EOF
947 $ cat > prefixedname.py <<EOF
949 > '''matched against word "clone"
948 > '''matched against word "clone"
950 > '''
949 > '''
951 > EOF
950 > EOF
952 $ echo '[extensions]' >> $HGRCPATH
951 $ echo '[extensions]' >> $HGRCPATH
953 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
952 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
954 $ hg help -k clone
953 $ hg help -k clone
955 Topics:
954 Topics:
956
955
957 config Configuration Files
956 config Configuration Files
958 extensions Using Additional Features
957 extensions Using Additional Features
959 glossary Glossary
958 glossary Glossary
960 phases Working with Phases
959 phases Working with Phases
961 subrepos Subrepositories
960 subrepos Subrepositories
962 urls URL Paths
961 urls URL Paths
963
962
964 Commands:
963 Commands:
965
964
966 bookmarks create a new bookmark or list existing bookmarks
965 bookmarks create a new bookmark or list existing bookmarks
967 clone make a copy of an existing repository
966 clone make a copy of an existing repository
968 paths show aliases for remote repositories
967 paths show aliases for remote repositories
969 update update working directory (or switch revisions)
968 update update working directory (or switch revisions)
970
969
971 Extensions:
970 Extensions:
972
971
973 prefixedname matched against word "clone"
972 prefixedname matched against word "clone"
974 relink recreates hardlinks between repository clones
973 relink recreates hardlinks between repository clones
975
974
976 Extension Commands:
975 Extension Commands:
977
976
978 qclone clone main and patch repository at same time
977 qclone clone main and patch repository at same time
979
978
980 Test unfound topic
979 Test unfound topic
981
980
982 $ hg help nonexistingtopicthatwillneverexisteverever
981 $ hg help nonexistingtopicthatwillneverexisteverever
983 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
982 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
984 (try "hg help --keyword nonexistingtopicthatwillneverexisteverever")
983 (try "hg help --keyword nonexistingtopicthatwillneverexisteverever")
985 [255]
984 [255]
986
985
987 Test unfound keyword
986 Test unfound keyword
988
987
989 $ hg help --keyword nonexistingwordthatwillneverexisteverever
988 $ hg help --keyword nonexistingwordthatwillneverexisteverever
990 abort: no matches
989 abort: no matches
991 (try "hg help" for a list of topics)
990 (try "hg help" for a list of topics)
992 [255]
991 [255]
993
992
994 Test omit indicating for help
993 Test omit indicating for help
995
994
996 $ cat > addverboseitems.py <<EOF
995 $ cat > addverboseitems.py <<EOF
997 > '''extension to test omit indicating.
996 > '''extension to test omit indicating.
998 >
997 >
999 > This paragraph is never omitted (for extension)
998 > This paragraph is never omitted (for extension)
1000 >
999 >
1001 > .. container:: verbose
1000 > .. container:: verbose
1002 >
1001 >
1003 > This paragraph is omitted,
1002 > This paragraph is omitted,
1004 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1003 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1005 >
1004 >
1006 > This paragraph is never omitted, too (for extension)
1005 > This paragraph is never omitted, too (for extension)
1007 > '''
1006 > '''
1008 >
1007 >
1009 > from mercurial import help, commands
1008 > from mercurial import help, commands
1010 > testtopic = """This paragraph is never omitted (for topic).
1009 > testtopic = """This paragraph is never omitted (for topic).
1011 >
1010 >
1012 > .. container:: verbose
1011 > .. container:: verbose
1013 >
1012 >
1014 > This paragraph is omitted,
1013 > This paragraph is omitted,
1015 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1014 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1016 >
1015 >
1017 > This paragraph is never omitted, too (for topic)
1016 > This paragraph is never omitted, too (for topic)
1018 > """
1017 > """
1019 > def extsetup(ui):
1018 > def extsetup(ui):
1020 > help.helptable.append((["topic-containing-verbose"],
1019 > help.helptable.append((["topic-containing-verbose"],
1021 > "This is the topic to test omit indicating.",
1020 > "This is the topic to test omit indicating.",
1022 > lambda : testtopic))
1021 > lambda : testtopic))
1023 > EOF
1022 > EOF
1024 $ echo '[extensions]' >> $HGRCPATH
1023 $ echo '[extensions]' >> $HGRCPATH
1025 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1024 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1026 $ hg help addverboseitems
1025 $ hg help addverboseitems
1027 addverboseitems extension - extension to test omit indicating.
1026 addverboseitems extension - extension to test omit indicating.
1028
1027
1029 This paragraph is never omitted (for extension)
1028 This paragraph is never omitted (for extension)
1030
1029
1031 This paragraph is never omitted, too (for extension)
1030 This paragraph is never omitted, too (for extension)
1032
1031
1033 (some details hidden, use --verbose to show complete help)
1032 (some details hidden, use --verbose to show complete help)
1034
1033
1035 no commands defined
1034 no commands defined
1036 $ hg help -v addverboseitems
1035 $ hg help -v addverboseitems
1037 addverboseitems extension - extension to test omit indicating.
1036 addverboseitems extension - extension to test omit indicating.
1038
1037
1039 This paragraph is never omitted (for extension)
1038 This paragraph is never omitted (for extension)
1040
1039
1041 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1040 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1042 extension)
1041 extension)
1043
1042
1044 This paragraph is never omitted, too (for extension)
1043 This paragraph is never omitted, too (for extension)
1045
1044
1046 no commands defined
1045 no commands defined
1047 $ hg help topic-containing-verbose
1046 $ hg help topic-containing-verbose
1048 This is the topic to test omit indicating.
1047 This is the topic to test omit indicating.
1049 """"""""""""""""""""""""""""""""""""""""""
1048 """"""""""""""""""""""""""""""""""""""""""
1050
1049
1051 This paragraph is never omitted (for topic).
1050 This paragraph is never omitted (for topic).
1052
1051
1053 This paragraph is never omitted, too (for topic)
1052 This paragraph is never omitted, too (for topic)
1054
1053
1055 (some details hidden, use --verbose to show complete help)
1054 (some details hidden, use --verbose to show complete help)
1056 $ hg help -v topic-containing-verbose
1055 $ hg help -v topic-containing-verbose
1057 This is the topic to test omit indicating.
1056 This is the topic to test omit indicating.
1058 """"""""""""""""""""""""""""""""""""""""""
1057 """"""""""""""""""""""""""""""""""""""""""
1059
1058
1060 This paragraph is never omitted (for topic).
1059 This paragraph is never omitted (for topic).
1061
1060
1062 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1061 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1063 topic)
1062 topic)
1064
1063
1065 This paragraph is never omitted, too (for topic)
1064 This paragraph is never omitted, too (for topic)
1066
1065
1067 Test section lookup
1066 Test section lookup
1068
1067
1069 $ hg help revset.merge
1068 $ hg help revset.merge
1070 "merge()"
1069 "merge()"
1071 Changeset is a merge changeset.
1070 Changeset is a merge changeset.
1072
1071
1073 $ hg help glossary.dag
1072 $ hg help glossary.dag
1074 DAG
1073 DAG
1075 The repository of changesets of a distributed version control system
1074 The repository of changesets of a distributed version control system
1076 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1075 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1077 of nodes and edges, where nodes correspond to changesets and edges
1076 of nodes and edges, where nodes correspond to changesets and edges
1078 imply a parent -> child relation. This graph can be visualized by
1077 imply a parent -> child relation. This graph can be visualized by
1079 graphical tools such as "hg log --graph". In Mercurial, the DAG is
1078 graphical tools such as "hg log --graph". In Mercurial, the DAG is
1080 limited by the requirement for children to have at most two parents.
1079 limited by the requirement for children to have at most two parents.
1081
1080
1082
1081
1083 $ hg help hgrc.paths
1082 $ hg help hgrc.paths
1084 "paths"
1083 "paths"
1085 -------
1084 -------
1086
1085
1087 Assigns symbolic names to repositories. The left side is the symbolic
1086 Assigns symbolic names to repositories. The left side is the symbolic
1088 name, and the right gives the directory or URL that is the location of the
1087 name, and the right gives the directory or URL that is the location of the
1089 repository. Default paths can be declared by setting the following
1088 repository. Default paths can be declared by setting the following
1090 entries.
1089 entries.
1091
1090
1092 "default"
1091 "default"
1093 Directory or URL to use when pulling if no source is specified.
1092 Directory or URL to use when pulling if no source is specified.
1094 Default is set to repository from which the current repository was
1093 Default is set to repository from which the current repository was
1095 cloned.
1094 cloned.
1096
1095
1097 "default-push"
1096 "default-push"
1098 Optional. Directory or URL to use when pushing if no destination is
1097 Optional. Directory or URL to use when pushing if no destination is
1099 specified.
1098 specified.
1100
1099
1101 Custom paths can be defined by assigning the path to a name that later can
1100 Custom paths can be defined by assigning the path to a name that later can
1102 be used from the command line. Example:
1101 be used from the command line. Example:
1103
1102
1104 [paths]
1103 [paths]
1105 my_path = http://example.com/path
1104 my_path = http://example.com/path
1106
1105
1107 To push to the path defined in "my_path" run the command:
1106 To push to the path defined in "my_path" run the command:
1108
1107
1109 hg push my_path
1108 hg push my_path
1110
1109
1111 $ hg help glossary.mcguffin
1110 $ hg help glossary.mcguffin
1112 abort: help section not found
1111 abort: help section not found
1113 [255]
1112 [255]
1114
1113
1115 $ hg help glossary.mc.guffin
1114 $ hg help glossary.mc.guffin
1116 abort: help section not found
1115 abort: help section not found
1117 [255]
1116 [255]
1118
1117
1119 Test dynamic list of merge tools only shows up once
1118 Test dynamic list of merge tools only shows up once
1120 $ hg help merge-tools
1119 $ hg help merge-tools
1121 Merge Tools
1120 Merge Tools
1122 """""""""""
1121 """""""""""
1123
1122
1124 To merge files Mercurial uses merge tools.
1123 To merge files Mercurial uses merge tools.
1125
1124
1126 A merge tool combines two different versions of a file into a merged file.
1125 A merge tool combines two different versions of a file into a merged file.
1127 Merge tools are given the two files and the greatest common ancestor of
1126 Merge tools are given the two files and the greatest common ancestor of
1128 the two file versions, so they can determine the changes made on both
1127 the two file versions, so they can determine the changes made on both
1129 branches.
1128 branches.
1130
1129
1131 Merge tools are used both for "hg resolve", "hg merge", "hg update", "hg
1130 Merge tools are used both for "hg resolve", "hg merge", "hg update", "hg
1132 backout" and in several extensions.
1131 backout" and in several extensions.
1133
1132
1134 Usually, the merge tool tries to automatically reconcile the files by
1133 Usually, the merge tool tries to automatically reconcile the files by
1135 combining all non-overlapping changes that occurred separately in the two
1134 combining all non-overlapping changes that occurred separately in the two
1136 different evolutions of the same initial base file. Furthermore, some
1135 different evolutions of the same initial base file. Furthermore, some
1137 interactive merge programs make it easier to manually resolve conflicting
1136 interactive merge programs make it easier to manually resolve conflicting
1138 merges, either in a graphical way, or by inserting some conflict markers.
1137 merges, either in a graphical way, or by inserting some conflict markers.
1139 Mercurial does not include any interactive merge programs but relies on
1138 Mercurial does not include any interactive merge programs but relies on
1140 external tools for that.
1139 external tools for that.
1141
1140
1142 Available merge tools
1141 Available merge tools
1143 =====================
1142 =====================
1144
1143
1145 External merge tools and their properties are configured in the merge-
1144 External merge tools and their properties are configured in the merge-
1146 tools configuration section - see hgrc(5) - but they can often just be
1145 tools configuration section - see hgrc(5) - but they can often just be
1147 named by their executable.
1146 named by their executable.
1148
1147
1149 A merge tool is generally usable if its executable can be found on the
1148 A merge tool is generally usable if its executable can be found on the
1150 system and if it can handle the merge. The executable is found if it is an
1149 system and if it can handle the merge. The executable is found if it is an
1151 absolute or relative executable path or the name of an application in the
1150 absolute or relative executable path or the name of an application in the
1152 executable search path. The tool is assumed to be able to handle the merge
1151 executable search path. The tool is assumed to be able to handle the merge
1153 if it can handle symlinks if the file is a symlink, if it can handle
1152 if it can handle symlinks if the file is a symlink, if it can handle
1154 binary files if the file is binary, and if a GUI is available if the tool
1153 binary files if the file is binary, and if a GUI is available if the tool
1155 requires a GUI.
1154 requires a GUI.
1156
1155
1157 There are some internal merge tools which can be used. The internal merge
1156 There are some internal merge tools which can be used. The internal merge
1158 tools are:
1157 tools are:
1159
1158
1160 ":dump"
1159 ":dump"
1161 Creates three versions of the files to merge, containing the contents of
1160 Creates three versions of the files to merge, containing the contents of
1162 local, other and base. These files can then be used to perform a merge
1161 local, other and base. These files can then be used to perform a merge
1163 manually. If the file to be merged is named "a.txt", these files will
1162 manually. If the file to be merged is named "a.txt", these files will
1164 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1163 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1165 they will be placed in the same directory as "a.txt".
1164 they will be placed in the same directory as "a.txt".
1166
1165
1167 ":fail"
1166 ":fail"
1168 Rather than attempting to merge files that were modified on both
1167 Rather than attempting to merge files that were modified on both
1169 branches, it marks them as unresolved. The resolve command must be used
1168 branches, it marks them as unresolved. The resolve command must be used
1170 to resolve these conflicts.
1169 to resolve these conflicts.
1171
1170
1172 ":local"
1171 ":local"
1173 Uses the local version of files as the merged version.
1172 Uses the local version of files as the merged version.
1174
1173
1175 ":merge"
1174 ":merge"
1176 Uses the internal non-interactive simple merge algorithm for merging
1175 Uses the internal non-interactive simple merge algorithm for merging
1177 files. It will fail if there are any conflicts and leave markers in the
1176 files. It will fail if there are any conflicts and leave markers in the
1178 partially merged file. Markers will have two sections, one for each side
1177 partially merged file. Markers will have two sections, one for each side
1179 of merge.
1178 of merge.
1180
1179
1181 ":merge3"
1180 ":merge3"
1182 Uses the internal non-interactive simple merge algorithm for merging
1181 Uses the internal non-interactive simple merge algorithm for merging
1183 files. It will fail if there are any conflicts and leave markers in the
1182 files. It will fail if there are any conflicts and leave markers in the
1184 partially merged file. Marker will have three sections, one from each
1183 partially merged file. Marker will have three sections, one from each
1185 side of the merge and one for the base content.
1184 side of the merge and one for the base content.
1186
1185
1187 ":other"
1186 ":other"
1188 Uses the other version of files as the merged version.
1187 Uses the other version of files as the merged version.
1189
1188
1190 ":prompt"
1189 ":prompt"
1191 Asks the user which of the local or the other version to keep as the
1190 Asks the user which of the local or the other version to keep as the
1192 merged version.
1191 merged version.
1193
1192
1194 ":tagmerge"
1193 ":tagmerge"
1195 Uses the internal tag merge algorithm (experimental).
1194 Uses the internal tag merge algorithm (experimental).
1196
1195
1197 Internal tools are always available and do not require a GUI but will by
1196 Internal tools are always available and do not require a GUI but will by
1198 default not handle symlinks or binary files.
1197 default not handle symlinks or binary files.
1199
1198
1200 Choosing a merge tool
1199 Choosing a merge tool
1201 =====================
1200 =====================
1202
1201
1203 Mercurial uses these rules when deciding which merge tool to use:
1202 Mercurial uses these rules when deciding which merge tool to use:
1204
1203
1205 1. If a tool has been specified with the --tool option to merge or
1204 1. If a tool has been specified with the --tool option to merge or
1206 resolve, it is used. If it is the name of a tool in the merge-tools
1205 resolve, it is used. If it is the name of a tool in the merge-tools
1207 configuration, its configuration is used. Otherwise the specified tool
1206 configuration, its configuration is used. Otherwise the specified tool
1208 must be executable by the shell.
1207 must be executable by the shell.
1209 2. If the "HGMERGE" environment variable is present, its value is used and
1208 2. If the "HGMERGE" environment variable is present, its value is used and
1210 must be executable by the shell.
1209 must be executable by the shell.
1211 3. If the filename of the file to be merged matches any of the patterns in
1210 3. If the filename of the file to be merged matches any of the patterns in
1212 the merge-patterns configuration section, the first usable merge tool
1211 the merge-patterns configuration section, the first usable merge tool
1213 corresponding to a matching pattern is used. Here, binary capabilities
1212 corresponding to a matching pattern is used. Here, binary capabilities
1214 of the merge tool are not considered.
1213 of the merge tool are not considered.
1215 4. If ui.merge is set it will be considered next. If the value is not the
1214 4. If ui.merge is set it will be considered next. If the value is not the
1216 name of a configured tool, the specified value is used and must be
1215 name of a configured tool, the specified value is used and must be
1217 executable by the shell. Otherwise the named tool is used if it is
1216 executable by the shell. Otherwise the named tool is used if it is
1218 usable.
1217 usable.
1219 5. If any usable merge tools are present in the merge-tools configuration
1218 5. If any usable merge tools are present in the merge-tools configuration
1220 section, the one with the highest priority is used.
1219 section, the one with the highest priority is used.
1221 6. If a program named "hgmerge" can be found on the system, it is used -
1220 6. If a program named "hgmerge" can be found on the system, it is used -
1222 but it will by default not be used for symlinks and binary files.
1221 but it will by default not be used for symlinks and binary files.
1223 7. If the file to be merged is not binary and is not a symlink, then
1222 7. If the file to be merged is not binary and is not a symlink, then
1224 internal ":merge" is used.
1223 internal ":merge" is used.
1225 8. The merge of the file fails and must be resolved before commit.
1224 8. The merge of the file fails and must be resolved before commit.
1226
1225
1227 Note:
1226 Note:
1228 After selecting a merge program, Mercurial will by default attempt to
1227 After selecting a merge program, Mercurial will by default attempt to
1229 merge the files using a simple merge algorithm first. Only if it
1228 merge the files using a simple merge algorithm first. Only if it
1230 doesn't succeed because of conflicting changes Mercurial will actually
1229 doesn't succeed because of conflicting changes Mercurial will actually
1231 execute the merge program. Whether to use the simple merge algorithm
1230 execute the merge program. Whether to use the simple merge algorithm
1232 first can be controlled by the premerge setting of the merge tool.
1231 first can be controlled by the premerge setting of the merge tool.
1233 Premerge is enabled by default unless the file is binary or a symlink.
1232 Premerge is enabled by default unless the file is binary or a symlink.
1234
1233
1235 See the merge-tools and ui sections of hgrc(5) for details on the
1234 See the merge-tools and ui sections of hgrc(5) for details on the
1236 configuration of merge tools.
1235 configuration of merge tools.
1237
1236
1238 Test usage of section marks in help documents
1237 Test usage of section marks in help documents
1239
1238
1240 $ cd "$TESTDIR"/../doc
1239 $ cd "$TESTDIR"/../doc
1241 $ python check-seclevel.py
1240 $ python check-seclevel.py
1242 $ cd $TESTTMP
1241 $ cd $TESTTMP
1243
1242
1244 #if serve
1243 #if serve
1245
1244
1246 Test the help pages in hgweb.
1245 Test the help pages in hgweb.
1247
1246
1248 Dish up an empty repo; serve it cold.
1247 Dish up an empty repo; serve it cold.
1249
1248
1250 $ hg init "$TESTTMP/test"
1249 $ hg init "$TESTTMP/test"
1251 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1250 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1252 $ cat hg.pid >> $DAEMON_PIDS
1251 $ cat hg.pid >> $DAEMON_PIDS
1253
1252
1254 $ get-with-headers.py 127.0.0.1:$HGPORT "help"
1253 $ get-with-headers.py 127.0.0.1:$HGPORT "help"
1255 200 Script output follows
1254 200 Script output follows
1256
1255
1257 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1256 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1258 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1257 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1259 <head>
1258 <head>
1260 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1259 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1261 <meta name="robots" content="index, nofollow" />
1260 <meta name="robots" content="index, nofollow" />
1262 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1261 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1263 <script type="text/javascript" src="/static/mercurial.js"></script>
1262 <script type="text/javascript" src="/static/mercurial.js"></script>
1264
1263
1265 <title>Help: Index</title>
1264 <title>Help: Index</title>
1266 </head>
1265 </head>
1267 <body>
1266 <body>
1268
1267
1269 <div class="container">
1268 <div class="container">
1270 <div class="menu">
1269 <div class="menu">
1271 <div class="logo">
1270 <div class="logo">
1272 <a href="http://mercurial.selenic.com/">
1271 <a href="http://mercurial.selenic.com/">
1273 <img src="/static/hglogo.png" alt="mercurial" /></a>
1272 <img src="/static/hglogo.png" alt="mercurial" /></a>
1274 </div>
1273 </div>
1275 <ul>
1274 <ul>
1276 <li><a href="/shortlog">log</a></li>
1275 <li><a href="/shortlog">log</a></li>
1277 <li><a href="/graph">graph</a></li>
1276 <li><a href="/graph">graph</a></li>
1278 <li><a href="/tags">tags</a></li>
1277 <li><a href="/tags">tags</a></li>
1279 <li><a href="/bookmarks">bookmarks</a></li>
1278 <li><a href="/bookmarks">bookmarks</a></li>
1280 <li><a href="/branches">branches</a></li>
1279 <li><a href="/branches">branches</a></li>
1281 </ul>
1280 </ul>
1282 <ul>
1281 <ul>
1283 <li class="active">help</li>
1282 <li class="active">help</li>
1284 </ul>
1283 </ul>
1285 </div>
1284 </div>
1286
1285
1287 <div class="main">
1286 <div class="main">
1288 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1287 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1289 <form class="search" action="/log">
1288 <form class="search" action="/log">
1290
1289
1291 <p><input name="rev" id="search1" type="text" size="30" /></p>
1290 <p><input name="rev" id="search1" type="text" size="30" /></p>
1292 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1291 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1293 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1292 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1294 </form>
1293 </form>
1295 <table class="bigtable">
1294 <table class="bigtable">
1296 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
1295 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
1297
1296
1298 <tr><td>
1297 <tr><td>
1299 <a href="/help/config">
1298 <a href="/help/config">
1300 config
1299 config
1301 </a>
1300 </a>
1302 </td><td>
1301 </td><td>
1303 Configuration Files
1302 Configuration Files
1304 </td></tr>
1303 </td></tr>
1305 <tr><td>
1304 <tr><td>
1306 <a href="/help/dates">
1305 <a href="/help/dates">
1307 dates
1306 dates
1308 </a>
1307 </a>
1309 </td><td>
1308 </td><td>
1310 Date Formats
1309 Date Formats
1311 </td></tr>
1310 </td></tr>
1312 <tr><td>
1311 <tr><td>
1313 <a href="/help/diffs">
1312 <a href="/help/diffs">
1314 diffs
1313 diffs
1315 </a>
1314 </a>
1316 </td><td>
1315 </td><td>
1317 Diff Formats
1316 Diff Formats
1318 </td></tr>
1317 </td></tr>
1319 <tr><td>
1318 <tr><td>
1320 <a href="/help/environment">
1319 <a href="/help/environment">
1321 environment
1320 environment
1322 </a>
1321 </a>
1323 </td><td>
1322 </td><td>
1324 Environment Variables
1323 Environment Variables
1325 </td></tr>
1324 </td></tr>
1326 <tr><td>
1325 <tr><td>
1327 <a href="/help/extensions">
1326 <a href="/help/extensions">
1328 extensions
1327 extensions
1329 </a>
1328 </a>
1330 </td><td>
1329 </td><td>
1331 Using Additional Features
1330 Using Additional Features
1332 </td></tr>
1331 </td></tr>
1333 <tr><td>
1332 <tr><td>
1334 <a href="/help/filesets">
1333 <a href="/help/filesets">
1335 filesets
1334 filesets
1336 </a>
1335 </a>
1337 </td><td>
1336 </td><td>
1338 Specifying File Sets
1337 Specifying File Sets
1339 </td></tr>
1338 </td></tr>
1340 <tr><td>
1339 <tr><td>
1341 <a href="/help/glossary">
1340 <a href="/help/glossary">
1342 glossary
1341 glossary
1343 </a>
1342 </a>
1344 </td><td>
1343 </td><td>
1345 Glossary
1344 Glossary
1346 </td></tr>
1345 </td></tr>
1347 <tr><td>
1346 <tr><td>
1348 <a href="/help/hgignore">
1347 <a href="/help/hgignore">
1349 hgignore
1348 hgignore
1350 </a>
1349 </a>
1351 </td><td>
1350 </td><td>
1352 Syntax for Mercurial Ignore Files
1351 Syntax for Mercurial Ignore Files
1353 </td></tr>
1352 </td></tr>
1354 <tr><td>
1353 <tr><td>
1355 <a href="/help/hgweb">
1354 <a href="/help/hgweb">
1356 hgweb
1355 hgweb
1357 </a>
1356 </a>
1358 </td><td>
1357 </td><td>
1359 Configuring hgweb
1358 Configuring hgweb
1360 </td></tr>
1359 </td></tr>
1361 <tr><td>
1360 <tr><td>
1362 <a href="/help/merge-tools">
1361 <a href="/help/merge-tools">
1363 merge-tools
1362 merge-tools
1364 </a>
1363 </a>
1365 </td><td>
1364 </td><td>
1366 Merge Tools
1365 Merge Tools
1367 </td></tr>
1366 </td></tr>
1368 <tr><td>
1367 <tr><td>
1369 <a href="/help/multirevs">
1368 <a href="/help/multirevs">
1370 multirevs
1369 multirevs
1371 </a>
1370 </a>
1372 </td><td>
1371 </td><td>
1373 Specifying Multiple Revisions
1372 Specifying Multiple Revisions
1374 </td></tr>
1373 </td></tr>
1375 <tr><td>
1374 <tr><td>
1376 <a href="/help/patterns">
1375 <a href="/help/patterns">
1377 patterns
1376 patterns
1378 </a>
1377 </a>
1379 </td><td>
1378 </td><td>
1380 File Name Patterns
1379 File Name Patterns
1381 </td></tr>
1380 </td></tr>
1382 <tr><td>
1381 <tr><td>
1383 <a href="/help/phases">
1382 <a href="/help/phases">
1384 phases
1383 phases
1385 </a>
1384 </a>
1386 </td><td>
1385 </td><td>
1387 Working with Phases
1386 Working with Phases
1388 </td></tr>
1387 </td></tr>
1389 <tr><td>
1388 <tr><td>
1390 <a href="/help/revisions">
1389 <a href="/help/revisions">
1391 revisions
1390 revisions
1392 </a>
1391 </a>
1393 </td><td>
1392 </td><td>
1394 Specifying Single Revisions
1393 Specifying Single Revisions
1395 </td></tr>
1394 </td></tr>
1396 <tr><td>
1395 <tr><td>
1397 <a href="/help/revsets">
1396 <a href="/help/revsets">
1398 revsets
1397 revsets
1399 </a>
1398 </a>
1400 </td><td>
1399 </td><td>
1401 Specifying Revision Sets
1400 Specifying Revision Sets
1402 </td></tr>
1401 </td></tr>
1403 <tr><td>
1402 <tr><td>
1404 <a href="/help/subrepos">
1403 <a href="/help/subrepos">
1405 subrepos
1404 subrepos
1406 </a>
1405 </a>
1407 </td><td>
1406 </td><td>
1408 Subrepositories
1407 Subrepositories
1409 </td></tr>
1408 </td></tr>
1410 <tr><td>
1409 <tr><td>
1411 <a href="/help/templating">
1410 <a href="/help/templating">
1412 templating
1411 templating
1413 </a>
1412 </a>
1414 </td><td>
1413 </td><td>
1415 Template Usage
1414 Template Usage
1416 </td></tr>
1415 </td></tr>
1417 <tr><td>
1416 <tr><td>
1418 <a href="/help/urls">
1417 <a href="/help/urls">
1419 urls
1418 urls
1420 </a>
1419 </a>
1421 </td><td>
1420 </td><td>
1422 URL Paths
1421 URL Paths
1423 </td></tr>
1422 </td></tr>
1424 <tr><td>
1423 <tr><td>
1425 <a href="/help/topic-containing-verbose">
1424 <a href="/help/topic-containing-verbose">
1426 topic-containing-verbose
1425 topic-containing-verbose
1427 </a>
1426 </a>
1428 </td><td>
1427 </td><td>
1429 This is the topic to test omit indicating.
1428 This is the topic to test omit indicating.
1430 </td></tr>
1429 </td></tr>
1431
1430
1432 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1431 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1433
1432
1434 <tr><td>
1433 <tr><td>
1435 <a href="/help/add">
1434 <a href="/help/add">
1436 add
1435 add
1437 </a>
1436 </a>
1438 </td><td>
1437 </td><td>
1439 add the specified files on the next commit
1438 add the specified files on the next commit
1440 </td></tr>
1439 </td></tr>
1441 <tr><td>
1440 <tr><td>
1442 <a href="/help/annotate">
1441 <a href="/help/annotate">
1443 annotate
1442 annotate
1444 </a>
1443 </a>
1445 </td><td>
1444 </td><td>
1446 show changeset information by line for each file
1445 show changeset information by line for each file
1447 </td></tr>
1446 </td></tr>
1448 <tr><td>
1447 <tr><td>
1449 <a href="/help/clone">
1448 <a href="/help/clone">
1450 clone
1449 clone
1451 </a>
1450 </a>
1452 </td><td>
1451 </td><td>
1453 make a copy of an existing repository
1452 make a copy of an existing repository
1454 </td></tr>
1453 </td></tr>
1455 <tr><td>
1454 <tr><td>
1456 <a href="/help/commit">
1455 <a href="/help/commit">
1457 commit
1456 commit
1458 </a>
1457 </a>
1459 </td><td>
1458 </td><td>
1460 commit the specified files or all outstanding changes
1459 commit the specified files or all outstanding changes
1461 </td></tr>
1460 </td></tr>
1462 <tr><td>
1461 <tr><td>
1463 <a href="/help/diff">
1462 <a href="/help/diff">
1464 diff
1463 diff
1465 </a>
1464 </a>
1466 </td><td>
1465 </td><td>
1467 diff repository (or selected files)
1466 diff repository (or selected files)
1468 </td></tr>
1467 </td></tr>
1469 <tr><td>
1468 <tr><td>
1470 <a href="/help/export">
1469 <a href="/help/export">
1471 export
1470 export
1472 </a>
1471 </a>
1473 </td><td>
1472 </td><td>
1474 dump the header and diffs for one or more changesets
1473 dump the header and diffs for one or more changesets
1475 </td></tr>
1474 </td></tr>
1476 <tr><td>
1475 <tr><td>
1477 <a href="/help/forget">
1476 <a href="/help/forget">
1478 forget
1477 forget
1479 </a>
1478 </a>
1480 </td><td>
1479 </td><td>
1481 forget the specified files on the next commit
1480 forget the specified files on the next commit
1482 </td></tr>
1481 </td></tr>
1483 <tr><td>
1482 <tr><td>
1484 <a href="/help/init">
1483 <a href="/help/init">
1485 init
1484 init
1486 </a>
1485 </a>
1487 </td><td>
1486 </td><td>
1488 create a new repository in the given directory
1487 create a new repository in the given directory
1489 </td></tr>
1488 </td></tr>
1490 <tr><td>
1489 <tr><td>
1491 <a href="/help/log">
1490 <a href="/help/log">
1492 log
1491 log
1493 </a>
1492 </a>
1494 </td><td>
1493 </td><td>
1495 show revision history of entire repository or files
1494 show revision history of entire repository or files
1496 </td></tr>
1495 </td></tr>
1497 <tr><td>
1496 <tr><td>
1498 <a href="/help/merge">
1497 <a href="/help/merge">
1499 merge
1498 merge
1500 </a>
1499 </a>
1501 </td><td>
1500 </td><td>
1502 merge another revision into working directory
1501 merge another revision into working directory
1503 </td></tr>
1502 </td></tr>
1504 <tr><td>
1503 <tr><td>
1505 <a href="/help/pull">
1504 <a href="/help/pull">
1506 pull
1505 pull
1507 </a>
1506 </a>
1508 </td><td>
1507 </td><td>
1509 pull changes from the specified source
1508 pull changes from the specified source
1510 </td></tr>
1509 </td></tr>
1511 <tr><td>
1510 <tr><td>
1512 <a href="/help/push">
1511 <a href="/help/push">
1513 push
1512 push
1514 </a>
1513 </a>
1515 </td><td>
1514 </td><td>
1516 push changes to the specified destination
1515 push changes to the specified destination
1517 </td></tr>
1516 </td></tr>
1518 <tr><td>
1517 <tr><td>
1519 <a href="/help/remove">
1518 <a href="/help/remove">
1520 remove
1519 remove
1521 </a>
1520 </a>
1522 </td><td>
1521 </td><td>
1523 remove the specified files on the next commit
1522 remove the specified files on the next commit
1524 </td></tr>
1523 </td></tr>
1525 <tr><td>
1524 <tr><td>
1526 <a href="/help/serve">
1525 <a href="/help/serve">
1527 serve
1526 serve
1528 </a>
1527 </a>
1529 </td><td>
1528 </td><td>
1530 start stand-alone webserver
1529 start stand-alone webserver
1531 </td></tr>
1530 </td></tr>
1532 <tr><td>
1531 <tr><td>
1533 <a href="/help/status">
1532 <a href="/help/status">
1534 status
1533 status
1535 </a>
1534 </a>
1536 </td><td>
1535 </td><td>
1537 show changed files in the working directory
1536 show changed files in the working directory
1538 </td></tr>
1537 </td></tr>
1539 <tr><td>
1538 <tr><td>
1540 <a href="/help/summary">
1539 <a href="/help/summary">
1541 summary
1540 summary
1542 </a>
1541 </a>
1543 </td><td>
1542 </td><td>
1544 summarize working directory state
1543 summarize working directory state
1545 </td></tr>
1544 </td></tr>
1546 <tr><td>
1545 <tr><td>
1547 <a href="/help/update">
1546 <a href="/help/update">
1548 update
1547 update
1549 </a>
1548 </a>
1550 </td><td>
1549 </td><td>
1551 update working directory (or switch revisions)
1550 update working directory (or switch revisions)
1552 </td></tr>
1551 </td></tr>
1553
1552
1554 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
1553 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
1555
1554
1556 <tr><td>
1555 <tr><td>
1557 <a href="/help/addremove">
1556 <a href="/help/addremove">
1558 addremove
1557 addremove
1559 </a>
1558 </a>
1560 </td><td>
1559 </td><td>
1561 add all new files, delete all missing files
1560 add all new files, delete all missing files
1562 </td></tr>
1561 </td></tr>
1563 <tr><td>
1562 <tr><td>
1564 <a href="/help/archive">
1563 <a href="/help/archive">
1565 archive
1564 archive
1566 </a>
1565 </a>
1567 </td><td>
1566 </td><td>
1568 create an unversioned archive of a repository revision
1567 create an unversioned archive of a repository revision
1569 </td></tr>
1568 </td></tr>
1570 <tr><td>
1569 <tr><td>
1571 <a href="/help/backout">
1570 <a href="/help/backout">
1572 backout
1571 backout
1573 </a>
1572 </a>
1574 </td><td>
1573 </td><td>
1575 reverse effect of earlier changeset
1574 reverse effect of earlier changeset
1576 </td></tr>
1575 </td></tr>
1577 <tr><td>
1576 <tr><td>
1578 <a href="/help/bisect">
1577 <a href="/help/bisect">
1579 bisect
1578 bisect
1580 </a>
1579 </a>
1581 </td><td>
1580 </td><td>
1582 subdivision search of changesets
1581 subdivision search of changesets
1583 </td></tr>
1582 </td></tr>
1584 <tr><td>
1583 <tr><td>
1585 <a href="/help/bookmarks">
1584 <a href="/help/bookmarks">
1586 bookmarks
1585 bookmarks
1587 </a>
1586 </a>
1588 </td><td>
1587 </td><td>
1589 create a new bookmark or list existing bookmarks
1588 create a new bookmark or list existing bookmarks
1590 </td></tr>
1589 </td></tr>
1591 <tr><td>
1590 <tr><td>
1592 <a href="/help/branch">
1591 <a href="/help/branch">
1593 branch
1592 branch
1594 </a>
1593 </a>
1595 </td><td>
1594 </td><td>
1596 set or show the current branch name
1595 set or show the current branch name
1597 </td></tr>
1596 </td></tr>
1598 <tr><td>
1597 <tr><td>
1599 <a href="/help/branches">
1598 <a href="/help/branches">
1600 branches
1599 branches
1601 </a>
1600 </a>
1602 </td><td>
1601 </td><td>
1603 list repository named branches
1602 list repository named branches
1604 </td></tr>
1603 </td></tr>
1605 <tr><td>
1604 <tr><td>
1606 <a href="/help/bundle">
1605 <a href="/help/bundle">
1607 bundle
1606 bundle
1608 </a>
1607 </a>
1609 </td><td>
1608 </td><td>
1610 create a changegroup file
1609 create a changegroup file
1611 </td></tr>
1610 </td></tr>
1612 <tr><td>
1611 <tr><td>
1613 <a href="/help/cat">
1612 <a href="/help/cat">
1614 cat
1613 cat
1615 </a>
1614 </a>
1616 </td><td>
1615 </td><td>
1617 output the current or given revision of files
1616 output the current or given revision of files
1618 </td></tr>
1617 </td></tr>
1619 <tr><td>
1618 <tr><td>
1620 <a href="/help/config">
1619 <a href="/help/config">
1621 config
1620 config
1622 </a>
1621 </a>
1623 </td><td>
1622 </td><td>
1624 show combined config settings from all hgrc files
1623 show combined config settings from all hgrc files
1625 </td></tr>
1624 </td></tr>
1626 <tr><td>
1625 <tr><td>
1627 <a href="/help/copy">
1626 <a href="/help/copy">
1628 copy
1627 copy
1629 </a>
1628 </a>
1630 </td><td>
1629 </td><td>
1631 mark files as copied for the next commit
1630 mark files as copied for the next commit
1632 </td></tr>
1631 </td></tr>
1633 <tr><td>
1632 <tr><td>
1634 <a href="/help/files">
1633 <a href="/help/files">
1635 files
1634 files
1636 </a>
1635 </a>
1637 </td><td>
1636 </td><td>
1638 list tracked files
1637 list tracked files
1639 </td></tr>
1638 </td></tr>
1640 <tr><td>
1639 <tr><td>
1641 <a href="/help/graft">
1640 <a href="/help/graft">
1642 graft
1641 graft
1643 </a>
1642 </a>
1644 </td><td>
1643 </td><td>
1645 copy changes from other branches onto the current branch
1644 copy changes from other branches onto the current branch
1646 </td></tr>
1645 </td></tr>
1647 <tr><td>
1646 <tr><td>
1648 <a href="/help/grep">
1647 <a href="/help/grep">
1649 grep
1648 grep
1650 </a>
1649 </a>
1651 </td><td>
1650 </td><td>
1652 search for a pattern in specified files and revisions
1651 search for a pattern in specified files and revisions
1653 </td></tr>
1652 </td></tr>
1654 <tr><td>
1653 <tr><td>
1655 <a href="/help/heads">
1654 <a href="/help/heads">
1656 heads
1655 heads
1657 </a>
1656 </a>
1658 </td><td>
1657 </td><td>
1659 show branch heads
1658 show branch heads
1660 </td></tr>
1659 </td></tr>
1661 <tr><td>
1660 <tr><td>
1662 <a href="/help/help">
1661 <a href="/help/help">
1663 help
1662 help
1664 </a>
1663 </a>
1665 </td><td>
1664 </td><td>
1666 show help for a given topic or a help overview
1665 show help for a given topic or a help overview
1667 </td></tr>
1666 </td></tr>
1668 <tr><td>
1667 <tr><td>
1669 <a href="/help/identify">
1668 <a href="/help/identify">
1670 identify
1669 identify
1671 </a>
1670 </a>
1672 </td><td>
1671 </td><td>
1673 identify the working directory or specified revision
1672 identify the working directory or specified revision
1674 </td></tr>
1673 </td></tr>
1675 <tr><td>
1674 <tr><td>
1676 <a href="/help/import">
1675 <a href="/help/import">
1677 import
1676 import
1678 </a>
1677 </a>
1679 </td><td>
1678 </td><td>
1680 import an ordered set of patches
1679 import an ordered set of patches
1681 </td></tr>
1680 </td></tr>
1682 <tr><td>
1681 <tr><td>
1683 <a href="/help/incoming">
1682 <a href="/help/incoming">
1684 incoming
1683 incoming
1685 </a>
1684 </a>
1686 </td><td>
1685 </td><td>
1687 show new changesets found in source
1686 show new changesets found in source
1688 </td></tr>
1687 </td></tr>
1689 <tr><td>
1688 <tr><td>
1690 <a href="/help/manifest">
1689 <a href="/help/manifest">
1691 manifest
1690 manifest
1692 </a>
1691 </a>
1693 </td><td>
1692 </td><td>
1694 output the current or given revision of the project manifest
1693 output the current or given revision of the project manifest
1695 </td></tr>
1694 </td></tr>
1696 <tr><td>
1695 <tr><td>
1697 <a href="/help/nohelp">
1696 <a href="/help/nohelp">
1698 nohelp
1697 nohelp
1699 </a>
1698 </a>
1700 </td><td>
1699 </td><td>
1701 (no help text available)
1700 (no help text available)
1702 </td></tr>
1701 </td></tr>
1703 <tr><td>
1702 <tr><td>
1704 <a href="/help/outgoing">
1703 <a href="/help/outgoing">
1705 outgoing
1704 outgoing
1706 </a>
1705 </a>
1707 </td><td>
1706 </td><td>
1708 show changesets not found in the destination
1707 show changesets not found in the destination
1709 </td></tr>
1708 </td></tr>
1710 <tr><td>
1709 <tr><td>
1711 <a href="/help/paths">
1710 <a href="/help/paths">
1712 paths
1711 paths
1713 </a>
1712 </a>
1714 </td><td>
1713 </td><td>
1715 show aliases for remote repositories
1714 show aliases for remote repositories
1716 </td></tr>
1715 </td></tr>
1717 <tr><td>
1716 <tr><td>
1718 <a href="/help/phase">
1717 <a href="/help/phase">
1719 phase
1718 phase
1720 </a>
1719 </a>
1721 </td><td>
1720 </td><td>
1722 set or show the current phase name
1721 set or show the current phase name
1723 </td></tr>
1722 </td></tr>
1724 <tr><td>
1723 <tr><td>
1725 <a href="/help/recover">
1724 <a href="/help/recover">
1726 recover
1725 recover
1727 </a>
1726 </a>
1728 </td><td>
1727 </td><td>
1729 roll back an interrupted transaction
1728 roll back an interrupted transaction
1730 </td></tr>
1729 </td></tr>
1731 <tr><td>
1730 <tr><td>
1732 <a href="/help/rename">
1731 <a href="/help/rename">
1733 rename
1732 rename
1734 </a>
1733 </a>
1735 </td><td>
1734 </td><td>
1736 rename files; equivalent of copy + remove
1735 rename files; equivalent of copy + remove
1737 </td></tr>
1736 </td></tr>
1738 <tr><td>
1737 <tr><td>
1739 <a href="/help/resolve">
1738 <a href="/help/resolve">
1740 resolve
1739 resolve
1741 </a>
1740 </a>
1742 </td><td>
1741 </td><td>
1743 redo merges or set/view the merge status of files
1742 redo merges or set/view the merge status of files
1744 </td></tr>
1743 </td></tr>
1745 <tr><td>
1744 <tr><td>
1746 <a href="/help/revert">
1745 <a href="/help/revert">
1747 revert
1746 revert
1748 </a>
1747 </a>
1749 </td><td>
1748 </td><td>
1750 restore files to their checkout state
1749 restore files to their checkout state
1751 </td></tr>
1750 </td></tr>
1752 <tr><td>
1751 <tr><td>
1753 <a href="/help/root">
1752 <a href="/help/root">
1754 root
1753 root
1755 </a>
1754 </a>
1756 </td><td>
1755 </td><td>
1757 print the root (top) of the current working directory
1756 print the root (top) of the current working directory
1758 </td></tr>
1757 </td></tr>
1759 <tr><td>
1758 <tr><td>
1760 <a href="/help/tag">
1759 <a href="/help/tag">
1761 tag
1760 tag
1762 </a>
1761 </a>
1763 </td><td>
1762 </td><td>
1764 add one or more tags for the current or given revision
1763 add one or more tags for the current or given revision
1765 </td></tr>
1764 </td></tr>
1766 <tr><td>
1765 <tr><td>
1767 <a href="/help/tags">
1766 <a href="/help/tags">
1768 tags
1767 tags
1769 </a>
1768 </a>
1770 </td><td>
1769 </td><td>
1771 list repository tags
1770 list repository tags
1772 </td></tr>
1771 </td></tr>
1773 <tr><td>
1772 <tr><td>
1774 <a href="/help/unbundle">
1773 <a href="/help/unbundle">
1775 unbundle
1774 unbundle
1776 </a>
1775 </a>
1777 </td><td>
1776 </td><td>
1778 apply one or more changegroup files
1777 apply one or more changegroup files
1779 </td></tr>
1778 </td></tr>
1780 <tr><td>
1779 <tr><td>
1781 <a href="/help/verify">
1780 <a href="/help/verify">
1782 verify
1781 verify
1783 </a>
1782 </a>
1784 </td><td>
1783 </td><td>
1785 verify the integrity of the repository
1784 verify the integrity of the repository
1786 </td></tr>
1785 </td></tr>
1787 <tr><td>
1786 <tr><td>
1788 <a href="/help/version">
1787 <a href="/help/version">
1789 version
1788 version
1790 </a>
1789 </a>
1791 </td><td>
1790 </td><td>
1792 output version and copyright information
1791 output version and copyright information
1793 </td></tr>
1792 </td></tr>
1794 </table>
1793 </table>
1795 </div>
1794 </div>
1796 </div>
1795 </div>
1797
1796
1798 <script type="text/javascript">process_dates()</script>
1797 <script type="text/javascript">process_dates()</script>
1799
1798
1800
1799
1801 </body>
1800 </body>
1802 </html>
1801 </html>
1803
1802
1804
1803
1805 $ get-with-headers.py 127.0.0.1:$HGPORT "help/add"
1804 $ get-with-headers.py 127.0.0.1:$HGPORT "help/add"
1806 200 Script output follows
1805 200 Script output follows
1807
1806
1808 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1807 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1809 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1808 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1810 <head>
1809 <head>
1811 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1810 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1812 <meta name="robots" content="index, nofollow" />
1811 <meta name="robots" content="index, nofollow" />
1813 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1812 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1814 <script type="text/javascript" src="/static/mercurial.js"></script>
1813 <script type="text/javascript" src="/static/mercurial.js"></script>
1815
1814
1816 <title>Help: add</title>
1815 <title>Help: add</title>
1817 </head>
1816 </head>
1818 <body>
1817 <body>
1819
1818
1820 <div class="container">
1819 <div class="container">
1821 <div class="menu">
1820 <div class="menu">
1822 <div class="logo">
1821 <div class="logo">
1823 <a href="http://mercurial.selenic.com/">
1822 <a href="http://mercurial.selenic.com/">
1824 <img src="/static/hglogo.png" alt="mercurial" /></a>
1823 <img src="/static/hglogo.png" alt="mercurial" /></a>
1825 </div>
1824 </div>
1826 <ul>
1825 <ul>
1827 <li><a href="/shortlog">log</a></li>
1826 <li><a href="/shortlog">log</a></li>
1828 <li><a href="/graph">graph</a></li>
1827 <li><a href="/graph">graph</a></li>
1829 <li><a href="/tags">tags</a></li>
1828 <li><a href="/tags">tags</a></li>
1830 <li><a href="/bookmarks">bookmarks</a></li>
1829 <li><a href="/bookmarks">bookmarks</a></li>
1831 <li><a href="/branches">branches</a></li>
1830 <li><a href="/branches">branches</a></li>
1832 </ul>
1831 </ul>
1833 <ul>
1832 <ul>
1834 <li class="active"><a href="/help">help</a></li>
1833 <li class="active"><a href="/help">help</a></li>
1835 </ul>
1834 </ul>
1836 </div>
1835 </div>
1837
1836
1838 <div class="main">
1837 <div class="main">
1839 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1838 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1840 <h3>Help: add</h3>
1839 <h3>Help: add</h3>
1841
1840
1842 <form class="search" action="/log">
1841 <form class="search" action="/log">
1843
1842
1844 <p><input name="rev" id="search1" type="text" size="30" /></p>
1843 <p><input name="rev" id="search1" type="text" size="30" /></p>
1845 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1844 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1846 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1845 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1847 </form>
1846 </form>
1848 <div id="doc">
1847 <div id="doc">
1849 <p>
1848 <p>
1850 hg add [OPTION]... [FILE]...
1849 hg add [OPTION]... [FILE]...
1851 </p>
1850 </p>
1852 <p>
1851 <p>
1853 add the specified files on the next commit
1852 add the specified files on the next commit
1854 </p>
1853 </p>
1855 <p>
1854 <p>
1856 Schedule files to be version controlled and added to the
1855 Schedule files to be version controlled and added to the
1857 repository.
1856 repository.
1858 </p>
1857 </p>
1859 <p>
1858 <p>
1860 The files will be added to the repository at the next commit. To
1859 The files will be added to the repository at the next commit. To
1861 undo an add before that, see &quot;hg forget&quot;.
1860 undo an add before that, see &quot;hg forget&quot;.
1862 </p>
1861 </p>
1863 <p>
1862 <p>
1864 If no names are given, add all files to the repository.
1863 If no names are given, add all files to the repository.
1865 </p>
1864 </p>
1866 <p>
1865 <p>
1867 An example showing how new (unknown) files are added
1866 An example showing how new (unknown) files are added
1868 automatically by &quot;hg add&quot;:
1867 automatically by &quot;hg add&quot;:
1869 </p>
1868 </p>
1870 <pre>
1869 <pre>
1871 \$ ls (re)
1870 \$ ls (re)
1872 foo.c
1871 foo.c
1873 \$ hg status (re)
1872 \$ hg status (re)
1874 ? foo.c
1873 ? foo.c
1875 \$ hg add (re)
1874 \$ hg add (re)
1876 adding foo.c
1875 adding foo.c
1877 \$ hg status (re)
1876 \$ hg status (re)
1878 A foo.c
1877 A foo.c
1879 </pre>
1878 </pre>
1880 <p>
1879 <p>
1881 Returns 0 if all files are successfully added.
1880 Returns 0 if all files are successfully added.
1882 </p>
1881 </p>
1883 <p>
1882 <p>
1884 options ([+] can be repeated):
1883 options ([+] can be repeated):
1885 </p>
1884 </p>
1886 <table>
1885 <table>
1887 <tr><td>-I</td>
1886 <tr><td>-I</td>
1888 <td>--include PATTERN [+]</td>
1887 <td>--include PATTERN [+]</td>
1889 <td>include names matching the given patterns</td></tr>
1888 <td>include names matching the given patterns</td></tr>
1890 <tr><td>-X</td>
1889 <tr><td>-X</td>
1891 <td>--exclude PATTERN [+]</td>
1890 <td>--exclude PATTERN [+]</td>
1892 <td>exclude names matching the given patterns</td></tr>
1891 <td>exclude names matching the given patterns</td></tr>
1893 <tr><td>-S</td>
1892 <tr><td>-S</td>
1894 <td>--subrepos</td>
1893 <td>--subrepos</td>
1895 <td>recurse into subrepositories</td></tr>
1894 <td>recurse into subrepositories</td></tr>
1896 <tr><td>-n</td>
1895 <tr><td>-n</td>
1897 <td>--dry-run</td>
1896 <td>--dry-run</td>
1898 <td>do not perform actions, just print output</td></tr>
1897 <td>do not perform actions, just print output</td></tr>
1899 </table>
1898 </table>
1900 <p>
1899 <p>
1901 global options ([+] can be repeated):
1900 global options ([+] can be repeated):
1902 </p>
1901 </p>
1903 <table>
1902 <table>
1904 <tr><td>-R</td>
1903 <tr><td>-R</td>
1905 <td>--repository REPO</td>
1904 <td>--repository REPO</td>
1906 <td>repository root directory or name of overlay bundle file</td></tr>
1905 <td>repository root directory or name of overlay bundle file</td></tr>
1907 <tr><td></td>
1906 <tr><td></td>
1908 <td>--cwd DIR</td>
1907 <td>--cwd DIR</td>
1909 <td>change working directory</td></tr>
1908 <td>change working directory</td></tr>
1910 <tr><td>-y</td>
1909 <tr><td>-y</td>
1911 <td>--noninteractive</td>
1910 <td>--noninteractive</td>
1912 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1911 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
1913 <tr><td>-q</td>
1912 <tr><td>-q</td>
1914 <td>--quiet</td>
1913 <td>--quiet</td>
1915 <td>suppress output</td></tr>
1914 <td>suppress output</td></tr>
1916 <tr><td>-v</td>
1915 <tr><td>-v</td>
1917 <td>--verbose</td>
1916 <td>--verbose</td>
1918 <td>enable additional output</td></tr>
1917 <td>enable additional output</td></tr>
1919 <tr><td></td>
1918 <tr><td></td>
1920 <td>--config CONFIG [+]</td>
1919 <td>--config CONFIG [+]</td>
1921 <td>set/override config option (use 'section.name=value')</td></tr>
1920 <td>set/override config option (use 'section.name=value')</td></tr>
1922 <tr><td></td>
1921 <tr><td></td>
1923 <td>--debug</td>
1922 <td>--debug</td>
1924 <td>enable debugging output</td></tr>
1923 <td>enable debugging output</td></tr>
1925 <tr><td></td>
1924 <tr><td></td>
1926 <td>--debugger</td>
1925 <td>--debugger</td>
1927 <td>start debugger</td></tr>
1926 <td>start debugger</td></tr>
1928 <tr><td></td>
1927 <tr><td></td>
1929 <td>--encoding ENCODE</td>
1928 <td>--encoding ENCODE</td>
1930 <td>set the charset encoding (default: ascii)</td></tr>
1929 <td>set the charset encoding (default: ascii)</td></tr>
1931 <tr><td></td>
1930 <tr><td></td>
1932 <td>--encodingmode MODE</td>
1931 <td>--encodingmode MODE</td>
1933 <td>set the charset encoding mode (default: strict)</td></tr>
1932 <td>set the charset encoding mode (default: strict)</td></tr>
1934 <tr><td></td>
1933 <tr><td></td>
1935 <td>--traceback</td>
1934 <td>--traceback</td>
1936 <td>always print a traceback on exception</td></tr>
1935 <td>always print a traceback on exception</td></tr>
1937 <tr><td></td>
1936 <tr><td></td>
1938 <td>--time</td>
1937 <td>--time</td>
1939 <td>time how long the command takes</td></tr>
1938 <td>time how long the command takes</td></tr>
1940 <tr><td></td>
1939 <tr><td></td>
1941 <td>--profile</td>
1940 <td>--profile</td>
1942 <td>print command execution profile</td></tr>
1941 <td>print command execution profile</td></tr>
1943 <tr><td></td>
1942 <tr><td></td>
1944 <td>--version</td>
1943 <td>--version</td>
1945 <td>output version information and exit</td></tr>
1944 <td>output version information and exit</td></tr>
1946 <tr><td>-h</td>
1945 <tr><td>-h</td>
1947 <td>--help</td>
1946 <td>--help</td>
1948 <td>display help and exit</td></tr>
1947 <td>display help and exit</td></tr>
1949 <tr><td></td>
1948 <tr><td></td>
1950 <td>--hidden</td>
1949 <td>--hidden</td>
1951 <td>consider hidden changesets</td></tr>
1950 <td>consider hidden changesets</td></tr>
1952 </table>
1951 </table>
1953
1952
1954 </div>
1953 </div>
1955 </div>
1954 </div>
1956 </div>
1955 </div>
1957
1956
1958 <script type="text/javascript">process_dates()</script>
1957 <script type="text/javascript">process_dates()</script>
1959
1958
1960
1959
1961 </body>
1960 </body>
1962 </html>
1961 </html>
1963
1962
1964
1963
1965 $ get-with-headers.py 127.0.0.1:$HGPORT "help/remove"
1964 $ get-with-headers.py 127.0.0.1:$HGPORT "help/remove"
1966 200 Script output follows
1965 200 Script output follows
1967
1966
1968 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1967 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1969 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1968 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1970 <head>
1969 <head>
1971 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1970 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1972 <meta name="robots" content="index, nofollow" />
1971 <meta name="robots" content="index, nofollow" />
1973 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1972 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1974 <script type="text/javascript" src="/static/mercurial.js"></script>
1973 <script type="text/javascript" src="/static/mercurial.js"></script>
1975
1974
1976 <title>Help: remove</title>
1975 <title>Help: remove</title>
1977 </head>
1976 </head>
1978 <body>
1977 <body>
1979
1978
1980 <div class="container">
1979 <div class="container">
1981 <div class="menu">
1980 <div class="menu">
1982 <div class="logo">
1981 <div class="logo">
1983 <a href="http://mercurial.selenic.com/">
1982 <a href="http://mercurial.selenic.com/">
1984 <img src="/static/hglogo.png" alt="mercurial" /></a>
1983 <img src="/static/hglogo.png" alt="mercurial" /></a>
1985 </div>
1984 </div>
1986 <ul>
1985 <ul>
1987 <li><a href="/shortlog">log</a></li>
1986 <li><a href="/shortlog">log</a></li>
1988 <li><a href="/graph">graph</a></li>
1987 <li><a href="/graph">graph</a></li>
1989 <li><a href="/tags">tags</a></li>
1988 <li><a href="/tags">tags</a></li>
1990 <li><a href="/bookmarks">bookmarks</a></li>
1989 <li><a href="/bookmarks">bookmarks</a></li>
1991 <li><a href="/branches">branches</a></li>
1990 <li><a href="/branches">branches</a></li>
1992 </ul>
1991 </ul>
1993 <ul>
1992 <ul>
1994 <li class="active"><a href="/help">help</a></li>
1993 <li class="active"><a href="/help">help</a></li>
1995 </ul>
1994 </ul>
1996 </div>
1995 </div>
1997
1996
1998 <div class="main">
1997 <div class="main">
1999 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1998 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2000 <h3>Help: remove</h3>
1999 <h3>Help: remove</h3>
2001
2000
2002 <form class="search" action="/log">
2001 <form class="search" action="/log">
2003
2002
2004 <p><input name="rev" id="search1" type="text" size="30" /></p>
2003 <p><input name="rev" id="search1" type="text" size="30" /></p>
2005 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2004 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2006 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2005 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2007 </form>
2006 </form>
2008 <div id="doc">
2007 <div id="doc">
2009 <p>
2008 <p>
2010 hg remove [OPTION]... FILE...
2009 hg remove [OPTION]... FILE...
2011 </p>
2010 </p>
2012 <p>
2011 <p>
2013 aliases: rm
2012 aliases: rm
2014 </p>
2013 </p>
2015 <p>
2014 <p>
2016 remove the specified files on the next commit
2015 remove the specified files on the next commit
2017 </p>
2016 </p>
2018 <p>
2017 <p>
2019 Schedule the indicated files for removal from the current branch.
2018 Schedule the indicated files for removal from the current branch.
2020 </p>
2019 </p>
2021 <p>
2020 <p>
2022 This command schedules the files to be removed at the next commit.
2021 This command schedules the files to be removed at the next commit.
2023 To undo a remove before that, see &quot;hg revert&quot;. To undo added
2022 To undo a remove before that, see &quot;hg revert&quot;. To undo added
2024 files, see &quot;hg forget&quot;.
2023 files, see &quot;hg forget&quot;.
2025 </p>
2024 </p>
2026 <p>
2025 <p>
2027 -A/--after can be used to remove only files that have already
2026 -A/--after can be used to remove only files that have already
2028 been deleted, -f/--force can be used to force deletion, and -Af
2027 been deleted, -f/--force can be used to force deletion, and -Af
2029 can be used to remove files from the next revision without
2028 can be used to remove files from the next revision without
2030 deleting them from the working directory.
2029 deleting them from the working directory.
2031 </p>
2030 </p>
2032 <p>
2031 <p>
2033 The following table details the behavior of remove for different
2032 The following table details the behavior of remove for different
2034 file states (columns) and option combinations (rows). The file
2033 file states (columns) and option combinations (rows). The file
2035 states are Added [A], Clean [C], Modified [M] and Missing [!]
2034 states are Added [A], Clean [C], Modified [M] and Missing [!]
2036 (as reported by &quot;hg status&quot;). The actions are Warn, Remove
2035 (as reported by &quot;hg status&quot;). The actions are Warn, Remove
2037 (from branch) and Delete (from disk):
2036 (from branch) and Delete (from disk):
2038 </p>
2037 </p>
2039 <table>
2038 <table>
2040 <tr><td>opt/state</td>
2039 <tr><td>opt/state</td>
2041 <td>A</td>
2040 <td>A</td>
2042 <td>C</td>
2041 <td>C</td>
2043 <td>M</td>
2042 <td>M</td>
2044 <td>!</td></tr>
2043 <td>!</td></tr>
2045 <tr><td>none</td>
2044 <tr><td>none</td>
2046 <td>W</td>
2045 <td>W</td>
2047 <td>RD</td>
2046 <td>RD</td>
2048 <td>W</td>
2047 <td>W</td>
2049 <td>R</td></tr>
2048 <td>R</td></tr>
2050 <tr><td>-f</td>
2049 <tr><td>-f</td>
2051 <td>R</td>
2050 <td>R</td>
2052 <td>RD</td>
2051 <td>RD</td>
2053 <td>RD</td>
2052 <td>RD</td>
2054 <td>R</td></tr>
2053 <td>R</td></tr>
2055 <tr><td>-A</td>
2054 <tr><td>-A</td>
2056 <td>W</td>
2055 <td>W</td>
2057 <td>W</td>
2056 <td>W</td>
2058 <td>W</td>
2057 <td>W</td>
2059 <td>R</td></tr>
2058 <td>R</td></tr>
2060 <tr><td>-Af</td>
2059 <tr><td>-Af</td>
2061 <td>R</td>
2060 <td>R</td>
2062 <td>R</td>
2061 <td>R</td>
2063 <td>R</td>
2062 <td>R</td>
2064 <td>R</td></tr>
2063 <td>R</td></tr>
2065 </table>
2064 </table>
2066 <p>
2065 <p>
2067 Note that remove never deletes files in Added [A] state from the
2066 Note that remove never deletes files in Added [A] state from the
2068 working directory, not even if option --force is specified.
2067 working directory, not even if option --force is specified.
2069 </p>
2068 </p>
2070 <p>
2069 <p>
2071 Returns 0 on success, 1 if any warnings encountered.
2070 Returns 0 on success, 1 if any warnings encountered.
2072 </p>
2071 </p>
2073 <p>
2072 <p>
2074 options ([+] can be repeated):
2073 options ([+] can be repeated):
2075 </p>
2074 </p>
2076 <table>
2075 <table>
2077 <tr><td>-A</td>
2076 <tr><td>-A</td>
2078 <td>--after</td>
2077 <td>--after</td>
2079 <td>record delete for missing files</td></tr>
2078 <td>record delete for missing files</td></tr>
2080 <tr><td>-f</td>
2079 <tr><td>-f</td>
2081 <td>--force</td>
2080 <td>--force</td>
2082 <td>remove (and delete) file even if added or modified</td></tr>
2081 <td>remove (and delete) file even if added or modified</td></tr>
2083 <tr><td>-S</td>
2082 <tr><td>-S</td>
2084 <td>--subrepos</td>
2083 <td>--subrepos</td>
2085 <td>recurse into subrepositories</td></tr>
2084 <td>recurse into subrepositories</td></tr>
2086 <tr><td>-I</td>
2085 <tr><td>-I</td>
2087 <td>--include PATTERN [+]</td>
2086 <td>--include PATTERN [+]</td>
2088 <td>include names matching the given patterns</td></tr>
2087 <td>include names matching the given patterns</td></tr>
2089 <tr><td>-X</td>
2088 <tr><td>-X</td>
2090 <td>--exclude PATTERN [+]</td>
2089 <td>--exclude PATTERN [+]</td>
2091 <td>exclude names matching the given patterns</td></tr>
2090 <td>exclude names matching the given patterns</td></tr>
2092 </table>
2091 </table>
2093 <p>
2092 <p>
2094 global options ([+] can be repeated):
2093 global options ([+] can be repeated):
2095 </p>
2094 </p>
2096 <table>
2095 <table>
2097 <tr><td>-R</td>
2096 <tr><td>-R</td>
2098 <td>--repository REPO</td>
2097 <td>--repository REPO</td>
2099 <td>repository root directory or name of overlay bundle file</td></tr>
2098 <td>repository root directory or name of overlay bundle file</td></tr>
2100 <tr><td></td>
2099 <tr><td></td>
2101 <td>--cwd DIR</td>
2100 <td>--cwd DIR</td>
2102 <td>change working directory</td></tr>
2101 <td>change working directory</td></tr>
2103 <tr><td>-y</td>
2102 <tr><td>-y</td>
2104 <td>--noninteractive</td>
2103 <td>--noninteractive</td>
2105 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2104 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2106 <tr><td>-q</td>
2105 <tr><td>-q</td>
2107 <td>--quiet</td>
2106 <td>--quiet</td>
2108 <td>suppress output</td></tr>
2107 <td>suppress output</td></tr>
2109 <tr><td>-v</td>
2108 <tr><td>-v</td>
2110 <td>--verbose</td>
2109 <td>--verbose</td>
2111 <td>enable additional output</td></tr>
2110 <td>enable additional output</td></tr>
2112 <tr><td></td>
2111 <tr><td></td>
2113 <td>--config CONFIG [+]</td>
2112 <td>--config CONFIG [+]</td>
2114 <td>set/override config option (use 'section.name=value')</td></tr>
2113 <td>set/override config option (use 'section.name=value')</td></tr>
2115 <tr><td></td>
2114 <tr><td></td>
2116 <td>--debug</td>
2115 <td>--debug</td>
2117 <td>enable debugging output</td></tr>
2116 <td>enable debugging output</td></tr>
2118 <tr><td></td>
2117 <tr><td></td>
2119 <td>--debugger</td>
2118 <td>--debugger</td>
2120 <td>start debugger</td></tr>
2119 <td>start debugger</td></tr>
2121 <tr><td></td>
2120 <tr><td></td>
2122 <td>--encoding ENCODE</td>
2121 <td>--encoding ENCODE</td>
2123 <td>set the charset encoding (default: ascii)</td></tr>
2122 <td>set the charset encoding (default: ascii)</td></tr>
2124 <tr><td></td>
2123 <tr><td></td>
2125 <td>--encodingmode MODE</td>
2124 <td>--encodingmode MODE</td>
2126 <td>set the charset encoding mode (default: strict)</td></tr>
2125 <td>set the charset encoding mode (default: strict)</td></tr>
2127 <tr><td></td>
2126 <tr><td></td>
2128 <td>--traceback</td>
2127 <td>--traceback</td>
2129 <td>always print a traceback on exception</td></tr>
2128 <td>always print a traceback on exception</td></tr>
2130 <tr><td></td>
2129 <tr><td></td>
2131 <td>--time</td>
2130 <td>--time</td>
2132 <td>time how long the command takes</td></tr>
2131 <td>time how long the command takes</td></tr>
2133 <tr><td></td>
2132 <tr><td></td>
2134 <td>--profile</td>
2133 <td>--profile</td>
2135 <td>print command execution profile</td></tr>
2134 <td>print command execution profile</td></tr>
2136 <tr><td></td>
2135 <tr><td></td>
2137 <td>--version</td>
2136 <td>--version</td>
2138 <td>output version information and exit</td></tr>
2137 <td>output version information and exit</td></tr>
2139 <tr><td>-h</td>
2138 <tr><td>-h</td>
2140 <td>--help</td>
2139 <td>--help</td>
2141 <td>display help and exit</td></tr>
2140 <td>display help and exit</td></tr>
2142 <tr><td></td>
2141 <tr><td></td>
2143 <td>--hidden</td>
2142 <td>--hidden</td>
2144 <td>consider hidden changesets</td></tr>
2143 <td>consider hidden changesets</td></tr>
2145 </table>
2144 </table>
2146
2145
2147 </div>
2146 </div>
2148 </div>
2147 </div>
2149 </div>
2148 </div>
2150
2149
2151 <script type="text/javascript">process_dates()</script>
2150 <script type="text/javascript">process_dates()</script>
2152
2151
2153
2152
2154 </body>
2153 </body>
2155 </html>
2154 </html>
2156
2155
2157
2156
2158 $ get-with-headers.py 127.0.0.1:$HGPORT "help/revisions"
2157 $ get-with-headers.py 127.0.0.1:$HGPORT "help/revisions"
2159 200 Script output follows
2158 200 Script output follows
2160
2159
2161 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2160 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2162 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2161 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2163 <head>
2162 <head>
2164 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2163 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2165 <meta name="robots" content="index, nofollow" />
2164 <meta name="robots" content="index, nofollow" />
2166 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2165 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2167 <script type="text/javascript" src="/static/mercurial.js"></script>
2166 <script type="text/javascript" src="/static/mercurial.js"></script>
2168
2167
2169 <title>Help: revisions</title>
2168 <title>Help: revisions</title>
2170 </head>
2169 </head>
2171 <body>
2170 <body>
2172
2171
2173 <div class="container">
2172 <div class="container">
2174 <div class="menu">
2173 <div class="menu">
2175 <div class="logo">
2174 <div class="logo">
2176 <a href="http://mercurial.selenic.com/">
2175 <a href="http://mercurial.selenic.com/">
2177 <img src="/static/hglogo.png" alt="mercurial" /></a>
2176 <img src="/static/hglogo.png" alt="mercurial" /></a>
2178 </div>
2177 </div>
2179 <ul>
2178 <ul>
2180 <li><a href="/shortlog">log</a></li>
2179 <li><a href="/shortlog">log</a></li>
2181 <li><a href="/graph">graph</a></li>
2180 <li><a href="/graph">graph</a></li>
2182 <li><a href="/tags">tags</a></li>
2181 <li><a href="/tags">tags</a></li>
2183 <li><a href="/bookmarks">bookmarks</a></li>
2182 <li><a href="/bookmarks">bookmarks</a></li>
2184 <li><a href="/branches">branches</a></li>
2183 <li><a href="/branches">branches</a></li>
2185 </ul>
2184 </ul>
2186 <ul>
2185 <ul>
2187 <li class="active"><a href="/help">help</a></li>
2186 <li class="active"><a href="/help">help</a></li>
2188 </ul>
2187 </ul>
2189 </div>
2188 </div>
2190
2189
2191 <div class="main">
2190 <div class="main">
2192 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2191 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2193 <h3>Help: revisions</h3>
2192 <h3>Help: revisions</h3>
2194
2193
2195 <form class="search" action="/log">
2194 <form class="search" action="/log">
2196
2195
2197 <p><input name="rev" id="search1" type="text" size="30" /></p>
2196 <p><input name="rev" id="search1" type="text" size="30" /></p>
2198 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2197 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2199 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2198 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2200 </form>
2199 </form>
2201 <div id="doc">
2200 <div id="doc">
2202 <h1>Specifying Single Revisions</h1>
2201 <h1>Specifying Single Revisions</h1>
2203 <p>
2202 <p>
2204 Mercurial supports several ways to specify individual revisions.
2203 Mercurial supports several ways to specify individual revisions.
2205 </p>
2204 </p>
2206 <p>
2205 <p>
2207 A plain integer is treated as a revision number. Negative integers are
2206 A plain integer is treated as a revision number. Negative integers are
2208 treated as sequential offsets from the tip, with -1 denoting the tip,
2207 treated as sequential offsets from the tip, with -1 denoting the tip,
2209 -2 denoting the revision prior to the tip, and so forth.
2208 -2 denoting the revision prior to the tip, and so forth.
2210 </p>
2209 </p>
2211 <p>
2210 <p>
2212 A 40-digit hexadecimal string is treated as a unique revision
2211 A 40-digit hexadecimal string is treated as a unique revision
2213 identifier.
2212 identifier.
2214 </p>
2213 </p>
2215 <p>
2214 <p>
2216 A hexadecimal string less than 40 characters long is treated as a
2215 A hexadecimal string less than 40 characters long is treated as a
2217 unique revision identifier and is referred to as a short-form
2216 unique revision identifier and is referred to as a short-form
2218 identifier. A short-form identifier is only valid if it is the prefix
2217 identifier. A short-form identifier is only valid if it is the prefix
2219 of exactly one full-length identifier.
2218 of exactly one full-length identifier.
2220 </p>
2219 </p>
2221 <p>
2220 <p>
2222 Any other string is treated as a bookmark, tag, or branch name. A
2221 Any other string is treated as a bookmark, tag, or branch name. A
2223 bookmark is a movable pointer to a revision. A tag is a permanent name
2222 bookmark is a movable pointer to a revision. A tag is a permanent name
2224 associated with a revision. A branch name denotes the tipmost open branch head
2223 associated with a revision. A branch name denotes the tipmost open branch head
2225 of that branch - or if they are all closed, the tipmost closed head of the
2224 of that branch - or if they are all closed, the tipmost closed head of the
2226 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
2225 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
2227 </p>
2226 </p>
2228 <p>
2227 <p>
2229 The reserved name &quot;tip&quot; always identifies the most recent revision.
2228 The reserved name &quot;tip&quot; always identifies the most recent revision.
2230 </p>
2229 </p>
2231 <p>
2230 <p>
2232 The reserved name &quot;null&quot; indicates the null revision. This is the
2231 The reserved name &quot;null&quot; indicates the null revision. This is the
2233 revision of an empty repository, and the parent of revision 0.
2232 revision of an empty repository, and the parent of revision 0.
2234 </p>
2233 </p>
2235 <p>
2234 <p>
2236 The reserved name &quot;.&quot; indicates the working directory parent. If no
2235 The reserved name &quot;.&quot; indicates the working directory parent. If no
2237 working directory is checked out, it is equivalent to null. If an
2236 working directory is checked out, it is equivalent to null. If an
2238 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
2237 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
2239 parent.
2238 parent.
2240 </p>
2239 </p>
2241
2240
2242 </div>
2241 </div>
2243 </div>
2242 </div>
2244 </div>
2243 </div>
2245
2244
2246 <script type="text/javascript">process_dates()</script>
2245 <script type="text/javascript">process_dates()</script>
2247
2246
2248
2247
2249 </body>
2248 </body>
2250 </html>
2249 </html>
2251
2250
2252
2251
2253 $ killdaemons.py
2252 $ killdaemons.py
2254
2253
2255 #endif
2254 #endif
General Comments 0
You need to be logged in to leave comments. Login now