##// END OF EJS Templates
tests: add tests for typoed commands...
Martin von Zweigbergk -
r33326:67b42e64 default
parent child Browse files
Show More
@@ -1,3340 +1,3362 b''
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 bundle file
61 bundle create a bundle 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 revision history for a pattern in specified files
72 grep search revision history for a pattern in specified files
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 bundle files
98 unbundle apply one or more bundle 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 bundlespec Bundle File Formats
105 bundlespec Bundle File Formats
106 color Colorizing Outputs
106 color Colorizing Outputs
107 config Configuration Files
107 config Configuration Files
108 dates Date Formats
108 dates Date Formats
109 diffs Diff Formats
109 diffs Diff Formats
110 environment Environment Variables
110 environment Environment Variables
111 extensions Using Additional Features
111 extensions Using Additional Features
112 filesets Specifying File Sets
112 filesets Specifying File Sets
113 glossary Glossary
113 glossary Glossary
114 hgignore Syntax for Mercurial Ignore Files
114 hgignore Syntax for Mercurial Ignore Files
115 hgweb Configuring hgweb
115 hgweb Configuring hgweb
116 internals Technical implementation topics
116 internals Technical implementation topics
117 merge-tools Merge Tools
117 merge-tools Merge Tools
118 pager Pager Support
118 pager Pager Support
119 patterns File Name Patterns
119 patterns File Name Patterns
120 phases Working with Phases
120 phases Working with Phases
121 revisions Specifying Revisions
121 revisions Specifying Revisions
122 scripting Using Mercurial from scripts and automation
122 scripting Using Mercurial from scripts and automation
123 subrepos Subrepositories
123 subrepos Subrepositories
124 templating Template Usage
124 templating Template Usage
125 urls URL Paths
125 urls URL Paths
126
126
127 (use 'hg help -v' to show built-in aliases and global options)
127 (use 'hg help -v' to show built-in aliases and global options)
128
128
129 $ hg -q help
129 $ hg -q help
130 add add the specified files on the next commit
130 add add the specified files on the next commit
131 addremove add all new files, delete all missing files
131 addremove add all new files, delete all missing files
132 annotate show changeset information by line for each file
132 annotate show changeset information by line for each file
133 archive create an unversioned archive of a repository revision
133 archive create an unversioned archive of a repository revision
134 backout reverse effect of earlier changeset
134 backout reverse effect of earlier changeset
135 bisect subdivision search of changesets
135 bisect subdivision search of changesets
136 bookmarks create a new bookmark or list existing bookmarks
136 bookmarks create a new bookmark or list existing bookmarks
137 branch set or show the current branch name
137 branch set or show the current branch name
138 branches list repository named branches
138 branches list repository named branches
139 bundle create a bundle file
139 bundle create a bundle file
140 cat output the current or given revision of files
140 cat output the current or given revision of files
141 clone make a copy of an existing repository
141 clone make a copy of an existing repository
142 commit commit the specified files or all outstanding changes
142 commit commit the specified files or all outstanding changes
143 config show combined config settings from all hgrc files
143 config show combined config settings from all hgrc files
144 copy mark files as copied for the next commit
144 copy mark files as copied for the next commit
145 diff diff repository (or selected files)
145 diff diff repository (or selected files)
146 export dump the header and diffs for one or more changesets
146 export dump the header and diffs for one or more changesets
147 files list tracked files
147 files list tracked files
148 forget forget the specified files on the next commit
148 forget forget the specified files on the next commit
149 graft copy changes from other branches onto the current branch
149 graft copy changes from other branches onto the current branch
150 grep search revision history for a pattern in specified files
150 grep search revision history for a pattern in specified files
151 heads show branch heads
151 heads show branch heads
152 help show help for a given topic or a help overview
152 help show help for a given topic or a help overview
153 identify identify the working directory or specified revision
153 identify identify the working directory or specified revision
154 import import an ordered set of patches
154 import import an ordered set of patches
155 incoming show new changesets found in source
155 incoming show new changesets found in source
156 init create a new repository in the given directory
156 init create a new repository in the given directory
157 log show revision history of entire repository or files
157 log show revision history of entire repository or files
158 manifest output the current or given revision of the project manifest
158 manifest output the current or given revision of the project manifest
159 merge merge another revision into working directory
159 merge merge another revision into working directory
160 outgoing show changesets not found in the destination
160 outgoing show changesets not found in the destination
161 paths show aliases for remote repositories
161 paths show aliases for remote repositories
162 phase set or show the current phase name
162 phase set or show the current phase name
163 pull pull changes from the specified source
163 pull pull changes from the specified source
164 push push changes to the specified destination
164 push push changes to the specified destination
165 recover roll back an interrupted transaction
165 recover roll back an interrupted transaction
166 remove remove the specified files on the next commit
166 remove remove the specified files on the next commit
167 rename rename files; equivalent of copy + remove
167 rename rename files; equivalent of copy + remove
168 resolve redo merges or set/view the merge status of files
168 resolve redo merges or set/view the merge status of files
169 revert restore files to their checkout state
169 revert restore files to their checkout state
170 root print the root (top) of the current working directory
170 root print the root (top) of the current working directory
171 serve start stand-alone webserver
171 serve start stand-alone webserver
172 status show changed files in the working directory
172 status show changed files in the working directory
173 summary summarize working directory state
173 summary summarize working directory state
174 tag add one or more tags for the current or given revision
174 tag add one or more tags for the current or given revision
175 tags list repository tags
175 tags list repository tags
176 unbundle apply one or more bundle files
176 unbundle apply one or more bundle files
177 update update working directory (or switch revisions)
177 update update working directory (or switch revisions)
178 verify verify the integrity of the repository
178 verify verify the integrity of the repository
179 version output version and copyright information
179 version output version and copyright information
180
180
181 additional help topics:
181 additional help topics:
182
182
183 bundlespec Bundle File Formats
183 bundlespec Bundle File Formats
184 color Colorizing Outputs
184 color Colorizing Outputs
185 config Configuration Files
185 config Configuration Files
186 dates Date Formats
186 dates Date Formats
187 diffs Diff Formats
187 diffs Diff Formats
188 environment Environment Variables
188 environment Environment Variables
189 extensions Using Additional Features
189 extensions Using Additional Features
190 filesets Specifying File Sets
190 filesets Specifying File Sets
191 glossary Glossary
191 glossary Glossary
192 hgignore Syntax for Mercurial Ignore Files
192 hgignore Syntax for Mercurial Ignore Files
193 hgweb Configuring hgweb
193 hgweb Configuring hgweb
194 internals Technical implementation topics
194 internals Technical implementation topics
195 merge-tools Merge Tools
195 merge-tools Merge Tools
196 pager Pager Support
196 pager Pager Support
197 patterns File Name Patterns
197 patterns File Name Patterns
198 phases Working with Phases
198 phases Working with Phases
199 revisions Specifying Revisions
199 revisions Specifying Revisions
200 scripting Using Mercurial from scripts and automation
200 scripting Using Mercurial from scripts and automation
201 subrepos Subrepositories
201 subrepos Subrepositories
202 templating Template Usage
202 templating Template Usage
203 urls URL Paths
203 urls URL Paths
204
204
205 Test extension help:
205 Test extension help:
206 $ hg help extensions --config extensions.rebase= --config extensions.children=
206 $ hg help extensions --config extensions.rebase= --config extensions.children=
207 Using Additional Features
207 Using Additional Features
208 """""""""""""""""""""""""
208 """""""""""""""""""""""""
209
209
210 Mercurial has the ability to add new features through the use of
210 Mercurial has the ability to add new features through the use of
211 extensions. Extensions may add new commands, add options to existing
211 extensions. Extensions may add new commands, add options to existing
212 commands, change the default behavior of commands, or implement hooks.
212 commands, change the default behavior of commands, or implement hooks.
213
213
214 To enable the "foo" extension, either shipped with Mercurial or in the
214 To enable the "foo" extension, either shipped with Mercurial or in the
215 Python search path, create an entry for it in your configuration file,
215 Python search path, create an entry for it in your configuration file,
216 like this:
216 like this:
217
217
218 [extensions]
218 [extensions]
219 foo =
219 foo =
220
220
221 You may also specify the full path to an extension:
221 You may also specify the full path to an extension:
222
222
223 [extensions]
223 [extensions]
224 myfeature = ~/.hgext/myfeature.py
224 myfeature = ~/.hgext/myfeature.py
225
225
226 See 'hg help config' for more information on configuration files.
226 See 'hg help config' for more information on configuration files.
227
227
228 Extensions are not loaded by default for a variety of reasons: they can
228 Extensions are not loaded by default for a variety of reasons: they can
229 increase startup overhead; they may be meant for advanced usage only; they
229 increase startup overhead; they may be meant for advanced usage only; they
230 may provide potentially dangerous abilities (such as letting you destroy
230 may provide potentially dangerous abilities (such as letting you destroy
231 or modify history); they might not be ready for prime time; or they may
231 or modify history); they might not be ready for prime time; or they may
232 alter some usual behaviors of stock Mercurial. It is thus up to the user
232 alter some usual behaviors of stock Mercurial. It is thus up to the user
233 to activate extensions as needed.
233 to activate extensions as needed.
234
234
235 To explicitly disable an extension enabled in a configuration file of
235 To explicitly disable an extension enabled in a configuration file of
236 broader scope, prepend its path with !:
236 broader scope, prepend its path with !:
237
237
238 [extensions]
238 [extensions]
239 # disabling extension bar residing in /path/to/extension/bar.py
239 # disabling extension bar residing in /path/to/extension/bar.py
240 bar = !/path/to/extension/bar.py
240 bar = !/path/to/extension/bar.py
241 # ditto, but no path was supplied for extension baz
241 # ditto, but no path was supplied for extension baz
242 baz = !
242 baz = !
243
243
244 enabled extensions:
244 enabled extensions:
245
245
246 children command to display child changesets (DEPRECATED)
246 children command to display child changesets (DEPRECATED)
247 rebase command to move sets of revisions to a different ancestor
247 rebase command to move sets of revisions to a different ancestor
248
248
249 disabled extensions:
249 disabled extensions:
250
250
251 acl hooks for controlling repository access
251 acl hooks for controlling repository access
252 blackbox log repository events to a blackbox for debugging
252 blackbox log repository events to a blackbox for debugging
253 bugzilla hooks for integrating with the Bugzilla bug tracker
253 bugzilla hooks for integrating with the Bugzilla bug tracker
254 censor erase file content at a given revision
254 censor erase file content at a given revision
255 churn command to display statistics about repository history
255 churn command to display statistics about repository history
256 clonebundles advertise pre-generated bundles to seed clones
256 clonebundles advertise pre-generated bundles to seed clones
257 convert import revisions from foreign VCS repositories into
257 convert import revisions from foreign VCS repositories into
258 Mercurial
258 Mercurial
259 eol automatically manage newlines in repository files
259 eol automatically manage newlines in repository files
260 extdiff command to allow external programs to compare revisions
260 extdiff command to allow external programs to compare revisions
261 factotum http authentication with factotum
261 factotum http authentication with factotum
262 gpg commands to sign and verify changesets
262 gpg commands to sign and verify changesets
263 hgk browse the repository in a graphical way
263 hgk browse the repository in a graphical way
264 highlight syntax highlighting for hgweb (requires Pygments)
264 highlight syntax highlighting for hgweb (requires Pygments)
265 histedit interactive history editing
265 histedit interactive history editing
266 keyword expand keywords in tracked files
266 keyword expand keywords in tracked files
267 largefiles track large binary files
267 largefiles track large binary files
268 mq manage a stack of patches
268 mq manage a stack of patches
269 notify hooks for sending email push notifications
269 notify hooks for sending email push notifications
270 patchbomb command to send changesets as (a series of) patch emails
270 patchbomb command to send changesets as (a series of) patch emails
271 purge command to delete untracked files from the working
271 purge command to delete untracked files from the working
272 directory
272 directory
273 relink recreates hardlinks between repository clones
273 relink recreates hardlinks between repository clones
274 schemes extend schemes with shortcuts to repository swarms
274 schemes extend schemes with shortcuts to repository swarms
275 share share a common history between several working directories
275 share share a common history between several working directories
276 shelve save and restore changes to the working directory
276 shelve save and restore changes to the working directory
277 strip strip changesets and their descendants from history
277 strip strip changesets and their descendants from history
278 transplant command to transplant changesets from another branch
278 transplant command to transplant changesets from another branch
279 win32mbcs allow the use of MBCS paths with problematic encodings
279 win32mbcs allow the use of MBCS paths with problematic encodings
280 zeroconf discover and advertise repositories on the local network
280 zeroconf discover and advertise repositories on the local network
281
281
282 Verify that extension keywords appear in help templates
282 Verify that extension keywords appear in help templates
283
283
284 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
284 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
285
285
286 Test short command list with verbose option
286 Test short command list with verbose option
287
287
288 $ hg -v help shortlist
288 $ hg -v help shortlist
289 Mercurial Distributed SCM
289 Mercurial Distributed SCM
290
290
291 basic commands:
291 basic commands:
292
292
293 add add the specified files on the next commit
293 add add the specified files on the next commit
294 annotate, blame
294 annotate, blame
295 show changeset information by line for each file
295 show changeset information by line for each file
296 clone make a copy of an existing repository
296 clone make a copy of an existing repository
297 commit, ci commit the specified files or all outstanding changes
297 commit, ci commit the specified files or all outstanding changes
298 diff diff repository (or selected files)
298 diff diff repository (or selected files)
299 export dump the header and diffs for one or more changesets
299 export dump the header and diffs for one or more changesets
300 forget forget the specified files on the next commit
300 forget forget the specified files on the next commit
301 init create a new repository in the given directory
301 init create a new repository in the given directory
302 log, history show revision history of entire repository or files
302 log, history show revision history of entire repository or files
303 merge merge another revision into working directory
303 merge merge another revision into working directory
304 pull pull changes from the specified source
304 pull pull changes from the specified source
305 push push changes to the specified destination
305 push push changes to the specified destination
306 remove, rm remove the specified files on the next commit
306 remove, rm remove the specified files on the next commit
307 serve start stand-alone webserver
307 serve start stand-alone webserver
308 status, st show changed files in the working directory
308 status, st show changed files in the working directory
309 summary, sum summarize working directory state
309 summary, sum summarize working directory state
310 update, up, checkout, co
310 update, up, checkout, co
311 update working directory (or switch revisions)
311 update working directory (or switch revisions)
312
312
313 global options ([+] can be repeated):
313 global options ([+] can be repeated):
314
314
315 -R --repository REPO repository root directory or name of overlay bundle
315 -R --repository REPO repository root directory or name of overlay bundle
316 file
316 file
317 --cwd DIR change working directory
317 --cwd DIR change working directory
318 -y --noninteractive do not prompt, automatically pick the first choice for
318 -y --noninteractive do not prompt, automatically pick the first choice for
319 all prompts
319 all prompts
320 -q --quiet suppress output
320 -q --quiet suppress output
321 -v --verbose enable additional output
321 -v --verbose enable additional output
322 --color TYPE when to colorize (boolean, always, auto, never, or
322 --color TYPE when to colorize (boolean, always, auto, never, or
323 debug)
323 debug)
324 --config CONFIG [+] set/override config option (use 'section.name=value')
324 --config CONFIG [+] set/override config option (use 'section.name=value')
325 --debug enable debugging output
325 --debug enable debugging output
326 --debugger start debugger
326 --debugger start debugger
327 --encoding ENCODE set the charset encoding (default: ascii)
327 --encoding ENCODE set the charset encoding (default: ascii)
328 --encodingmode MODE set the charset encoding mode (default: strict)
328 --encodingmode MODE set the charset encoding mode (default: strict)
329 --traceback always print a traceback on exception
329 --traceback always print a traceback on exception
330 --time time how long the command takes
330 --time time how long the command takes
331 --profile print command execution profile
331 --profile print command execution profile
332 --version output version information and exit
332 --version output version information and exit
333 -h --help display help and exit
333 -h --help display help and exit
334 --hidden consider hidden changesets
334 --hidden consider hidden changesets
335 --pager TYPE when to paginate (boolean, always, auto, or never)
335 --pager TYPE when to paginate (boolean, always, auto, or never)
336 (default: auto)
336 (default: auto)
337
337
338 (use 'hg help' for the full list of commands)
338 (use 'hg help' for the full list of commands)
339
339
340 $ hg add -h
340 $ hg add -h
341 hg add [OPTION]... [FILE]...
341 hg add [OPTION]... [FILE]...
342
342
343 add the specified files on the next commit
343 add the specified files on the next commit
344
344
345 Schedule files to be version controlled and added to the repository.
345 Schedule files to be version controlled and added to the repository.
346
346
347 The files will be added to the repository at the next commit. To undo an
347 The files will be added to the repository at the next commit. To undo an
348 add before that, see 'hg forget'.
348 add before that, see 'hg forget'.
349
349
350 If no names are given, add all files to the repository (except files
350 If no names are given, add all files to the repository (except files
351 matching ".hgignore").
351 matching ".hgignore").
352
352
353 Returns 0 if all files are successfully added.
353 Returns 0 if all files are successfully added.
354
354
355 options ([+] can be repeated):
355 options ([+] can be repeated):
356
356
357 -I --include PATTERN [+] include names matching the given patterns
357 -I --include PATTERN [+] include names matching the given patterns
358 -X --exclude PATTERN [+] exclude names matching the given patterns
358 -X --exclude PATTERN [+] exclude names matching the given patterns
359 -S --subrepos recurse into subrepositories
359 -S --subrepos recurse into subrepositories
360 -n --dry-run do not perform actions, just print output
360 -n --dry-run do not perform actions, just print output
361
361
362 (some details hidden, use --verbose to show complete help)
362 (some details hidden, use --verbose to show complete help)
363
363
364 Verbose help for add
364 Verbose help for add
365
365
366 $ hg add -hv
366 $ hg add -hv
367 hg add [OPTION]... [FILE]...
367 hg add [OPTION]... [FILE]...
368
368
369 add the specified files on the next commit
369 add the specified files on the next commit
370
370
371 Schedule files to be version controlled and added to the repository.
371 Schedule files to be version controlled and added to the repository.
372
372
373 The files will be added to the repository at the next commit. To undo an
373 The files will be added to the repository at the next commit. To undo an
374 add before that, see 'hg forget'.
374 add before that, see 'hg forget'.
375
375
376 If no names are given, add all files to the repository (except files
376 If no names are given, add all files to the repository (except files
377 matching ".hgignore").
377 matching ".hgignore").
378
378
379 Examples:
379 Examples:
380
380
381 - New (unknown) files are added automatically by 'hg add':
381 - New (unknown) files are added automatically by 'hg add':
382
382
383 $ ls
383 $ ls
384 foo.c
384 foo.c
385 $ hg status
385 $ hg status
386 ? foo.c
386 ? foo.c
387 $ hg add
387 $ hg add
388 adding foo.c
388 adding foo.c
389 $ hg status
389 $ hg status
390 A foo.c
390 A foo.c
391
391
392 - Specific files to be added can be specified:
392 - Specific files to be added can be specified:
393
393
394 $ ls
394 $ ls
395 bar.c foo.c
395 bar.c foo.c
396 $ hg status
396 $ hg status
397 ? bar.c
397 ? bar.c
398 ? foo.c
398 ? foo.c
399 $ hg add bar.c
399 $ hg add bar.c
400 $ hg status
400 $ hg status
401 A bar.c
401 A bar.c
402 ? foo.c
402 ? foo.c
403
403
404 Returns 0 if all files are successfully added.
404 Returns 0 if all files are successfully added.
405
405
406 options ([+] can be repeated):
406 options ([+] can be repeated):
407
407
408 -I --include PATTERN [+] include names matching the given patterns
408 -I --include PATTERN [+] include names matching the given patterns
409 -X --exclude PATTERN [+] exclude names matching the given patterns
409 -X --exclude PATTERN [+] exclude names matching the given patterns
410 -S --subrepos recurse into subrepositories
410 -S --subrepos recurse into subrepositories
411 -n --dry-run do not perform actions, just print output
411 -n --dry-run do not perform actions, just print output
412
412
413 global options ([+] can be repeated):
413 global options ([+] can be repeated):
414
414
415 -R --repository REPO repository root directory or name of overlay bundle
415 -R --repository REPO repository root directory or name of overlay bundle
416 file
416 file
417 --cwd DIR change working directory
417 --cwd DIR change working directory
418 -y --noninteractive do not prompt, automatically pick the first choice for
418 -y --noninteractive do not prompt, automatically pick the first choice for
419 all prompts
419 all prompts
420 -q --quiet suppress output
420 -q --quiet suppress output
421 -v --verbose enable additional output
421 -v --verbose enable additional output
422 --color TYPE when to colorize (boolean, always, auto, never, or
422 --color TYPE when to colorize (boolean, always, auto, never, or
423 debug)
423 debug)
424 --config CONFIG [+] set/override config option (use 'section.name=value')
424 --config CONFIG [+] set/override config option (use 'section.name=value')
425 --debug enable debugging output
425 --debug enable debugging output
426 --debugger start debugger
426 --debugger start debugger
427 --encoding ENCODE set the charset encoding (default: ascii)
427 --encoding ENCODE set the charset encoding (default: ascii)
428 --encodingmode MODE set the charset encoding mode (default: strict)
428 --encodingmode MODE set the charset encoding mode (default: strict)
429 --traceback always print a traceback on exception
429 --traceback always print a traceback on exception
430 --time time how long the command takes
430 --time time how long the command takes
431 --profile print command execution profile
431 --profile print command execution profile
432 --version output version information and exit
432 --version output version information and exit
433 -h --help display help and exit
433 -h --help display help and exit
434 --hidden consider hidden changesets
434 --hidden consider hidden changesets
435 --pager TYPE when to paginate (boolean, always, auto, or never)
435 --pager TYPE when to paginate (boolean, always, auto, or never)
436 (default: auto)
436 (default: auto)
437
437
438 Test the textwidth config option
438 Test the textwidth config option
439
439
440 $ hg root -h --config ui.textwidth=50
440 $ hg root -h --config ui.textwidth=50
441 hg root
441 hg root
442
442
443 print the root (top) of the current working
443 print the root (top) of the current working
444 directory
444 directory
445
445
446 Print the root directory of the current
446 Print the root directory of the current
447 repository.
447 repository.
448
448
449 Returns 0 on success.
449 Returns 0 on success.
450
450
451 (some details hidden, use --verbose to show
451 (some details hidden, use --verbose to show
452 complete help)
452 complete help)
453
453
454 Test help option with version option
454 Test help option with version option
455
455
456 $ hg add -h --version
456 $ hg add -h --version
457 Mercurial Distributed SCM (version *) (glob)
457 Mercurial Distributed SCM (version *) (glob)
458 (see https://mercurial-scm.org for more information)
458 (see https://mercurial-scm.org for more information)
459
459
460 Copyright (C) 2005-* Matt Mackall and others (glob)
460 Copyright (C) 2005-* Matt Mackall and others (glob)
461 This is free software; see the source for copying conditions. There is NO
461 This is free software; see the source for copying conditions. There is NO
462 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
462 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
463
463
464 $ hg add --skjdfks
464 $ hg add --skjdfks
465 hg add: option --skjdfks not recognized
465 hg add: option --skjdfks not recognized
466 hg add [OPTION]... [FILE]...
466 hg add [OPTION]... [FILE]...
467
467
468 add the specified files on the next commit
468 add the specified files on the next commit
469
469
470 options ([+] can be repeated):
470 options ([+] can be repeated):
471
471
472 -I --include PATTERN [+] include names matching the given patterns
472 -I --include PATTERN [+] include names matching the given patterns
473 -X --exclude PATTERN [+] exclude names matching the given patterns
473 -X --exclude PATTERN [+] exclude names matching the given patterns
474 -S --subrepos recurse into subrepositories
474 -S --subrepos recurse into subrepositories
475 -n --dry-run do not perform actions, just print output
475 -n --dry-run do not perform actions, just print output
476
476
477 (use 'hg add -h' to show more help)
477 (use 'hg add -h' to show more help)
478 [255]
478 [255]
479
479
480 Test ambiguous command help
480 Test ambiguous command help
481
481
482 $ hg help ad
482 $ hg help ad
483 list of commands:
483 list of commands:
484
484
485 add add the specified files on the next commit
485 add add the specified files on the next commit
486 addremove add all new files, delete all missing files
486 addremove add all new files, delete all missing files
487
487
488 (use 'hg help -v ad' to show built-in aliases and global options)
488 (use 'hg help -v ad' to show built-in aliases and global options)
489
489
490 Test command without options
490 Test command without options
491
491
492 $ hg help verify
492 $ hg help verify
493 hg verify
493 hg verify
494
494
495 verify the integrity of the repository
495 verify the integrity of the repository
496
496
497 Verify the integrity of the current repository.
497 Verify the integrity of the current repository.
498
498
499 This will perform an extensive check of the repository's integrity,
499 This will perform an extensive check of the repository's integrity,
500 validating the hashes and checksums of each entry in the changelog,
500 validating the hashes and checksums of each entry in the changelog,
501 manifest, and tracked files, as well as the integrity of their crosslinks
501 manifest, and tracked files, as well as the integrity of their crosslinks
502 and indices.
502 and indices.
503
503
504 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
504 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
505 information about recovery from corruption of the repository.
505 information about recovery from corruption of the repository.
506
506
507 Returns 0 on success, 1 if errors are encountered.
507 Returns 0 on success, 1 if errors are encountered.
508
508
509 (some details hidden, use --verbose to show complete help)
509 (some details hidden, use --verbose to show complete help)
510
510
511 $ hg help diff
511 $ hg help diff
512 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
512 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
513
513
514 diff repository (or selected files)
514 diff repository (or selected files)
515
515
516 Show differences between revisions for the specified files.
516 Show differences between revisions for the specified files.
517
517
518 Differences between files are shown using the unified diff format.
518 Differences between files are shown using the unified diff format.
519
519
520 Note:
520 Note:
521 'hg diff' may generate unexpected results for merges, as it will
521 'hg diff' may generate unexpected results for merges, as it will
522 default to comparing against the working directory's first parent
522 default to comparing against the working directory's first parent
523 changeset if no revisions are specified.
523 changeset if no revisions are specified.
524
524
525 When two revision arguments are given, then changes are shown between
525 When two revision arguments are given, then changes are shown between
526 those revisions. If only one revision is specified then that revision is
526 those revisions. If only one revision is specified then that revision is
527 compared to the working directory, and, when no revisions are specified,
527 compared to the working directory, and, when no revisions are specified,
528 the working directory files are compared to its first parent.
528 the working directory files are compared to its first parent.
529
529
530 Alternatively you can specify -c/--change with a revision to see the
530 Alternatively you can specify -c/--change with a revision to see the
531 changes in that changeset relative to its first parent.
531 changes in that changeset relative to its first parent.
532
532
533 Without the -a/--text option, diff will avoid generating diffs of files it
533 Without the -a/--text option, diff will avoid generating diffs of files it
534 detects as binary. With -a, diff will generate a diff anyway, probably
534 detects as binary. With -a, diff will generate a diff anyway, probably
535 with undesirable results.
535 with undesirable results.
536
536
537 Use the -g/--git option to generate diffs in the git extended diff format.
537 Use the -g/--git option to generate diffs in the git extended diff format.
538 For more information, read 'hg help diffs'.
538 For more information, read 'hg help diffs'.
539
539
540 Returns 0 on success.
540 Returns 0 on success.
541
541
542 options ([+] can be repeated):
542 options ([+] can be repeated):
543
543
544 -r --rev REV [+] revision
544 -r --rev REV [+] revision
545 -c --change REV change made by revision
545 -c --change REV change made by revision
546 -a --text treat all files as text
546 -a --text treat all files as text
547 -g --git use git extended diff format
547 -g --git use git extended diff format
548 --binary generate binary diffs in git mode (default)
548 --binary generate binary diffs in git mode (default)
549 --nodates omit dates from diff headers
549 --nodates omit dates from diff headers
550 --noprefix omit a/ and b/ prefixes from filenames
550 --noprefix omit a/ and b/ prefixes from filenames
551 -p --show-function show which function each change is in
551 -p --show-function show which function each change is in
552 --reverse produce a diff that undoes the changes
552 --reverse produce a diff that undoes the changes
553 -w --ignore-all-space ignore white space when comparing lines
553 -w --ignore-all-space ignore white space when comparing lines
554 -b --ignore-space-change ignore changes in the amount of white space
554 -b --ignore-space-change ignore changes in the amount of white space
555 -B --ignore-blank-lines ignore changes whose lines are all blank
555 -B --ignore-blank-lines ignore changes whose lines are all blank
556 -U --unified NUM number of lines of context to show
556 -U --unified NUM number of lines of context to show
557 --stat output diffstat-style summary of changes
557 --stat output diffstat-style summary of changes
558 --root DIR produce diffs relative to subdirectory
558 --root DIR produce diffs relative to subdirectory
559 -I --include PATTERN [+] include names matching the given patterns
559 -I --include PATTERN [+] include names matching the given patterns
560 -X --exclude PATTERN [+] exclude names matching the given patterns
560 -X --exclude PATTERN [+] exclude names matching the given patterns
561 -S --subrepos recurse into subrepositories
561 -S --subrepos recurse into subrepositories
562
562
563 (some details hidden, use --verbose to show complete help)
563 (some details hidden, use --verbose to show complete help)
564
564
565 $ hg help status
565 $ hg help status
566 hg status [OPTION]... [FILE]...
566 hg status [OPTION]... [FILE]...
567
567
568 aliases: st
568 aliases: st
569
569
570 show changed files in the working directory
570 show changed files in the working directory
571
571
572 Show status of files in the repository. If names are given, only files
572 Show status of files in the repository. If names are given, only files
573 that match are shown. Files that are clean or ignored or the source of a
573 that match are shown. Files that are clean or ignored or the source of a
574 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
574 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
575 -C/--copies or -A/--all are given. Unless options described with "show
575 -C/--copies or -A/--all are given. Unless options described with "show
576 only ..." are given, the options -mardu are used.
576 only ..." are given, the options -mardu are used.
577
577
578 Option -q/--quiet hides untracked (unknown and ignored) files unless
578 Option -q/--quiet hides untracked (unknown and ignored) files unless
579 explicitly requested with -u/--unknown or -i/--ignored.
579 explicitly requested with -u/--unknown or -i/--ignored.
580
580
581 Note:
581 Note:
582 'hg status' may appear to disagree with diff if permissions have
582 'hg status' may appear to disagree with diff if permissions have
583 changed or a merge has occurred. The standard diff format does not
583 changed or a merge has occurred. The standard diff format does not
584 report permission changes and diff only reports changes relative to one
584 report permission changes and diff only reports changes relative to one
585 merge parent.
585 merge parent.
586
586
587 If one revision is given, it is used as the base revision. If two
587 If one revision is given, it is used as the base revision. If two
588 revisions are given, the differences between them are shown. The --change
588 revisions are given, the differences between them are shown. The --change
589 option can also be used as a shortcut to list the changed files of a
589 option can also be used as a shortcut to list the changed files of a
590 revision from its first parent.
590 revision from its first parent.
591
591
592 The codes used to show the status of files are:
592 The codes used to show the status of files are:
593
593
594 M = modified
594 M = modified
595 A = added
595 A = added
596 R = removed
596 R = removed
597 C = clean
597 C = clean
598 ! = missing (deleted by non-hg command, but still tracked)
598 ! = missing (deleted by non-hg command, but still tracked)
599 ? = not tracked
599 ? = not tracked
600 I = ignored
600 I = ignored
601 = origin of the previous file (with --copies)
601 = origin of the previous file (with --copies)
602
602
603 Returns 0 on success.
603 Returns 0 on success.
604
604
605 options ([+] can be repeated):
605 options ([+] can be repeated):
606
606
607 -A --all show status of all files
607 -A --all show status of all files
608 -m --modified show only modified files
608 -m --modified show only modified files
609 -a --added show only added files
609 -a --added show only added files
610 -r --removed show only removed files
610 -r --removed show only removed files
611 -d --deleted show only deleted (but tracked) files
611 -d --deleted show only deleted (but tracked) files
612 -c --clean show only files without changes
612 -c --clean show only files without changes
613 -u --unknown show only unknown (not tracked) files
613 -u --unknown show only unknown (not tracked) files
614 -i --ignored show only ignored files
614 -i --ignored show only ignored files
615 -n --no-status hide status prefix
615 -n --no-status hide status prefix
616 -C --copies show source of copied files
616 -C --copies show source of copied files
617 -0 --print0 end filenames with NUL, for use with xargs
617 -0 --print0 end filenames with NUL, for use with xargs
618 --rev REV [+] show difference from revision
618 --rev REV [+] show difference from revision
619 --change REV list the changed files of a revision
619 --change REV list the changed files of a revision
620 -I --include PATTERN [+] include names matching the given patterns
620 -I --include PATTERN [+] include names matching the given patterns
621 -X --exclude PATTERN [+] exclude names matching the given patterns
621 -X --exclude PATTERN [+] exclude names matching the given patterns
622 -S --subrepos recurse into subrepositories
622 -S --subrepos recurse into subrepositories
623
623
624 (some details hidden, use --verbose to show complete help)
624 (some details hidden, use --verbose to show complete help)
625
625
626 $ hg -q help status
626 $ hg -q help status
627 hg status [OPTION]... [FILE]...
627 hg status [OPTION]... [FILE]...
628
628
629 show changed files in the working directory
629 show changed files in the working directory
630
630
631 $ hg help foo
631 $ hg help foo
632 abort: no such help topic: foo
632 abort: no such help topic: foo
633 (try 'hg help --keyword foo')
633 (try 'hg help --keyword foo')
634 [255]
634 [255]
635
635
636 $ hg skjdfks
636 $ hg skjdfks
637 hg: unknown command 'skjdfks'
637 hg: unknown command 'skjdfks'
638 Mercurial Distributed SCM
638 Mercurial Distributed SCM
639
639
640 basic commands:
640 basic commands:
641
641
642 add add the specified files on the next commit
642 add add the specified files on the next commit
643 annotate show changeset information by line for each file
643 annotate show changeset information by line for each file
644 clone make a copy of an existing repository
644 clone make a copy of an existing repository
645 commit commit the specified files or all outstanding changes
645 commit commit the specified files or all outstanding changes
646 diff diff repository (or selected files)
646 diff diff repository (or selected files)
647 export dump the header and diffs for one or more changesets
647 export dump the header and diffs for one or more changesets
648 forget forget the specified files on the next commit
648 forget forget the specified files on the next commit
649 init create a new repository in the given directory
649 init create a new repository in the given directory
650 log show revision history of entire repository or files
650 log show revision history of entire repository or files
651 merge merge another revision into working directory
651 merge merge another revision into working directory
652 pull pull changes from the specified source
652 pull pull changes from the specified source
653 push push changes to the specified destination
653 push push changes to the specified destination
654 remove remove the specified files on the next commit
654 remove remove the specified files on the next commit
655 serve start stand-alone webserver
655 serve start stand-alone webserver
656 status show changed files in the working directory
656 status show changed files in the working directory
657 summary summarize working directory state
657 summary summarize working directory state
658 update update working directory (or switch revisions)
658 update update working directory (or switch revisions)
659
659
660 (use 'hg help' for the full list of commands or 'hg -v' for details)
660 (use 'hg help' for the full list of commands or 'hg -v' for details)
661 [255]
661 [255]
662
662
663 Typoed command gives suggestion
664 $ hg puls
665 hg: unknown command 'puls'
666 (did you mean one of pull, push?)
667 [255]
668
669 Not enabled extension gets suggested
670
671 $ hg rebase
672 hg: unknown command 'rebase'
673 'rebase' is provided by the following extension:
674
675 rebase command to move sets of revisions to a different ancestor
676
677 (use 'hg help extensions' for information on enabling extensions)
678 [255]
679
680 Disabled extension gets suggested
681 $ hg --config extensions.rebase=! rebase
682 hg: unknown command 'rebase'
683 (did you mean one of rename, resolve?)
684 [255]
663
685
664 Make sure that we don't run afoul of the help system thinking that
686 Make sure that we don't run afoul of the help system thinking that
665 this is a section and erroring out weirdly.
687 this is a section and erroring out weirdly.
666
688
667 $ hg .log
689 $ hg .log
668 hg: unknown command '.log'
690 hg: unknown command '.log'
669 (did you mean log?)
691 (did you mean log?)
670 [255]
692 [255]
671
693
672 $ hg log.
694 $ hg log.
673 hg: unknown command 'log.'
695 hg: unknown command 'log.'
674 (did you mean log?)
696 (did you mean log?)
675 [255]
697 [255]
676 $ hg pu.lh
698 $ hg pu.lh
677 hg: unknown command 'pu.lh'
699 hg: unknown command 'pu.lh'
678 (did you mean one of pull, push?)
700 (did you mean one of pull, push?)
679 [255]
701 [255]
680
702
681 $ cat > helpext.py <<EOF
703 $ cat > helpext.py <<EOF
682 > import os
704 > import os
683 > from mercurial import commands, registrar
705 > from mercurial import commands, registrar
684 >
706 >
685 > cmdtable = {}
707 > cmdtable = {}
686 > command = registrar.command(cmdtable)
708 > command = registrar.command(cmdtable)
687 >
709 >
688 > @command(b'nohelp',
710 > @command(b'nohelp',
689 > [(b'', b'longdesc', 3, b'x'*90),
711 > [(b'', b'longdesc', 3, b'x'*90),
690 > (b'n', b'', None, b'normal desc'),
712 > (b'n', b'', None, b'normal desc'),
691 > (b'', b'newline', b'', b'line1\nline2')],
713 > (b'', b'newline', b'', b'line1\nline2')],
692 > b'hg nohelp',
714 > b'hg nohelp',
693 > norepo=True)
715 > norepo=True)
694 > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')])
716 > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')])
695 > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')])
717 > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')])
696 > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')])
718 > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')])
697 > def nohelp(ui, *args, **kwargs):
719 > def nohelp(ui, *args, **kwargs):
698 > pass
720 > pass
699 >
721 >
700 > def uisetup(ui):
722 > def uisetup(ui):
701 > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext')
723 > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext')
702 > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext')
724 > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext')
703 >
725 >
704 > EOF
726 > EOF
705 $ echo '[extensions]' >> $HGRCPATH
727 $ echo '[extensions]' >> $HGRCPATH
706 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
728 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
707
729
708 Test for aliases
730 Test for aliases
709
731
710 $ hg help hgalias
732 $ hg help hgalias
711 hg hgalias [--remote]
733 hg hgalias [--remote]
712
734
713 alias for: hg summary
735 alias for: hg summary
714
736
715 summarize working directory state
737 summarize working directory state
716
738
717 This generates a brief summary of the working directory state, including
739 This generates a brief summary of the working directory state, including
718 parents, branch, commit status, phase and available updates.
740 parents, branch, commit status, phase and available updates.
719
741
720 With the --remote option, this will check the default paths for incoming
742 With the --remote option, this will check the default paths for incoming
721 and outgoing changes. This can be time-consuming.
743 and outgoing changes. This can be time-consuming.
722
744
723 Returns 0 on success.
745 Returns 0 on success.
724
746
725 defined by: helpext
747 defined by: helpext
726
748
727 options:
749 options:
728
750
729 --remote check for push and pull
751 --remote check for push and pull
730
752
731 (some details hidden, use --verbose to show complete help)
753 (some details hidden, use --verbose to show complete help)
732
754
733 $ hg help shellalias
755 $ hg help shellalias
734 hg shellalias
756 hg shellalias
735
757
736 shell alias for:
758 shell alias for:
737
759
738 echo hi
760 echo hi
739
761
740 defined by: helpext
762 defined by: helpext
741
763
742 (some details hidden, use --verbose to show complete help)
764 (some details hidden, use --verbose to show complete help)
743
765
744 Test command with no help text
766 Test command with no help text
745
767
746 $ hg help nohelp
768 $ hg help nohelp
747 hg nohelp
769 hg nohelp
748
770
749 (no help text available)
771 (no help text available)
750
772
751 options:
773 options:
752
774
753 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
775 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
754 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
776 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
755 -n -- normal desc
777 -n -- normal desc
756 --newline VALUE line1 line2
778 --newline VALUE line1 line2
757
779
758 (some details hidden, use --verbose to show complete help)
780 (some details hidden, use --verbose to show complete help)
759
781
760 $ hg help -k nohelp
782 $ hg help -k nohelp
761 Commands:
783 Commands:
762
784
763 nohelp hg nohelp
785 nohelp hg nohelp
764
786
765 Extension Commands:
787 Extension Commands:
766
788
767 nohelp (no help text available)
789 nohelp (no help text available)
768
790
769 Test that default list of commands omits extension commands
791 Test that default list of commands omits extension commands
770
792
771 $ hg help
793 $ hg help
772 Mercurial Distributed SCM
794 Mercurial Distributed SCM
773
795
774 list of commands:
796 list of commands:
775
797
776 add add the specified files on the next commit
798 add add the specified files on the next commit
777 addremove add all new files, delete all missing files
799 addremove add all new files, delete all missing files
778 annotate show changeset information by line for each file
800 annotate show changeset information by line for each file
779 archive create an unversioned archive of a repository revision
801 archive create an unversioned archive of a repository revision
780 backout reverse effect of earlier changeset
802 backout reverse effect of earlier changeset
781 bisect subdivision search of changesets
803 bisect subdivision search of changesets
782 bookmarks create a new bookmark or list existing bookmarks
804 bookmarks create a new bookmark or list existing bookmarks
783 branch set or show the current branch name
805 branch set or show the current branch name
784 branches list repository named branches
806 branches list repository named branches
785 bundle create a bundle file
807 bundle create a bundle file
786 cat output the current or given revision of files
808 cat output the current or given revision of files
787 clone make a copy of an existing repository
809 clone make a copy of an existing repository
788 commit commit the specified files or all outstanding changes
810 commit commit the specified files or all outstanding changes
789 config show combined config settings from all hgrc files
811 config show combined config settings from all hgrc files
790 copy mark files as copied for the next commit
812 copy mark files as copied for the next commit
791 diff diff repository (or selected files)
813 diff diff repository (or selected files)
792 export dump the header and diffs for one or more changesets
814 export dump the header and diffs for one or more changesets
793 files list tracked files
815 files list tracked files
794 forget forget the specified files on the next commit
816 forget forget the specified files on the next commit
795 graft copy changes from other branches onto the current branch
817 graft copy changes from other branches onto the current branch
796 grep search revision history for a pattern in specified files
818 grep search revision history for a pattern in specified files
797 heads show branch heads
819 heads show branch heads
798 help show help for a given topic or a help overview
820 help show help for a given topic or a help overview
799 identify identify the working directory or specified revision
821 identify identify the working directory or specified revision
800 import import an ordered set of patches
822 import import an ordered set of patches
801 incoming show new changesets found in source
823 incoming show new changesets found in source
802 init create a new repository in the given directory
824 init create a new repository in the given directory
803 log show revision history of entire repository or files
825 log show revision history of entire repository or files
804 manifest output the current or given revision of the project manifest
826 manifest output the current or given revision of the project manifest
805 merge merge another revision into working directory
827 merge merge another revision into working directory
806 outgoing show changesets not found in the destination
828 outgoing show changesets not found in the destination
807 paths show aliases for remote repositories
829 paths show aliases for remote repositories
808 phase set or show the current phase name
830 phase set or show the current phase name
809 pull pull changes from the specified source
831 pull pull changes from the specified source
810 push push changes to the specified destination
832 push push changes to the specified destination
811 recover roll back an interrupted transaction
833 recover roll back an interrupted transaction
812 remove remove the specified files on the next commit
834 remove remove the specified files on the next commit
813 rename rename files; equivalent of copy + remove
835 rename rename files; equivalent of copy + remove
814 resolve redo merges or set/view the merge status of files
836 resolve redo merges or set/view the merge status of files
815 revert restore files to their checkout state
837 revert restore files to their checkout state
816 root print the root (top) of the current working directory
838 root print the root (top) of the current working directory
817 serve start stand-alone webserver
839 serve start stand-alone webserver
818 status show changed files in the working directory
840 status show changed files in the working directory
819 summary summarize working directory state
841 summary summarize working directory state
820 tag add one or more tags for the current or given revision
842 tag add one or more tags for the current or given revision
821 tags list repository tags
843 tags list repository tags
822 unbundle apply one or more bundle files
844 unbundle apply one or more bundle files
823 update update working directory (or switch revisions)
845 update update working directory (or switch revisions)
824 verify verify the integrity of the repository
846 verify verify the integrity of the repository
825 version output version and copyright information
847 version output version and copyright information
826
848
827 enabled extensions:
849 enabled extensions:
828
850
829 helpext (no help text available)
851 helpext (no help text available)
830
852
831 additional help topics:
853 additional help topics:
832
854
833 bundlespec Bundle File Formats
855 bundlespec Bundle File Formats
834 color Colorizing Outputs
856 color Colorizing Outputs
835 config Configuration Files
857 config Configuration Files
836 dates Date Formats
858 dates Date Formats
837 diffs Diff Formats
859 diffs Diff Formats
838 environment Environment Variables
860 environment Environment Variables
839 extensions Using Additional Features
861 extensions Using Additional Features
840 filesets Specifying File Sets
862 filesets Specifying File Sets
841 glossary Glossary
863 glossary Glossary
842 hgignore Syntax for Mercurial Ignore Files
864 hgignore Syntax for Mercurial Ignore Files
843 hgweb Configuring hgweb
865 hgweb Configuring hgweb
844 internals Technical implementation topics
866 internals Technical implementation topics
845 merge-tools Merge Tools
867 merge-tools Merge Tools
846 pager Pager Support
868 pager Pager Support
847 patterns File Name Patterns
869 patterns File Name Patterns
848 phases Working with Phases
870 phases Working with Phases
849 revisions Specifying Revisions
871 revisions Specifying Revisions
850 scripting Using Mercurial from scripts and automation
872 scripting Using Mercurial from scripts and automation
851 subrepos Subrepositories
873 subrepos Subrepositories
852 templating Template Usage
874 templating Template Usage
853 urls URL Paths
875 urls URL Paths
854
876
855 (use 'hg help -v' to show built-in aliases and global options)
877 (use 'hg help -v' to show built-in aliases and global options)
856
878
857
879
858 Test list of internal help commands
880 Test list of internal help commands
859
881
860 $ hg help debug
882 $ hg help debug
861 debug commands (internal and unsupported):
883 debug commands (internal and unsupported):
862
884
863 debugancestor
885 debugancestor
864 find the ancestor revision of two revisions in a given index
886 find the ancestor revision of two revisions in a given index
865 debugapplystreamclonebundle
887 debugapplystreamclonebundle
866 apply a stream clone bundle file
888 apply a stream clone bundle file
867 debugbuilddag
889 debugbuilddag
868 builds a repo with a given DAG from scratch in the current
890 builds a repo with a given DAG from scratch in the current
869 empty repo
891 empty repo
870 debugbundle lists the contents of a bundle
892 debugbundle lists the contents of a bundle
871 debugcheckstate
893 debugcheckstate
872 validate the correctness of the current dirstate
894 validate the correctness of the current dirstate
873 debugcolor show available color, effects or style
895 debugcolor show available color, effects or style
874 debugcommands
896 debugcommands
875 list all available commands and options
897 list all available commands and options
876 debugcomplete
898 debugcomplete
877 returns the completion list associated with the given command
899 returns the completion list associated with the given command
878 debugcreatestreamclonebundle
900 debugcreatestreamclonebundle
879 create a stream clone bundle file
901 create a stream clone bundle file
880 debugdag format the changelog or an index DAG as a concise textual
902 debugdag format the changelog or an index DAG as a concise textual
881 description
903 description
882 debugdata dump the contents of a data file revision
904 debugdata dump the contents of a data file revision
883 debugdate parse and display a date
905 debugdate parse and display a date
884 debugdeltachain
906 debugdeltachain
885 dump information about delta chains in a revlog
907 dump information about delta chains in a revlog
886 debugdirstate
908 debugdirstate
887 show the contents of the current dirstate
909 show the contents of the current dirstate
888 debugdiscovery
910 debugdiscovery
889 runs the changeset discovery protocol in isolation
911 runs the changeset discovery protocol in isolation
890 debugextensions
912 debugextensions
891 show information about active extensions
913 show information about active extensions
892 debugfileset parse and apply a fileset specification
914 debugfileset parse and apply a fileset specification
893 debugfsinfo show information detected about current filesystem
915 debugfsinfo show information detected about current filesystem
894 debuggetbundle
916 debuggetbundle
895 retrieves a bundle from a repo
917 retrieves a bundle from a repo
896 debugignore display the combined ignore pattern and information about
918 debugignore display the combined ignore pattern and information about
897 ignored files
919 ignored files
898 debugindex dump the contents of an index file
920 debugindex dump the contents of an index file
899 debugindexdot
921 debugindexdot
900 dump an index DAG as a graphviz dot file
922 dump an index DAG as a graphviz dot file
901 debuginstall test Mercurial installation
923 debuginstall test Mercurial installation
902 debugknown test whether node ids are known to a repo
924 debugknown test whether node ids are known to a repo
903 debuglocks show or modify state of locks
925 debuglocks show or modify state of locks
904 debugmergestate
926 debugmergestate
905 print merge state
927 print merge state
906 debugnamecomplete
928 debugnamecomplete
907 complete "names" - tags, open branch names, bookmark names
929 complete "names" - tags, open branch names, bookmark names
908 debugobsolete
930 debugobsolete
909 create arbitrary obsolete marker
931 create arbitrary obsolete marker
910 debugoptADV (no help text available)
932 debugoptADV (no help text available)
911 debugoptDEP (no help text available)
933 debugoptDEP (no help text available)
912 debugoptEXP (no help text available)
934 debugoptEXP (no help text available)
913 debugpathcomplete
935 debugpathcomplete
914 complete part or all of a tracked path
936 complete part or all of a tracked path
915 debugpickmergetool
937 debugpickmergetool
916 examine which merge tool is chosen for specified file
938 examine which merge tool is chosen for specified file
917 debugpushkey access the pushkey key/value protocol
939 debugpushkey access the pushkey key/value protocol
918 debugpvec (no help text available)
940 debugpvec (no help text available)
919 debugrebuilddirstate
941 debugrebuilddirstate
920 rebuild the dirstate as it would look like for the given
942 rebuild the dirstate as it would look like for the given
921 revision
943 revision
922 debugrebuildfncache
944 debugrebuildfncache
923 rebuild the fncache file
945 rebuild the fncache file
924 debugrename dump rename information
946 debugrename dump rename information
925 debugrevlog show data and statistics about a revlog
947 debugrevlog show data and statistics about a revlog
926 debugrevspec parse and apply a revision specification
948 debugrevspec parse and apply a revision specification
927 debugsetparents
949 debugsetparents
928 manually set the parents of the current working directory
950 manually set the parents of the current working directory
929 debugsub (no help text available)
951 debugsub (no help text available)
930 debugsuccessorssets
952 debugsuccessorssets
931 show set of successors for revision
953 show set of successors for revision
932 debugtemplate
954 debugtemplate
933 parse and apply a template
955 parse and apply a template
934 debugupdatecaches
956 debugupdatecaches
935 warm all known caches in the repository
957 warm all known caches in the repository
936 debugupgraderepo
958 debugupgraderepo
937 upgrade a repository to use different features
959 upgrade a repository to use different features
938 debugwalk show how files match on given patterns
960 debugwalk show how files match on given patterns
939 debugwireargs
961 debugwireargs
940 (no help text available)
962 (no help text available)
941
963
942 (use 'hg help -v debug' to show built-in aliases and global options)
964 (use 'hg help -v debug' to show built-in aliases and global options)
943
965
944 internals topic renders index of available sub-topics
966 internals topic renders index of available sub-topics
945
967
946 $ hg help internals
968 $ hg help internals
947 Technical implementation topics
969 Technical implementation topics
948 """""""""""""""""""""""""""""""
970 """""""""""""""""""""""""""""""
949
971
950 To access a subtopic, use "hg help internals.{subtopic-name}"
972 To access a subtopic, use "hg help internals.{subtopic-name}"
951
973
952 bundles Bundles
974 bundles Bundles
953 censor Censor
975 censor Censor
954 changegroups Changegroups
976 changegroups Changegroups
955 requirements Repository Requirements
977 requirements Repository Requirements
956 revlogs Revision Logs
978 revlogs Revision Logs
957 wireprotocol Wire Protocol
979 wireprotocol Wire Protocol
958
980
959 sub-topics can be accessed
981 sub-topics can be accessed
960
982
961 $ hg help internals.changegroups
983 $ hg help internals.changegroups
962 Changegroups
984 Changegroups
963 """"""""""""
985 """"""""""""
964
986
965 Changegroups are representations of repository revlog data, specifically
987 Changegroups are representations of repository revlog data, specifically
966 the changelog data, root/flat manifest data, treemanifest data, and
988 the changelog data, root/flat manifest data, treemanifest data, and
967 filelogs.
989 filelogs.
968
990
969 There are 3 versions of changegroups: "1", "2", and "3". From a high-
991 There are 3 versions of changegroups: "1", "2", and "3". From a high-
970 level, versions "1" and "2" are almost exactly the same, with the only
992 level, versions "1" and "2" are almost exactly the same, with the only
971 difference being an additional item in the *delta header*. Version "3"
993 difference being an additional item in the *delta header*. Version "3"
972 adds support for revlog flags in the *delta header* and optionally
994 adds support for revlog flags in the *delta header* and optionally
973 exchanging treemanifests (enabled by setting an option on the
995 exchanging treemanifests (enabled by setting an option on the
974 "changegroup" part in the bundle2).
996 "changegroup" part in the bundle2).
975
997
976 Changegroups when not exchanging treemanifests consist of 3 logical
998 Changegroups when not exchanging treemanifests consist of 3 logical
977 segments:
999 segments:
978
1000
979 +---------------------------------+
1001 +---------------------------------+
980 | | | |
1002 | | | |
981 | changeset | manifest | filelogs |
1003 | changeset | manifest | filelogs |
982 | | | |
1004 | | | |
983 | | | |
1005 | | | |
984 +---------------------------------+
1006 +---------------------------------+
985
1007
986 When exchanging treemanifests, there are 4 logical segments:
1008 When exchanging treemanifests, there are 4 logical segments:
987
1009
988 +-------------------------------------------------+
1010 +-------------------------------------------------+
989 | | | | |
1011 | | | | |
990 | changeset | root | treemanifests | filelogs |
1012 | changeset | root | treemanifests | filelogs |
991 | | manifest | | |
1013 | | manifest | | |
992 | | | | |
1014 | | | | |
993 +-------------------------------------------------+
1015 +-------------------------------------------------+
994
1016
995 The principle building block of each segment is a *chunk*. A *chunk* is a
1017 The principle building block of each segment is a *chunk*. A *chunk* is a
996 framed piece of data:
1018 framed piece of data:
997
1019
998 +---------------------------------------+
1020 +---------------------------------------+
999 | | |
1021 | | |
1000 | length | data |
1022 | length | data |
1001 | (4 bytes) | (<length - 4> bytes) |
1023 | (4 bytes) | (<length - 4> bytes) |
1002 | | |
1024 | | |
1003 +---------------------------------------+
1025 +---------------------------------------+
1004
1026
1005 All integers are big-endian signed integers. Each chunk starts with a
1027 All integers are big-endian signed integers. Each chunk starts with a
1006 32-bit integer indicating the length of the entire chunk (including the
1028 32-bit integer indicating the length of the entire chunk (including the
1007 length field itself).
1029 length field itself).
1008
1030
1009 There is a special case chunk that has a value of 0 for the length
1031 There is a special case chunk that has a value of 0 for the length
1010 ("0x00000000"). We call this an *empty chunk*.
1032 ("0x00000000"). We call this an *empty chunk*.
1011
1033
1012 Delta Groups
1034 Delta Groups
1013 ============
1035 ============
1014
1036
1015 A *delta group* expresses the content of a revlog as a series of deltas,
1037 A *delta group* expresses the content of a revlog as a series of deltas,
1016 or patches against previous revisions.
1038 or patches against previous revisions.
1017
1039
1018 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
1040 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
1019 to signal the end of the delta group:
1041 to signal the end of the delta group:
1020
1042
1021 +------------------------------------------------------------------------+
1043 +------------------------------------------------------------------------+
1022 | | | | | |
1044 | | | | | |
1023 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
1045 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
1024 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
1046 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
1025 | | | | | |
1047 | | | | | |
1026 +------------------------------------------------------------------------+
1048 +------------------------------------------------------------------------+
1027
1049
1028 Each *chunk*'s data consists of the following:
1050 Each *chunk*'s data consists of the following:
1029
1051
1030 +---------------------------------------+
1052 +---------------------------------------+
1031 | | |
1053 | | |
1032 | delta header | delta data |
1054 | delta header | delta data |
1033 | (various by version) | (various) |
1055 | (various by version) | (various) |
1034 | | |
1056 | | |
1035 +---------------------------------------+
1057 +---------------------------------------+
1036
1058
1037 The *delta data* is a series of *delta*s that describe a diff from an
1059 The *delta data* is a series of *delta*s that describe a diff from an
1038 existing entry (either that the recipient already has, or previously
1060 existing entry (either that the recipient already has, or previously
1039 specified in the bundle/changegroup).
1061 specified in the bundle/changegroup).
1040
1062
1041 The *delta header* is different between versions "1", "2", and "3" of the
1063 The *delta header* is different between versions "1", "2", and "3" of the
1042 changegroup format.
1064 changegroup format.
1043
1065
1044 Version 1 (headerlen=80):
1066 Version 1 (headerlen=80):
1045
1067
1046 +------------------------------------------------------+
1068 +------------------------------------------------------+
1047 | | | | |
1069 | | | | |
1048 | node | p1 node | p2 node | link node |
1070 | node | p1 node | p2 node | link node |
1049 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1071 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1050 | | | | |
1072 | | | | |
1051 +------------------------------------------------------+
1073 +------------------------------------------------------+
1052
1074
1053 Version 2 (headerlen=100):
1075 Version 2 (headerlen=100):
1054
1076
1055 +------------------------------------------------------------------+
1077 +------------------------------------------------------------------+
1056 | | | | | |
1078 | | | | | |
1057 | node | p1 node | p2 node | base node | link node |
1079 | node | p1 node | p2 node | base node | link node |
1058 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1080 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1059 | | | | | |
1081 | | | | | |
1060 +------------------------------------------------------------------+
1082 +------------------------------------------------------------------+
1061
1083
1062 Version 3 (headerlen=102):
1084 Version 3 (headerlen=102):
1063
1085
1064 +------------------------------------------------------------------------------+
1086 +------------------------------------------------------------------------------+
1065 | | | | | | |
1087 | | | | | | |
1066 | node | p1 node | p2 node | base node | link node | flags |
1088 | node | p1 node | p2 node | base node | link node | flags |
1067 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
1089 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
1068 | | | | | | |
1090 | | | | | | |
1069 +------------------------------------------------------------------------------+
1091 +------------------------------------------------------------------------------+
1070
1092
1071 The *delta data* consists of "chunklen - 4 - headerlen" bytes, which
1093 The *delta data* consists of "chunklen - 4 - headerlen" bytes, which
1072 contain a series of *delta*s, densely packed (no separators). These deltas
1094 contain a series of *delta*s, densely packed (no separators). These deltas
1073 describe a diff from an existing entry (either that the recipient already
1095 describe a diff from an existing entry (either that the recipient already
1074 has, or previously specified in the bundle/changegroup). The format is
1096 has, or previously specified in the bundle/changegroup). The format is
1075 described more fully in "hg help internals.bdiff", but briefly:
1097 described more fully in "hg help internals.bdiff", but briefly:
1076
1098
1077 +---------------------------------------------------------------+
1099 +---------------------------------------------------------------+
1078 | | | | |
1100 | | | | |
1079 | start offset | end offset | new length | content |
1101 | start offset | end offset | new length | content |
1080 | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) |
1102 | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) |
1081 | | | | |
1103 | | | | |
1082 +---------------------------------------------------------------+
1104 +---------------------------------------------------------------+
1083
1105
1084 Please note that the length field in the delta data does *not* include
1106 Please note that the length field in the delta data does *not* include
1085 itself.
1107 itself.
1086
1108
1087 In version 1, the delta is always applied against the previous node from
1109 In version 1, the delta is always applied against the previous node from
1088 the changegroup or the first parent if this is the first entry in the
1110 the changegroup or the first parent if this is the first entry in the
1089 changegroup.
1111 changegroup.
1090
1112
1091 In version 2 and up, the delta base node is encoded in the entry in the
1113 In version 2 and up, the delta base node is encoded in the entry in the
1092 changegroup. This allows the delta to be expressed against any parent,
1114 changegroup. This allows the delta to be expressed against any parent,
1093 which can result in smaller deltas and more efficient encoding of data.
1115 which can result in smaller deltas and more efficient encoding of data.
1094
1116
1095 Changeset Segment
1117 Changeset Segment
1096 =================
1118 =================
1097
1119
1098 The *changeset segment* consists of a single *delta group* holding
1120 The *changeset segment* consists of a single *delta group* holding
1099 changelog data. The *empty chunk* at the end of the *delta group* denotes
1121 changelog data. The *empty chunk* at the end of the *delta group* denotes
1100 the boundary to the *manifest segment*.
1122 the boundary to the *manifest segment*.
1101
1123
1102 Manifest Segment
1124 Manifest Segment
1103 ================
1125 ================
1104
1126
1105 The *manifest segment* consists of a single *delta group* holding manifest
1127 The *manifest segment* consists of a single *delta group* holding manifest
1106 data. If treemanifests are in use, it contains only the manifest for the
1128 data. If treemanifests are in use, it contains only the manifest for the
1107 root directory of the repository. Otherwise, it contains the entire
1129 root directory of the repository. Otherwise, it contains the entire
1108 manifest data. The *empty chunk* at the end of the *delta group* denotes
1130 manifest data. The *empty chunk* at the end of the *delta group* denotes
1109 the boundary to the next segment (either the *treemanifests segment* or
1131 the boundary to the next segment (either the *treemanifests segment* or
1110 the *filelogs segment*, depending on version and the request options).
1132 the *filelogs segment*, depending on version and the request options).
1111
1133
1112 Treemanifests Segment
1134 Treemanifests Segment
1113 ---------------------
1135 ---------------------
1114
1136
1115 The *treemanifests segment* only exists in changegroup version "3", and
1137 The *treemanifests segment* only exists in changegroup version "3", and
1116 only if the 'treemanifest' param is part of the bundle2 changegroup part
1138 only if the 'treemanifest' param is part of the bundle2 changegroup part
1117 (it is not possible to use changegroup version 3 outside of bundle2).
1139 (it is not possible to use changegroup version 3 outside of bundle2).
1118 Aside from the filenames in the *treemanifests segment* containing a
1140 Aside from the filenames in the *treemanifests segment* containing a
1119 trailing "/" character, it behaves identically to the *filelogs segment*
1141 trailing "/" character, it behaves identically to the *filelogs segment*
1120 (see below). The final sub-segment is followed by an *empty chunk*
1142 (see below). The final sub-segment is followed by an *empty chunk*
1121 (logically, a sub-segment with filename size 0). This denotes the boundary
1143 (logically, a sub-segment with filename size 0). This denotes the boundary
1122 to the *filelogs segment*.
1144 to the *filelogs segment*.
1123
1145
1124 Filelogs Segment
1146 Filelogs Segment
1125 ================
1147 ================
1126
1148
1127 The *filelogs segment* consists of multiple sub-segments, each
1149 The *filelogs segment* consists of multiple sub-segments, each
1128 corresponding to an individual file whose data is being described:
1150 corresponding to an individual file whose data is being described:
1129
1151
1130 +--------------------------------------------------+
1152 +--------------------------------------------------+
1131 | | | | | |
1153 | | | | | |
1132 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
1154 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
1133 | | | | | (4 bytes) |
1155 | | | | | (4 bytes) |
1134 | | | | | |
1156 | | | | | |
1135 +--------------------------------------------------+
1157 +--------------------------------------------------+
1136
1158
1137 The final filelog sub-segment is followed by an *empty chunk* (logically,
1159 The final filelog sub-segment is followed by an *empty chunk* (logically,
1138 a sub-segment with filename size 0). This denotes the end of the segment
1160 a sub-segment with filename size 0). This denotes the end of the segment
1139 and of the overall changegroup.
1161 and of the overall changegroup.
1140
1162
1141 Each filelog sub-segment consists of the following:
1163 Each filelog sub-segment consists of the following:
1142
1164
1143 +------------------------------------------------------+
1165 +------------------------------------------------------+
1144 | | | |
1166 | | | |
1145 | filename length | filename | delta group |
1167 | filename length | filename | delta group |
1146 | (4 bytes) | (<length - 4> bytes) | (various) |
1168 | (4 bytes) | (<length - 4> bytes) | (various) |
1147 | | | |
1169 | | | |
1148 +------------------------------------------------------+
1170 +------------------------------------------------------+
1149
1171
1150 That is, a *chunk* consisting of the filename (not terminated or padded)
1172 That is, a *chunk* consisting of the filename (not terminated or padded)
1151 followed by N chunks constituting the *delta group* for this file. The
1173 followed by N chunks constituting the *delta group* for this file. The
1152 *empty chunk* at the end of each *delta group* denotes the boundary to the
1174 *empty chunk* at the end of each *delta group* denotes the boundary to the
1153 next filelog sub-segment.
1175 next filelog sub-segment.
1154
1176
1155 Test list of commands with command with no help text
1177 Test list of commands with command with no help text
1156
1178
1157 $ hg help helpext
1179 $ hg help helpext
1158 helpext extension - no help text available
1180 helpext extension - no help text available
1159
1181
1160 list of commands:
1182 list of commands:
1161
1183
1162 nohelp (no help text available)
1184 nohelp (no help text available)
1163
1185
1164 (use 'hg help -v helpext' to show built-in aliases and global options)
1186 (use 'hg help -v helpext' to show built-in aliases and global options)
1165
1187
1166
1188
1167 test advanced, deprecated and experimental options are hidden in command help
1189 test advanced, deprecated and experimental options are hidden in command help
1168 $ hg help debugoptADV
1190 $ hg help debugoptADV
1169 hg debugoptADV
1191 hg debugoptADV
1170
1192
1171 (no help text available)
1193 (no help text available)
1172
1194
1173 options:
1195 options:
1174
1196
1175 (some details hidden, use --verbose to show complete help)
1197 (some details hidden, use --verbose to show complete help)
1176 $ hg help debugoptDEP
1198 $ hg help debugoptDEP
1177 hg debugoptDEP
1199 hg debugoptDEP
1178
1200
1179 (no help text available)
1201 (no help text available)
1180
1202
1181 options:
1203 options:
1182
1204
1183 (some details hidden, use --verbose to show complete help)
1205 (some details hidden, use --verbose to show complete help)
1184
1206
1185 $ hg help debugoptEXP
1207 $ hg help debugoptEXP
1186 hg debugoptEXP
1208 hg debugoptEXP
1187
1209
1188 (no help text available)
1210 (no help text available)
1189
1211
1190 options:
1212 options:
1191
1213
1192 (some details hidden, use --verbose to show complete help)
1214 (some details hidden, use --verbose to show complete help)
1193
1215
1194 test advanced, deprecated and experimental options are shown with -v
1216 test advanced, deprecated and experimental options are shown with -v
1195 $ hg help -v debugoptADV | grep aopt
1217 $ hg help -v debugoptADV | grep aopt
1196 --aopt option is (ADVANCED)
1218 --aopt option is (ADVANCED)
1197 $ hg help -v debugoptDEP | grep dopt
1219 $ hg help -v debugoptDEP | grep dopt
1198 --dopt option is (DEPRECATED)
1220 --dopt option is (DEPRECATED)
1199 $ hg help -v debugoptEXP | grep eopt
1221 $ hg help -v debugoptEXP | grep eopt
1200 --eopt option is (EXPERIMENTAL)
1222 --eopt option is (EXPERIMENTAL)
1201
1223
1202 #if gettext
1224 #if gettext
1203 test deprecated option is hidden with translation with untranslated description
1225 test deprecated option is hidden with translation with untranslated description
1204 (use many globy for not failing on changed transaction)
1226 (use many globy for not failing on changed transaction)
1205 $ LANGUAGE=sv hg help debugoptDEP
1227 $ LANGUAGE=sv hg help debugoptDEP
1206 hg debugoptDEP
1228 hg debugoptDEP
1207
1229
1208 (*) (glob)
1230 (*) (glob)
1209
1231
1210 options:
1232 options:
1211
1233
1212 (some details hidden, use --verbose to show complete help)
1234 (some details hidden, use --verbose to show complete help)
1213 #endif
1235 #endif
1214
1236
1215 Test commands that collide with topics (issue4240)
1237 Test commands that collide with topics (issue4240)
1216
1238
1217 $ hg config -hq
1239 $ hg config -hq
1218 hg config [-u] [NAME]...
1240 hg config [-u] [NAME]...
1219
1241
1220 show combined config settings from all hgrc files
1242 show combined config settings from all hgrc files
1221 $ hg showconfig -hq
1243 $ hg showconfig -hq
1222 hg config [-u] [NAME]...
1244 hg config [-u] [NAME]...
1223
1245
1224 show combined config settings from all hgrc files
1246 show combined config settings from all hgrc files
1225
1247
1226 Test a help topic
1248 Test a help topic
1227
1249
1228 $ hg help dates
1250 $ hg help dates
1229 Date Formats
1251 Date Formats
1230 """"""""""""
1252 """"""""""""
1231
1253
1232 Some commands allow the user to specify a date, e.g.:
1254 Some commands allow the user to specify a date, e.g.:
1233
1255
1234 - backout, commit, import, tag: Specify the commit date.
1256 - backout, commit, import, tag: Specify the commit date.
1235 - log, revert, update: Select revision(s) by date.
1257 - log, revert, update: Select revision(s) by date.
1236
1258
1237 Many date formats are valid. Here are some examples:
1259 Many date formats are valid. Here are some examples:
1238
1260
1239 - "Wed Dec 6 13:18:29 2006" (local timezone assumed)
1261 - "Wed Dec 6 13:18:29 2006" (local timezone assumed)
1240 - "Dec 6 13:18 -0600" (year assumed, time offset provided)
1262 - "Dec 6 13:18 -0600" (year assumed, time offset provided)
1241 - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
1263 - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
1242 - "Dec 6" (midnight)
1264 - "Dec 6" (midnight)
1243 - "13:18" (today assumed)
1265 - "13:18" (today assumed)
1244 - "3:39" (3:39AM assumed)
1266 - "3:39" (3:39AM assumed)
1245 - "3:39pm" (15:39)
1267 - "3:39pm" (15:39)
1246 - "2006-12-06 13:18:29" (ISO 8601 format)
1268 - "2006-12-06 13:18:29" (ISO 8601 format)
1247 - "2006-12-6 13:18"
1269 - "2006-12-6 13:18"
1248 - "2006-12-6"
1270 - "2006-12-6"
1249 - "12-6"
1271 - "12-6"
1250 - "12/6"
1272 - "12/6"
1251 - "12/6/6" (Dec 6 2006)
1273 - "12/6/6" (Dec 6 2006)
1252 - "today" (midnight)
1274 - "today" (midnight)
1253 - "yesterday" (midnight)
1275 - "yesterday" (midnight)
1254 - "now" - right now
1276 - "now" - right now
1255
1277
1256 Lastly, there is Mercurial's internal format:
1278 Lastly, there is Mercurial's internal format:
1257
1279
1258 - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
1280 - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
1259
1281
1260 This is the internal representation format for dates. The first number is
1282 This is the internal representation format for dates. The first number is
1261 the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
1283 the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
1262 is the offset of the local timezone, in seconds west of UTC (negative if
1284 is the offset of the local timezone, in seconds west of UTC (negative if
1263 the timezone is east of UTC).
1285 the timezone is east of UTC).
1264
1286
1265 The log command also accepts date ranges:
1287 The log command also accepts date ranges:
1266
1288
1267 - "<DATE" - at or before a given date/time
1289 - "<DATE" - at or before a given date/time
1268 - ">DATE" - on or after a given date/time
1290 - ">DATE" - on or after a given date/time
1269 - "DATE to DATE" - a date range, inclusive
1291 - "DATE to DATE" - a date range, inclusive
1270 - "-DAYS" - within a given number of days of today
1292 - "-DAYS" - within a given number of days of today
1271
1293
1272 Test repeated config section name
1294 Test repeated config section name
1273
1295
1274 $ hg help config.host
1296 $ hg help config.host
1275 "http_proxy.host"
1297 "http_proxy.host"
1276 Host name and (optional) port of the proxy server, for example
1298 Host name and (optional) port of the proxy server, for example
1277 "myproxy:8000".
1299 "myproxy:8000".
1278
1300
1279 "smtp.host"
1301 "smtp.host"
1280 Host name of mail server, e.g. "mail.example.com".
1302 Host name of mail server, e.g. "mail.example.com".
1281
1303
1282 Unrelated trailing paragraphs shouldn't be included
1304 Unrelated trailing paragraphs shouldn't be included
1283
1305
1284 $ hg help config.extramsg | grep '^$'
1306 $ hg help config.extramsg | grep '^$'
1285
1307
1286
1308
1287 Test capitalized section name
1309 Test capitalized section name
1288
1310
1289 $ hg help scripting.HGPLAIN > /dev/null
1311 $ hg help scripting.HGPLAIN > /dev/null
1290
1312
1291 Help subsection:
1313 Help subsection:
1292
1314
1293 $ hg help config.charsets |grep "Email example:" > /dev/null
1315 $ hg help config.charsets |grep "Email example:" > /dev/null
1294 [1]
1316 [1]
1295
1317
1296 Show nested definitions
1318 Show nested definitions
1297 ("profiling.type"[break]"ls"[break]"stat"[break])
1319 ("profiling.type"[break]"ls"[break]"stat"[break])
1298
1320
1299 $ hg help config.type | egrep '^$'|wc -l
1321 $ hg help config.type | egrep '^$'|wc -l
1300 \s*3 (re)
1322 \s*3 (re)
1301
1323
1302 Separate sections from subsections
1324 Separate sections from subsections
1303
1325
1304 $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq
1326 $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq
1305 "format"
1327 "format"
1306 --------
1328 --------
1307
1329
1308 "usegeneraldelta"
1330 "usegeneraldelta"
1309
1331
1310 "dotencode"
1332 "dotencode"
1311
1333
1312 "usefncache"
1334 "usefncache"
1313
1335
1314 "usestore"
1336 "usestore"
1315
1337
1316 "profiling"
1338 "profiling"
1317 -----------
1339 -----------
1318
1340
1319 "format"
1341 "format"
1320
1342
1321 "progress"
1343 "progress"
1322 ----------
1344 ----------
1323
1345
1324 "format"
1346 "format"
1325
1347
1326
1348
1327 Last item in help config.*:
1349 Last item in help config.*:
1328
1350
1329 $ hg help config.`hg help config|grep '^ "'| \
1351 $ hg help config.`hg help config|grep '^ "'| \
1330 > tail -1|sed 's![ "]*!!g'`| \
1352 > tail -1|sed 's![ "]*!!g'`| \
1331 > grep 'hg help -c config' > /dev/null
1353 > grep 'hg help -c config' > /dev/null
1332 [1]
1354 [1]
1333
1355
1334 note to use help -c for general hg help config:
1356 note to use help -c for general hg help config:
1335
1357
1336 $ hg help config |grep 'hg help -c config' > /dev/null
1358 $ hg help config |grep 'hg help -c config' > /dev/null
1337
1359
1338 Test templating help
1360 Test templating help
1339
1361
1340 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1362 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1341 desc String. The text of the changeset description.
1363 desc String. The text of the changeset description.
1342 diffstat String. Statistics of changes with the following format:
1364 diffstat String. Statistics of changes with the following format:
1343 firstline Any text. Returns the first line of text.
1365 firstline Any text. Returns the first line of text.
1344 nonempty Any text. Returns '(none)' if the string is empty.
1366 nonempty Any text. Returns '(none)' if the string is empty.
1345
1367
1346 Test deprecated items
1368 Test deprecated items
1347
1369
1348 $ hg help -v templating | grep currentbookmark
1370 $ hg help -v templating | grep currentbookmark
1349 currentbookmark
1371 currentbookmark
1350 $ hg help templating | (grep currentbookmark || true)
1372 $ hg help templating | (grep currentbookmark || true)
1351
1373
1352 Test help hooks
1374 Test help hooks
1353
1375
1354 $ cat > helphook1.py <<EOF
1376 $ cat > helphook1.py <<EOF
1355 > from mercurial import help
1377 > from mercurial import help
1356 >
1378 >
1357 > def rewrite(ui, topic, doc):
1379 > def rewrite(ui, topic, doc):
1358 > return doc + '\nhelphook1\n'
1380 > return doc + '\nhelphook1\n'
1359 >
1381 >
1360 > def extsetup(ui):
1382 > def extsetup(ui):
1361 > help.addtopichook('revisions', rewrite)
1383 > help.addtopichook('revisions', rewrite)
1362 > EOF
1384 > EOF
1363 $ cat > helphook2.py <<EOF
1385 $ cat > helphook2.py <<EOF
1364 > from mercurial import help
1386 > from mercurial import help
1365 >
1387 >
1366 > def rewrite(ui, topic, doc):
1388 > def rewrite(ui, topic, doc):
1367 > return doc + '\nhelphook2\n'
1389 > return doc + '\nhelphook2\n'
1368 >
1390 >
1369 > def extsetup(ui):
1391 > def extsetup(ui):
1370 > help.addtopichook('revisions', rewrite)
1392 > help.addtopichook('revisions', rewrite)
1371 > EOF
1393 > EOF
1372 $ echo '[extensions]' >> $HGRCPATH
1394 $ echo '[extensions]' >> $HGRCPATH
1373 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1395 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1374 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1396 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1375 $ hg help revsets | grep helphook
1397 $ hg help revsets | grep helphook
1376 helphook1
1398 helphook1
1377 helphook2
1399 helphook2
1378
1400
1379 help -c should only show debug --debug
1401 help -c should only show debug --debug
1380
1402
1381 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1403 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1382 [1]
1404 [1]
1383
1405
1384 help -c should only show deprecated for -v
1406 help -c should only show deprecated for -v
1385
1407
1386 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1408 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1387 [1]
1409 [1]
1388
1410
1389 Test -s / --system
1411 Test -s / --system
1390
1412
1391 $ hg help config.files -s windows |grep 'etc/mercurial' | \
1413 $ hg help config.files -s windows |grep 'etc/mercurial' | \
1392 > wc -l | sed -e 's/ //g'
1414 > wc -l | sed -e 's/ //g'
1393 0
1415 0
1394 $ hg help config.files --system unix | grep 'USER' | \
1416 $ hg help config.files --system unix | grep 'USER' | \
1395 > wc -l | sed -e 's/ //g'
1417 > wc -l | sed -e 's/ //g'
1396 0
1418 0
1397
1419
1398 Test -e / -c / -k combinations
1420 Test -e / -c / -k combinations
1399
1421
1400 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1422 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1401 Commands:
1423 Commands:
1402 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1424 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1403 Extensions:
1425 Extensions:
1404 $ hg help -k|egrep '^[A-Z].*:|^ debug'
1426 $ hg help -k|egrep '^[A-Z].*:|^ debug'
1405 Topics:
1427 Topics:
1406 Commands:
1428 Commands:
1407 Extensions:
1429 Extensions:
1408 Extension Commands:
1430 Extension Commands:
1409 $ hg help -c schemes
1431 $ hg help -c schemes
1410 abort: no such help topic: schemes
1432 abort: no such help topic: schemes
1411 (try 'hg help --keyword schemes')
1433 (try 'hg help --keyword schemes')
1412 [255]
1434 [255]
1413 $ hg help -e schemes |head -1
1435 $ hg help -e schemes |head -1
1414 schemes extension - extend schemes with shortcuts to repository swarms
1436 schemes extension - extend schemes with shortcuts to repository swarms
1415 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1437 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1416 Commands:
1438 Commands:
1417 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1439 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1418 Extensions:
1440 Extensions:
1419 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1441 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1420 Extensions:
1442 Extensions:
1421 Commands:
1443 Commands:
1422 $ hg help -c commit > /dev/null
1444 $ hg help -c commit > /dev/null
1423 $ hg help -e -c commit > /dev/null
1445 $ hg help -e -c commit > /dev/null
1424 $ hg help -e commit > /dev/null
1446 $ hg help -e commit > /dev/null
1425 abort: no such help topic: commit
1447 abort: no such help topic: commit
1426 (try 'hg help --keyword commit')
1448 (try 'hg help --keyword commit')
1427 [255]
1449 [255]
1428
1450
1429 Test keyword search help
1451 Test keyword search help
1430
1452
1431 $ cat > prefixedname.py <<EOF
1453 $ cat > prefixedname.py <<EOF
1432 > '''matched against word "clone"
1454 > '''matched against word "clone"
1433 > '''
1455 > '''
1434 > EOF
1456 > EOF
1435 $ echo '[extensions]' >> $HGRCPATH
1457 $ echo '[extensions]' >> $HGRCPATH
1436 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1458 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1437 $ hg help -k clone
1459 $ hg help -k clone
1438 Topics:
1460 Topics:
1439
1461
1440 config Configuration Files
1462 config Configuration Files
1441 extensions Using Additional Features
1463 extensions Using Additional Features
1442 glossary Glossary
1464 glossary Glossary
1443 phases Working with Phases
1465 phases Working with Phases
1444 subrepos Subrepositories
1466 subrepos Subrepositories
1445 urls URL Paths
1467 urls URL Paths
1446
1468
1447 Commands:
1469 Commands:
1448
1470
1449 bookmarks create a new bookmark or list existing bookmarks
1471 bookmarks create a new bookmark or list existing bookmarks
1450 clone make a copy of an existing repository
1472 clone make a copy of an existing repository
1451 paths show aliases for remote repositories
1473 paths show aliases for remote repositories
1452 update update working directory (or switch revisions)
1474 update update working directory (or switch revisions)
1453
1475
1454 Extensions:
1476 Extensions:
1455
1477
1456 clonebundles advertise pre-generated bundles to seed clones
1478 clonebundles advertise pre-generated bundles to seed clones
1457 prefixedname matched against word "clone"
1479 prefixedname matched against word "clone"
1458 relink recreates hardlinks between repository clones
1480 relink recreates hardlinks between repository clones
1459
1481
1460 Extension Commands:
1482 Extension Commands:
1461
1483
1462 qclone clone main and patch repository at same time
1484 qclone clone main and patch repository at same time
1463
1485
1464 Test unfound topic
1486 Test unfound topic
1465
1487
1466 $ hg help nonexistingtopicthatwillneverexisteverever
1488 $ hg help nonexistingtopicthatwillneverexisteverever
1467 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1489 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1468 (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
1490 (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
1469 [255]
1491 [255]
1470
1492
1471 Test unfound keyword
1493 Test unfound keyword
1472
1494
1473 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1495 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1474 abort: no matches
1496 abort: no matches
1475 (try 'hg help' for a list of topics)
1497 (try 'hg help' for a list of topics)
1476 [255]
1498 [255]
1477
1499
1478 Test omit indicating for help
1500 Test omit indicating for help
1479
1501
1480 $ cat > addverboseitems.py <<EOF
1502 $ cat > addverboseitems.py <<EOF
1481 > '''extension to test omit indicating.
1503 > '''extension to test omit indicating.
1482 >
1504 >
1483 > This paragraph is never omitted (for extension)
1505 > This paragraph is never omitted (for extension)
1484 >
1506 >
1485 > .. container:: verbose
1507 > .. container:: verbose
1486 >
1508 >
1487 > This paragraph is omitted,
1509 > This paragraph is omitted,
1488 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1510 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1489 >
1511 >
1490 > This paragraph is never omitted, too (for extension)
1512 > This paragraph is never omitted, too (for extension)
1491 > '''
1513 > '''
1492 >
1514 >
1493 > from mercurial import help, commands
1515 > from mercurial import help, commands
1494 > testtopic = """This paragraph is never omitted (for topic).
1516 > testtopic = """This paragraph is never omitted (for topic).
1495 >
1517 >
1496 > .. container:: verbose
1518 > .. container:: verbose
1497 >
1519 >
1498 > This paragraph is omitted,
1520 > This paragraph is omitted,
1499 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1521 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1500 >
1522 >
1501 > This paragraph is never omitted, too (for topic)
1523 > This paragraph is never omitted, too (for topic)
1502 > """
1524 > """
1503 > def extsetup(ui):
1525 > def extsetup(ui):
1504 > help.helptable.append((["topic-containing-verbose"],
1526 > help.helptable.append((["topic-containing-verbose"],
1505 > "This is the topic to test omit indicating.",
1527 > "This is the topic to test omit indicating.",
1506 > lambda ui: testtopic))
1528 > lambda ui: testtopic))
1507 > EOF
1529 > EOF
1508 $ echo '[extensions]' >> $HGRCPATH
1530 $ echo '[extensions]' >> $HGRCPATH
1509 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1531 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1510 $ hg help addverboseitems
1532 $ hg help addverboseitems
1511 addverboseitems extension - extension to test omit indicating.
1533 addverboseitems extension - extension to test omit indicating.
1512
1534
1513 This paragraph is never omitted (for extension)
1535 This paragraph is never omitted (for extension)
1514
1536
1515 This paragraph is never omitted, too (for extension)
1537 This paragraph is never omitted, too (for extension)
1516
1538
1517 (some details hidden, use --verbose to show complete help)
1539 (some details hidden, use --verbose to show complete help)
1518
1540
1519 no commands defined
1541 no commands defined
1520 $ hg help -v addverboseitems
1542 $ hg help -v addverboseitems
1521 addverboseitems extension - extension to test omit indicating.
1543 addverboseitems extension - extension to test omit indicating.
1522
1544
1523 This paragraph is never omitted (for extension)
1545 This paragraph is never omitted (for extension)
1524
1546
1525 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1547 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1526 extension)
1548 extension)
1527
1549
1528 This paragraph is never omitted, too (for extension)
1550 This paragraph is never omitted, too (for extension)
1529
1551
1530 no commands defined
1552 no commands defined
1531 $ hg help topic-containing-verbose
1553 $ hg help topic-containing-verbose
1532 This is the topic to test omit indicating.
1554 This is the topic to test omit indicating.
1533 """"""""""""""""""""""""""""""""""""""""""
1555 """"""""""""""""""""""""""""""""""""""""""
1534
1556
1535 This paragraph is never omitted (for topic).
1557 This paragraph is never omitted (for topic).
1536
1558
1537 This paragraph is never omitted, too (for topic)
1559 This paragraph is never omitted, too (for topic)
1538
1560
1539 (some details hidden, use --verbose to show complete help)
1561 (some details hidden, use --verbose to show complete help)
1540 $ hg help -v topic-containing-verbose
1562 $ hg help -v topic-containing-verbose
1541 This is the topic to test omit indicating.
1563 This is the topic to test omit indicating.
1542 """"""""""""""""""""""""""""""""""""""""""
1564 """"""""""""""""""""""""""""""""""""""""""
1543
1565
1544 This paragraph is never omitted (for topic).
1566 This paragraph is never omitted (for topic).
1545
1567
1546 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1568 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1547 topic)
1569 topic)
1548
1570
1549 This paragraph is never omitted, too (for topic)
1571 This paragraph is never omitted, too (for topic)
1550
1572
1551 Test section lookup
1573 Test section lookup
1552
1574
1553 $ hg help revset.merge
1575 $ hg help revset.merge
1554 "merge()"
1576 "merge()"
1555 Changeset is a merge changeset.
1577 Changeset is a merge changeset.
1556
1578
1557 $ hg help glossary.dag
1579 $ hg help glossary.dag
1558 DAG
1580 DAG
1559 The repository of changesets of a distributed version control system
1581 The repository of changesets of a distributed version control system
1560 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1582 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1561 of nodes and edges, where nodes correspond to changesets and edges
1583 of nodes and edges, where nodes correspond to changesets and edges
1562 imply a parent -> child relation. This graph can be visualized by
1584 imply a parent -> child relation. This graph can be visualized by
1563 graphical tools such as 'hg log --graph'. In Mercurial, the DAG is
1585 graphical tools such as 'hg log --graph'. In Mercurial, the DAG is
1564 limited by the requirement for children to have at most two parents.
1586 limited by the requirement for children to have at most two parents.
1565
1587
1566
1588
1567 $ hg help hgrc.paths
1589 $ hg help hgrc.paths
1568 "paths"
1590 "paths"
1569 -------
1591 -------
1570
1592
1571 Assigns symbolic names and behavior to repositories.
1593 Assigns symbolic names and behavior to repositories.
1572
1594
1573 Options are symbolic names defining the URL or directory that is the
1595 Options are symbolic names defining the URL or directory that is the
1574 location of the repository. Example:
1596 location of the repository. Example:
1575
1597
1576 [paths]
1598 [paths]
1577 my_server = https://example.com/my_repo
1599 my_server = https://example.com/my_repo
1578 local_path = /home/me/repo
1600 local_path = /home/me/repo
1579
1601
1580 These symbolic names can be used from the command line. To pull from
1602 These symbolic names can be used from the command line. To pull from
1581 "my_server": 'hg pull my_server'. To push to "local_path": 'hg push
1603 "my_server": 'hg pull my_server'. To push to "local_path": 'hg push
1582 local_path'.
1604 local_path'.
1583
1605
1584 Options containing colons (":") denote sub-options that can influence
1606 Options containing colons (":") denote sub-options that can influence
1585 behavior for that specific path. Example:
1607 behavior for that specific path. Example:
1586
1608
1587 [paths]
1609 [paths]
1588 my_server = https://example.com/my_path
1610 my_server = https://example.com/my_path
1589 my_server:pushurl = ssh://example.com/my_path
1611 my_server:pushurl = ssh://example.com/my_path
1590
1612
1591 The following sub-options can be defined:
1613 The following sub-options can be defined:
1592
1614
1593 "pushurl"
1615 "pushurl"
1594 The URL to use for push operations. If not defined, the location
1616 The URL to use for push operations. If not defined, the location
1595 defined by the path's main entry is used.
1617 defined by the path's main entry is used.
1596
1618
1597 "pushrev"
1619 "pushrev"
1598 A revset defining which revisions to push by default.
1620 A revset defining which revisions to push by default.
1599
1621
1600 When 'hg push' is executed without a "-r" argument, the revset defined
1622 When 'hg push' is executed without a "-r" argument, the revset defined
1601 by this sub-option is evaluated to determine what to push.
1623 by this sub-option is evaluated to determine what to push.
1602
1624
1603 For example, a value of "." will push the working directory's revision
1625 For example, a value of "." will push the working directory's revision
1604 by default.
1626 by default.
1605
1627
1606 Revsets specifying bookmarks will not result in the bookmark being
1628 Revsets specifying bookmarks will not result in the bookmark being
1607 pushed.
1629 pushed.
1608
1630
1609 The following special named paths exist:
1631 The following special named paths exist:
1610
1632
1611 "default"
1633 "default"
1612 The URL or directory to use when no source or remote is specified.
1634 The URL or directory to use when no source or remote is specified.
1613
1635
1614 'hg clone' will automatically define this path to the location the
1636 'hg clone' will automatically define this path to the location the
1615 repository was cloned from.
1637 repository was cloned from.
1616
1638
1617 "default-push"
1639 "default-push"
1618 (deprecated) The URL or directory for the default 'hg push' location.
1640 (deprecated) The URL or directory for the default 'hg push' location.
1619 "default:pushurl" should be used instead.
1641 "default:pushurl" should be used instead.
1620
1642
1621 $ hg help glossary.mcguffin
1643 $ hg help glossary.mcguffin
1622 abort: help section not found: glossary.mcguffin
1644 abort: help section not found: glossary.mcguffin
1623 [255]
1645 [255]
1624
1646
1625 $ hg help glossary.mc.guffin
1647 $ hg help glossary.mc.guffin
1626 abort: help section not found: glossary.mc.guffin
1648 abort: help section not found: glossary.mc.guffin
1627 [255]
1649 [255]
1628
1650
1629 $ hg help template.files
1651 $ hg help template.files
1630 files List of strings. All files modified, added, or removed by
1652 files List of strings. All files modified, added, or removed by
1631 this changeset.
1653 this changeset.
1632 files(pattern)
1654 files(pattern)
1633 All files of the current changeset matching the pattern. See
1655 All files of the current changeset matching the pattern. See
1634 'hg help patterns'.
1656 'hg help patterns'.
1635
1657
1636 Test section lookup by translated message
1658 Test section lookup by translated message
1637
1659
1638 str.lower() instead of encoding.lower(str) on translated message might
1660 str.lower() instead of encoding.lower(str) on translated message might
1639 make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z)
1661 make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z)
1640 as the second or later byte of multi-byte character.
1662 as the second or later byte of multi-byte character.
1641
1663
1642 For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932)
1664 For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932)
1643 contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this
1665 contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this
1644 replacement makes message meaningless.
1666 replacement makes message meaningless.
1645
1667
1646 This tests that section lookup by translated string isn't broken by
1668 This tests that section lookup by translated string isn't broken by
1647 such str.lower().
1669 such str.lower().
1648
1670
1649 $ $PYTHON <<EOF
1671 $ $PYTHON <<EOF
1650 > def escape(s):
1672 > def escape(s):
1651 > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932'))
1673 > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932'))
1652 > # translation of "record" in ja_JP.cp932
1674 > # translation of "record" in ja_JP.cp932
1653 > upper = "\x8bL\x98^"
1675 > upper = "\x8bL\x98^"
1654 > # str.lower()-ed section name should be treated as different one
1676 > # str.lower()-ed section name should be treated as different one
1655 > lower = "\x8bl\x98^"
1677 > lower = "\x8bl\x98^"
1656 > with open('ambiguous.py', 'w') as fp:
1678 > with open('ambiguous.py', 'w') as fp:
1657 > fp.write("""# ambiguous section names in ja_JP.cp932
1679 > fp.write("""# ambiguous section names in ja_JP.cp932
1658 > u'''summary of extension
1680 > u'''summary of extension
1659 >
1681 >
1660 > %s
1682 > %s
1661 > ----
1683 > ----
1662 >
1684 >
1663 > Upper name should show only this message
1685 > Upper name should show only this message
1664 >
1686 >
1665 > %s
1687 > %s
1666 > ----
1688 > ----
1667 >
1689 >
1668 > Lower name should show only this message
1690 > Lower name should show only this message
1669 >
1691 >
1670 > subsequent section
1692 > subsequent section
1671 > ------------------
1693 > ------------------
1672 >
1694 >
1673 > This should be hidden at 'hg help ambiguous' with section name.
1695 > This should be hidden at 'hg help ambiguous' with section name.
1674 > '''
1696 > '''
1675 > """ % (escape(upper), escape(lower)))
1697 > """ % (escape(upper), escape(lower)))
1676 > EOF
1698 > EOF
1677
1699
1678 $ cat >> $HGRCPATH <<EOF
1700 $ cat >> $HGRCPATH <<EOF
1679 > [extensions]
1701 > [extensions]
1680 > ambiguous = ./ambiguous.py
1702 > ambiguous = ./ambiguous.py
1681 > EOF
1703 > EOF
1682
1704
1683 $ $PYTHON <<EOF | sh
1705 $ $PYTHON <<EOF | sh
1684 > upper = "\x8bL\x98^"
1706 > upper = "\x8bL\x98^"
1685 > print "hg --encoding cp932 help -e ambiguous.%s" % upper
1707 > print "hg --encoding cp932 help -e ambiguous.%s" % upper
1686 > EOF
1708 > EOF
1687 \x8bL\x98^ (esc)
1709 \x8bL\x98^ (esc)
1688 ----
1710 ----
1689
1711
1690 Upper name should show only this message
1712 Upper name should show only this message
1691
1713
1692
1714
1693 $ $PYTHON <<EOF | sh
1715 $ $PYTHON <<EOF | sh
1694 > lower = "\x8bl\x98^"
1716 > lower = "\x8bl\x98^"
1695 > print "hg --encoding cp932 help -e ambiguous.%s" % lower
1717 > print "hg --encoding cp932 help -e ambiguous.%s" % lower
1696 > EOF
1718 > EOF
1697 \x8bl\x98^ (esc)
1719 \x8bl\x98^ (esc)
1698 ----
1720 ----
1699
1721
1700 Lower name should show only this message
1722 Lower name should show only this message
1701
1723
1702
1724
1703 $ cat >> $HGRCPATH <<EOF
1725 $ cat >> $HGRCPATH <<EOF
1704 > [extensions]
1726 > [extensions]
1705 > ambiguous = !
1727 > ambiguous = !
1706 > EOF
1728 > EOF
1707
1729
1708 Show help content of disabled extensions
1730 Show help content of disabled extensions
1709
1731
1710 $ cat >> $HGRCPATH <<EOF
1732 $ cat >> $HGRCPATH <<EOF
1711 > [extensions]
1733 > [extensions]
1712 > ambiguous = !./ambiguous.py
1734 > ambiguous = !./ambiguous.py
1713 > EOF
1735 > EOF
1714 $ hg help -e ambiguous
1736 $ hg help -e ambiguous
1715 ambiguous extension - (no help text available)
1737 ambiguous extension - (no help text available)
1716
1738
1717 (use 'hg help extensions' for information on enabling extensions)
1739 (use 'hg help extensions' for information on enabling extensions)
1718
1740
1719 Test dynamic list of merge tools only shows up once
1741 Test dynamic list of merge tools only shows up once
1720 $ hg help merge-tools
1742 $ hg help merge-tools
1721 Merge Tools
1743 Merge Tools
1722 """""""""""
1744 """""""""""
1723
1745
1724 To merge files Mercurial uses merge tools.
1746 To merge files Mercurial uses merge tools.
1725
1747
1726 A merge tool combines two different versions of a file into a merged file.
1748 A merge tool combines two different versions of a file into a merged file.
1727 Merge tools are given the two files and the greatest common ancestor of
1749 Merge tools are given the two files and the greatest common ancestor of
1728 the two file versions, so they can determine the changes made on both
1750 the two file versions, so they can determine the changes made on both
1729 branches.
1751 branches.
1730
1752
1731 Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg
1753 Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg
1732 backout' and in several extensions.
1754 backout' and in several extensions.
1733
1755
1734 Usually, the merge tool tries to automatically reconcile the files by
1756 Usually, the merge tool tries to automatically reconcile the files by
1735 combining all non-overlapping changes that occurred separately in the two
1757 combining all non-overlapping changes that occurred separately in the two
1736 different evolutions of the same initial base file. Furthermore, some
1758 different evolutions of the same initial base file. Furthermore, some
1737 interactive merge programs make it easier to manually resolve conflicting
1759 interactive merge programs make it easier to manually resolve conflicting
1738 merges, either in a graphical way, or by inserting some conflict markers.
1760 merges, either in a graphical way, or by inserting some conflict markers.
1739 Mercurial does not include any interactive merge programs but relies on
1761 Mercurial does not include any interactive merge programs but relies on
1740 external tools for that.
1762 external tools for that.
1741
1763
1742 Available merge tools
1764 Available merge tools
1743 =====================
1765 =====================
1744
1766
1745 External merge tools and their properties are configured in the merge-
1767 External merge tools and their properties are configured in the merge-
1746 tools configuration section - see hgrc(5) - but they can often just be
1768 tools configuration section - see hgrc(5) - but they can often just be
1747 named by their executable.
1769 named by their executable.
1748
1770
1749 A merge tool is generally usable if its executable can be found on the
1771 A merge tool is generally usable if its executable can be found on the
1750 system and if it can handle the merge. The executable is found if it is an
1772 system and if it can handle the merge. The executable is found if it is an
1751 absolute or relative executable path or the name of an application in the
1773 absolute or relative executable path or the name of an application in the
1752 executable search path. The tool is assumed to be able to handle the merge
1774 executable search path. The tool is assumed to be able to handle the merge
1753 if it can handle symlinks if the file is a symlink, if it can handle
1775 if it can handle symlinks if the file is a symlink, if it can handle
1754 binary files if the file is binary, and if a GUI is available if the tool
1776 binary files if the file is binary, and if a GUI is available if the tool
1755 requires a GUI.
1777 requires a GUI.
1756
1778
1757 There are some internal merge tools which can be used. The internal merge
1779 There are some internal merge tools which can be used. The internal merge
1758 tools are:
1780 tools are:
1759
1781
1760 ":dump"
1782 ":dump"
1761 Creates three versions of the files to merge, containing the contents of
1783 Creates three versions of the files to merge, containing the contents of
1762 local, other and base. These files can then be used to perform a merge
1784 local, other and base. These files can then be used to perform a merge
1763 manually. If the file to be merged is named "a.txt", these files will
1785 manually. If the file to be merged is named "a.txt", these files will
1764 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1786 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1765 they will be placed in the same directory as "a.txt".
1787 they will be placed in the same directory as "a.txt".
1766
1788
1767 This implies permerge. Therefore, files aren't dumped, if premerge runs
1789 This implies permerge. Therefore, files aren't dumped, if premerge runs
1768 successfully. Use :forcedump to forcibly write files out.
1790 successfully. Use :forcedump to forcibly write files out.
1769
1791
1770 ":fail"
1792 ":fail"
1771 Rather than attempting to merge files that were modified on both
1793 Rather than attempting to merge files that were modified on both
1772 branches, it marks them as unresolved. The resolve command must be used
1794 branches, it marks them as unresolved. The resolve command must be used
1773 to resolve these conflicts.
1795 to resolve these conflicts.
1774
1796
1775 ":forcedump"
1797 ":forcedump"
1776 Creates three versions of the files as same as :dump, but omits
1798 Creates three versions of the files as same as :dump, but omits
1777 premerge.
1799 premerge.
1778
1800
1779 ":local"
1801 ":local"
1780 Uses the local 'p1()' version of files as the merged version.
1802 Uses the local 'p1()' version of files as the merged version.
1781
1803
1782 ":merge"
1804 ":merge"
1783 Uses the internal non-interactive simple merge algorithm for merging
1805 Uses the internal non-interactive simple merge algorithm for merging
1784 files. It will fail if there are any conflicts and leave markers in the
1806 files. It will fail if there are any conflicts and leave markers in the
1785 partially merged file. Markers will have two sections, one for each side
1807 partially merged file. Markers will have two sections, one for each side
1786 of merge.
1808 of merge.
1787
1809
1788 ":merge-local"
1810 ":merge-local"
1789 Like :merge, but resolve all conflicts non-interactively in favor of the
1811 Like :merge, but resolve all conflicts non-interactively in favor of the
1790 local 'p1()' changes.
1812 local 'p1()' changes.
1791
1813
1792 ":merge-other"
1814 ":merge-other"
1793 Like :merge, but resolve all conflicts non-interactively in favor of the
1815 Like :merge, but resolve all conflicts non-interactively in favor of the
1794 other 'p2()' changes.
1816 other 'p2()' changes.
1795
1817
1796 ":merge3"
1818 ":merge3"
1797 Uses the internal non-interactive simple merge algorithm for merging
1819 Uses the internal non-interactive simple merge algorithm for merging
1798 files. It will fail if there are any conflicts and leave markers in the
1820 files. It will fail if there are any conflicts and leave markers in the
1799 partially merged file. Marker will have three sections, one from each
1821 partially merged file. Marker will have three sections, one from each
1800 side of the merge and one for the base content.
1822 side of the merge and one for the base content.
1801
1823
1802 ":other"
1824 ":other"
1803 Uses the other 'p2()' version of files as the merged version.
1825 Uses the other 'p2()' version of files as the merged version.
1804
1826
1805 ":prompt"
1827 ":prompt"
1806 Asks the user which of the local 'p1()' or the other 'p2()' version to
1828 Asks the user which of the local 'p1()' or the other 'p2()' version to
1807 keep as the merged version.
1829 keep as the merged version.
1808
1830
1809 ":tagmerge"
1831 ":tagmerge"
1810 Uses the internal tag merge algorithm (experimental).
1832 Uses the internal tag merge algorithm (experimental).
1811
1833
1812 ":union"
1834 ":union"
1813 Uses the internal non-interactive simple merge algorithm for merging
1835 Uses the internal non-interactive simple merge algorithm for merging
1814 files. It will use both left and right sides for conflict regions. No
1836 files. It will use both left and right sides for conflict regions. No
1815 markers are inserted.
1837 markers are inserted.
1816
1838
1817 Internal tools are always available and do not require a GUI but will by
1839 Internal tools are always available and do not require a GUI but will by
1818 default not handle symlinks or binary files.
1840 default not handle symlinks or binary files.
1819
1841
1820 Choosing a merge tool
1842 Choosing a merge tool
1821 =====================
1843 =====================
1822
1844
1823 Mercurial uses these rules when deciding which merge tool to use:
1845 Mercurial uses these rules when deciding which merge tool to use:
1824
1846
1825 1. If a tool has been specified with the --tool option to merge or
1847 1. If a tool has been specified with the --tool option to merge or
1826 resolve, it is used. If it is the name of a tool in the merge-tools
1848 resolve, it is used. If it is the name of a tool in the merge-tools
1827 configuration, its configuration is used. Otherwise the specified tool
1849 configuration, its configuration is used. Otherwise the specified tool
1828 must be executable by the shell.
1850 must be executable by the shell.
1829 2. If the "HGMERGE" environment variable is present, its value is used and
1851 2. If the "HGMERGE" environment variable is present, its value is used and
1830 must be executable by the shell.
1852 must be executable by the shell.
1831 3. If the filename of the file to be merged matches any of the patterns in
1853 3. If the filename of the file to be merged matches any of the patterns in
1832 the merge-patterns configuration section, the first usable merge tool
1854 the merge-patterns configuration section, the first usable merge tool
1833 corresponding to a matching pattern is used. Here, binary capabilities
1855 corresponding to a matching pattern is used. Here, binary capabilities
1834 of the merge tool are not considered.
1856 of the merge tool are not considered.
1835 4. If ui.merge is set it will be considered next. If the value is not the
1857 4. If ui.merge is set it will be considered next. If the value is not the
1836 name of a configured tool, the specified value is used and must be
1858 name of a configured tool, the specified value is used and must be
1837 executable by the shell. Otherwise the named tool is used if it is
1859 executable by the shell. Otherwise the named tool is used if it is
1838 usable.
1860 usable.
1839 5. If any usable merge tools are present in the merge-tools configuration
1861 5. If any usable merge tools are present in the merge-tools configuration
1840 section, the one with the highest priority is used.
1862 section, the one with the highest priority is used.
1841 6. If a program named "hgmerge" can be found on the system, it is used -
1863 6. If a program named "hgmerge" can be found on the system, it is used -
1842 but it will by default not be used for symlinks and binary files.
1864 but it will by default not be used for symlinks and binary files.
1843 7. If the file to be merged is not binary and is not a symlink, then
1865 7. If the file to be merged is not binary and is not a symlink, then
1844 internal ":merge" is used.
1866 internal ":merge" is used.
1845 8. Otherwise, ":prompt" is used.
1867 8. Otherwise, ":prompt" is used.
1846
1868
1847 Note:
1869 Note:
1848 After selecting a merge program, Mercurial will by default attempt to
1870 After selecting a merge program, Mercurial will by default attempt to
1849 merge the files using a simple merge algorithm first. Only if it
1871 merge the files using a simple merge algorithm first. Only if it
1850 doesn't succeed because of conflicting changes Mercurial will actually
1872 doesn't succeed because of conflicting changes Mercurial will actually
1851 execute the merge program. Whether to use the simple merge algorithm
1873 execute the merge program. Whether to use the simple merge algorithm
1852 first can be controlled by the premerge setting of the merge tool.
1874 first can be controlled by the premerge setting of the merge tool.
1853 Premerge is enabled by default unless the file is binary or a symlink.
1875 Premerge is enabled by default unless the file is binary or a symlink.
1854
1876
1855 See the merge-tools and ui sections of hgrc(5) for details on the
1877 See the merge-tools and ui sections of hgrc(5) for details on the
1856 configuration of merge tools.
1878 configuration of merge tools.
1857
1879
1858 Compression engines listed in `hg help bundlespec`
1880 Compression engines listed in `hg help bundlespec`
1859
1881
1860 $ hg help bundlespec | grep gzip
1882 $ hg help bundlespec | grep gzip
1861 "v1" bundles can only use the "gzip", "bzip2", and "none" compression
1883 "v1" bundles can only use the "gzip", "bzip2", and "none" compression
1862 An algorithm that produces smaller bundles than "gzip".
1884 An algorithm that produces smaller bundles than "gzip".
1863 This engine will likely produce smaller bundles than "gzip" but will be
1885 This engine will likely produce smaller bundles than "gzip" but will be
1864 "gzip"
1886 "gzip"
1865 better compression than "gzip". It also frequently yields better (?)
1887 better compression than "gzip". It also frequently yields better (?)
1866
1888
1867 Test usage of section marks in help documents
1889 Test usage of section marks in help documents
1868
1890
1869 $ cd "$TESTDIR"/../doc
1891 $ cd "$TESTDIR"/../doc
1870 $ $PYTHON check-seclevel.py
1892 $ $PYTHON check-seclevel.py
1871 $ cd $TESTTMP
1893 $ cd $TESTTMP
1872
1894
1873 #if serve
1895 #if serve
1874
1896
1875 Test the help pages in hgweb.
1897 Test the help pages in hgweb.
1876
1898
1877 Dish up an empty repo; serve it cold.
1899 Dish up an empty repo; serve it cold.
1878
1900
1879 $ hg init "$TESTTMP/test"
1901 $ hg init "$TESTTMP/test"
1880 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1902 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1881 $ cat hg.pid >> $DAEMON_PIDS
1903 $ cat hg.pid >> $DAEMON_PIDS
1882
1904
1883 $ get-with-headers.py $LOCALIP:$HGPORT "help"
1905 $ get-with-headers.py $LOCALIP:$HGPORT "help"
1884 200 Script output follows
1906 200 Script output follows
1885
1907
1886 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1908 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1887 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1909 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1888 <head>
1910 <head>
1889 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1911 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1890 <meta name="robots" content="index, nofollow" />
1912 <meta name="robots" content="index, nofollow" />
1891 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1913 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1892 <script type="text/javascript" src="/static/mercurial.js"></script>
1914 <script type="text/javascript" src="/static/mercurial.js"></script>
1893
1915
1894 <title>Help: Index</title>
1916 <title>Help: Index</title>
1895 </head>
1917 </head>
1896 <body>
1918 <body>
1897
1919
1898 <div class="container">
1920 <div class="container">
1899 <div class="menu">
1921 <div class="menu">
1900 <div class="logo">
1922 <div class="logo">
1901 <a href="https://mercurial-scm.org/">
1923 <a href="https://mercurial-scm.org/">
1902 <img src="/static/hglogo.png" alt="mercurial" /></a>
1924 <img src="/static/hglogo.png" alt="mercurial" /></a>
1903 </div>
1925 </div>
1904 <ul>
1926 <ul>
1905 <li><a href="/shortlog">log</a></li>
1927 <li><a href="/shortlog">log</a></li>
1906 <li><a href="/graph">graph</a></li>
1928 <li><a href="/graph">graph</a></li>
1907 <li><a href="/tags">tags</a></li>
1929 <li><a href="/tags">tags</a></li>
1908 <li><a href="/bookmarks">bookmarks</a></li>
1930 <li><a href="/bookmarks">bookmarks</a></li>
1909 <li><a href="/branches">branches</a></li>
1931 <li><a href="/branches">branches</a></li>
1910 </ul>
1932 </ul>
1911 <ul>
1933 <ul>
1912 <li class="active">help</li>
1934 <li class="active">help</li>
1913 </ul>
1935 </ul>
1914 </div>
1936 </div>
1915
1937
1916 <div class="main">
1938 <div class="main">
1917 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1939 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1918
1940
1919 <form class="search" action="/log">
1941 <form class="search" action="/log">
1920
1942
1921 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
1943 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
1922 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1944 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1923 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1945 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1924 </form>
1946 </form>
1925 <table class="bigtable">
1947 <table class="bigtable">
1926 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
1948 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
1927
1949
1928 <tr><td>
1950 <tr><td>
1929 <a href="/help/bundlespec">
1951 <a href="/help/bundlespec">
1930 bundlespec
1952 bundlespec
1931 </a>
1953 </a>
1932 </td><td>
1954 </td><td>
1933 Bundle File Formats
1955 Bundle File Formats
1934 </td></tr>
1956 </td></tr>
1935 <tr><td>
1957 <tr><td>
1936 <a href="/help/color">
1958 <a href="/help/color">
1937 color
1959 color
1938 </a>
1960 </a>
1939 </td><td>
1961 </td><td>
1940 Colorizing Outputs
1962 Colorizing Outputs
1941 </td></tr>
1963 </td></tr>
1942 <tr><td>
1964 <tr><td>
1943 <a href="/help/config">
1965 <a href="/help/config">
1944 config
1966 config
1945 </a>
1967 </a>
1946 </td><td>
1968 </td><td>
1947 Configuration Files
1969 Configuration Files
1948 </td></tr>
1970 </td></tr>
1949 <tr><td>
1971 <tr><td>
1950 <a href="/help/dates">
1972 <a href="/help/dates">
1951 dates
1973 dates
1952 </a>
1974 </a>
1953 </td><td>
1975 </td><td>
1954 Date Formats
1976 Date Formats
1955 </td></tr>
1977 </td></tr>
1956 <tr><td>
1978 <tr><td>
1957 <a href="/help/diffs">
1979 <a href="/help/diffs">
1958 diffs
1980 diffs
1959 </a>
1981 </a>
1960 </td><td>
1982 </td><td>
1961 Diff Formats
1983 Diff Formats
1962 </td></tr>
1984 </td></tr>
1963 <tr><td>
1985 <tr><td>
1964 <a href="/help/environment">
1986 <a href="/help/environment">
1965 environment
1987 environment
1966 </a>
1988 </a>
1967 </td><td>
1989 </td><td>
1968 Environment Variables
1990 Environment Variables
1969 </td></tr>
1991 </td></tr>
1970 <tr><td>
1992 <tr><td>
1971 <a href="/help/extensions">
1993 <a href="/help/extensions">
1972 extensions
1994 extensions
1973 </a>
1995 </a>
1974 </td><td>
1996 </td><td>
1975 Using Additional Features
1997 Using Additional Features
1976 </td></tr>
1998 </td></tr>
1977 <tr><td>
1999 <tr><td>
1978 <a href="/help/filesets">
2000 <a href="/help/filesets">
1979 filesets
2001 filesets
1980 </a>
2002 </a>
1981 </td><td>
2003 </td><td>
1982 Specifying File Sets
2004 Specifying File Sets
1983 </td></tr>
2005 </td></tr>
1984 <tr><td>
2006 <tr><td>
1985 <a href="/help/glossary">
2007 <a href="/help/glossary">
1986 glossary
2008 glossary
1987 </a>
2009 </a>
1988 </td><td>
2010 </td><td>
1989 Glossary
2011 Glossary
1990 </td></tr>
2012 </td></tr>
1991 <tr><td>
2013 <tr><td>
1992 <a href="/help/hgignore">
2014 <a href="/help/hgignore">
1993 hgignore
2015 hgignore
1994 </a>
2016 </a>
1995 </td><td>
2017 </td><td>
1996 Syntax for Mercurial Ignore Files
2018 Syntax for Mercurial Ignore Files
1997 </td></tr>
2019 </td></tr>
1998 <tr><td>
2020 <tr><td>
1999 <a href="/help/hgweb">
2021 <a href="/help/hgweb">
2000 hgweb
2022 hgweb
2001 </a>
2023 </a>
2002 </td><td>
2024 </td><td>
2003 Configuring hgweb
2025 Configuring hgweb
2004 </td></tr>
2026 </td></tr>
2005 <tr><td>
2027 <tr><td>
2006 <a href="/help/internals">
2028 <a href="/help/internals">
2007 internals
2029 internals
2008 </a>
2030 </a>
2009 </td><td>
2031 </td><td>
2010 Technical implementation topics
2032 Technical implementation topics
2011 </td></tr>
2033 </td></tr>
2012 <tr><td>
2034 <tr><td>
2013 <a href="/help/merge-tools">
2035 <a href="/help/merge-tools">
2014 merge-tools
2036 merge-tools
2015 </a>
2037 </a>
2016 </td><td>
2038 </td><td>
2017 Merge Tools
2039 Merge Tools
2018 </td></tr>
2040 </td></tr>
2019 <tr><td>
2041 <tr><td>
2020 <a href="/help/pager">
2042 <a href="/help/pager">
2021 pager
2043 pager
2022 </a>
2044 </a>
2023 </td><td>
2045 </td><td>
2024 Pager Support
2046 Pager Support
2025 </td></tr>
2047 </td></tr>
2026 <tr><td>
2048 <tr><td>
2027 <a href="/help/patterns">
2049 <a href="/help/patterns">
2028 patterns
2050 patterns
2029 </a>
2051 </a>
2030 </td><td>
2052 </td><td>
2031 File Name Patterns
2053 File Name Patterns
2032 </td></tr>
2054 </td></tr>
2033 <tr><td>
2055 <tr><td>
2034 <a href="/help/phases">
2056 <a href="/help/phases">
2035 phases
2057 phases
2036 </a>
2058 </a>
2037 </td><td>
2059 </td><td>
2038 Working with Phases
2060 Working with Phases
2039 </td></tr>
2061 </td></tr>
2040 <tr><td>
2062 <tr><td>
2041 <a href="/help/revisions">
2063 <a href="/help/revisions">
2042 revisions
2064 revisions
2043 </a>
2065 </a>
2044 </td><td>
2066 </td><td>
2045 Specifying Revisions
2067 Specifying Revisions
2046 </td></tr>
2068 </td></tr>
2047 <tr><td>
2069 <tr><td>
2048 <a href="/help/scripting">
2070 <a href="/help/scripting">
2049 scripting
2071 scripting
2050 </a>
2072 </a>
2051 </td><td>
2073 </td><td>
2052 Using Mercurial from scripts and automation
2074 Using Mercurial from scripts and automation
2053 </td></tr>
2075 </td></tr>
2054 <tr><td>
2076 <tr><td>
2055 <a href="/help/subrepos">
2077 <a href="/help/subrepos">
2056 subrepos
2078 subrepos
2057 </a>
2079 </a>
2058 </td><td>
2080 </td><td>
2059 Subrepositories
2081 Subrepositories
2060 </td></tr>
2082 </td></tr>
2061 <tr><td>
2083 <tr><td>
2062 <a href="/help/templating">
2084 <a href="/help/templating">
2063 templating
2085 templating
2064 </a>
2086 </a>
2065 </td><td>
2087 </td><td>
2066 Template Usage
2088 Template Usage
2067 </td></tr>
2089 </td></tr>
2068 <tr><td>
2090 <tr><td>
2069 <a href="/help/urls">
2091 <a href="/help/urls">
2070 urls
2092 urls
2071 </a>
2093 </a>
2072 </td><td>
2094 </td><td>
2073 URL Paths
2095 URL Paths
2074 </td></tr>
2096 </td></tr>
2075 <tr><td>
2097 <tr><td>
2076 <a href="/help/topic-containing-verbose">
2098 <a href="/help/topic-containing-verbose">
2077 topic-containing-verbose
2099 topic-containing-verbose
2078 </a>
2100 </a>
2079 </td><td>
2101 </td><td>
2080 This is the topic to test omit indicating.
2102 This is the topic to test omit indicating.
2081 </td></tr>
2103 </td></tr>
2082
2104
2083
2105
2084 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
2106 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
2085
2107
2086 <tr><td>
2108 <tr><td>
2087 <a href="/help/add">
2109 <a href="/help/add">
2088 add
2110 add
2089 </a>
2111 </a>
2090 </td><td>
2112 </td><td>
2091 add the specified files on the next commit
2113 add the specified files on the next commit
2092 </td></tr>
2114 </td></tr>
2093 <tr><td>
2115 <tr><td>
2094 <a href="/help/annotate">
2116 <a href="/help/annotate">
2095 annotate
2117 annotate
2096 </a>
2118 </a>
2097 </td><td>
2119 </td><td>
2098 show changeset information by line for each file
2120 show changeset information by line for each file
2099 </td></tr>
2121 </td></tr>
2100 <tr><td>
2122 <tr><td>
2101 <a href="/help/clone">
2123 <a href="/help/clone">
2102 clone
2124 clone
2103 </a>
2125 </a>
2104 </td><td>
2126 </td><td>
2105 make a copy of an existing repository
2127 make a copy of an existing repository
2106 </td></tr>
2128 </td></tr>
2107 <tr><td>
2129 <tr><td>
2108 <a href="/help/commit">
2130 <a href="/help/commit">
2109 commit
2131 commit
2110 </a>
2132 </a>
2111 </td><td>
2133 </td><td>
2112 commit the specified files or all outstanding changes
2134 commit the specified files or all outstanding changes
2113 </td></tr>
2135 </td></tr>
2114 <tr><td>
2136 <tr><td>
2115 <a href="/help/diff">
2137 <a href="/help/diff">
2116 diff
2138 diff
2117 </a>
2139 </a>
2118 </td><td>
2140 </td><td>
2119 diff repository (or selected files)
2141 diff repository (or selected files)
2120 </td></tr>
2142 </td></tr>
2121 <tr><td>
2143 <tr><td>
2122 <a href="/help/export">
2144 <a href="/help/export">
2123 export
2145 export
2124 </a>
2146 </a>
2125 </td><td>
2147 </td><td>
2126 dump the header and diffs for one or more changesets
2148 dump the header and diffs for one or more changesets
2127 </td></tr>
2149 </td></tr>
2128 <tr><td>
2150 <tr><td>
2129 <a href="/help/forget">
2151 <a href="/help/forget">
2130 forget
2152 forget
2131 </a>
2153 </a>
2132 </td><td>
2154 </td><td>
2133 forget the specified files on the next commit
2155 forget the specified files on the next commit
2134 </td></tr>
2156 </td></tr>
2135 <tr><td>
2157 <tr><td>
2136 <a href="/help/init">
2158 <a href="/help/init">
2137 init
2159 init
2138 </a>
2160 </a>
2139 </td><td>
2161 </td><td>
2140 create a new repository in the given directory
2162 create a new repository in the given directory
2141 </td></tr>
2163 </td></tr>
2142 <tr><td>
2164 <tr><td>
2143 <a href="/help/log">
2165 <a href="/help/log">
2144 log
2166 log
2145 </a>
2167 </a>
2146 </td><td>
2168 </td><td>
2147 show revision history of entire repository or files
2169 show revision history of entire repository or files
2148 </td></tr>
2170 </td></tr>
2149 <tr><td>
2171 <tr><td>
2150 <a href="/help/merge">
2172 <a href="/help/merge">
2151 merge
2173 merge
2152 </a>
2174 </a>
2153 </td><td>
2175 </td><td>
2154 merge another revision into working directory
2176 merge another revision into working directory
2155 </td></tr>
2177 </td></tr>
2156 <tr><td>
2178 <tr><td>
2157 <a href="/help/pull">
2179 <a href="/help/pull">
2158 pull
2180 pull
2159 </a>
2181 </a>
2160 </td><td>
2182 </td><td>
2161 pull changes from the specified source
2183 pull changes from the specified source
2162 </td></tr>
2184 </td></tr>
2163 <tr><td>
2185 <tr><td>
2164 <a href="/help/push">
2186 <a href="/help/push">
2165 push
2187 push
2166 </a>
2188 </a>
2167 </td><td>
2189 </td><td>
2168 push changes to the specified destination
2190 push changes to the specified destination
2169 </td></tr>
2191 </td></tr>
2170 <tr><td>
2192 <tr><td>
2171 <a href="/help/remove">
2193 <a href="/help/remove">
2172 remove
2194 remove
2173 </a>
2195 </a>
2174 </td><td>
2196 </td><td>
2175 remove the specified files on the next commit
2197 remove the specified files on the next commit
2176 </td></tr>
2198 </td></tr>
2177 <tr><td>
2199 <tr><td>
2178 <a href="/help/serve">
2200 <a href="/help/serve">
2179 serve
2201 serve
2180 </a>
2202 </a>
2181 </td><td>
2203 </td><td>
2182 start stand-alone webserver
2204 start stand-alone webserver
2183 </td></tr>
2205 </td></tr>
2184 <tr><td>
2206 <tr><td>
2185 <a href="/help/status">
2207 <a href="/help/status">
2186 status
2208 status
2187 </a>
2209 </a>
2188 </td><td>
2210 </td><td>
2189 show changed files in the working directory
2211 show changed files in the working directory
2190 </td></tr>
2212 </td></tr>
2191 <tr><td>
2213 <tr><td>
2192 <a href="/help/summary">
2214 <a href="/help/summary">
2193 summary
2215 summary
2194 </a>
2216 </a>
2195 </td><td>
2217 </td><td>
2196 summarize working directory state
2218 summarize working directory state
2197 </td></tr>
2219 </td></tr>
2198 <tr><td>
2220 <tr><td>
2199 <a href="/help/update">
2221 <a href="/help/update">
2200 update
2222 update
2201 </a>
2223 </a>
2202 </td><td>
2224 </td><td>
2203 update working directory (or switch revisions)
2225 update working directory (or switch revisions)
2204 </td></tr>
2226 </td></tr>
2205
2227
2206
2228
2207
2229
2208 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2230 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2209
2231
2210 <tr><td>
2232 <tr><td>
2211 <a href="/help/addremove">
2233 <a href="/help/addremove">
2212 addremove
2234 addremove
2213 </a>
2235 </a>
2214 </td><td>
2236 </td><td>
2215 add all new files, delete all missing files
2237 add all new files, delete all missing files
2216 </td></tr>
2238 </td></tr>
2217 <tr><td>
2239 <tr><td>
2218 <a href="/help/archive">
2240 <a href="/help/archive">
2219 archive
2241 archive
2220 </a>
2242 </a>
2221 </td><td>
2243 </td><td>
2222 create an unversioned archive of a repository revision
2244 create an unversioned archive of a repository revision
2223 </td></tr>
2245 </td></tr>
2224 <tr><td>
2246 <tr><td>
2225 <a href="/help/backout">
2247 <a href="/help/backout">
2226 backout
2248 backout
2227 </a>
2249 </a>
2228 </td><td>
2250 </td><td>
2229 reverse effect of earlier changeset
2251 reverse effect of earlier changeset
2230 </td></tr>
2252 </td></tr>
2231 <tr><td>
2253 <tr><td>
2232 <a href="/help/bisect">
2254 <a href="/help/bisect">
2233 bisect
2255 bisect
2234 </a>
2256 </a>
2235 </td><td>
2257 </td><td>
2236 subdivision search of changesets
2258 subdivision search of changesets
2237 </td></tr>
2259 </td></tr>
2238 <tr><td>
2260 <tr><td>
2239 <a href="/help/bookmarks">
2261 <a href="/help/bookmarks">
2240 bookmarks
2262 bookmarks
2241 </a>
2263 </a>
2242 </td><td>
2264 </td><td>
2243 create a new bookmark or list existing bookmarks
2265 create a new bookmark or list existing bookmarks
2244 </td></tr>
2266 </td></tr>
2245 <tr><td>
2267 <tr><td>
2246 <a href="/help/branch">
2268 <a href="/help/branch">
2247 branch
2269 branch
2248 </a>
2270 </a>
2249 </td><td>
2271 </td><td>
2250 set or show the current branch name
2272 set or show the current branch name
2251 </td></tr>
2273 </td></tr>
2252 <tr><td>
2274 <tr><td>
2253 <a href="/help/branches">
2275 <a href="/help/branches">
2254 branches
2276 branches
2255 </a>
2277 </a>
2256 </td><td>
2278 </td><td>
2257 list repository named branches
2279 list repository named branches
2258 </td></tr>
2280 </td></tr>
2259 <tr><td>
2281 <tr><td>
2260 <a href="/help/bundle">
2282 <a href="/help/bundle">
2261 bundle
2283 bundle
2262 </a>
2284 </a>
2263 </td><td>
2285 </td><td>
2264 create a bundle file
2286 create a bundle file
2265 </td></tr>
2287 </td></tr>
2266 <tr><td>
2288 <tr><td>
2267 <a href="/help/cat">
2289 <a href="/help/cat">
2268 cat
2290 cat
2269 </a>
2291 </a>
2270 </td><td>
2292 </td><td>
2271 output the current or given revision of files
2293 output the current or given revision of files
2272 </td></tr>
2294 </td></tr>
2273 <tr><td>
2295 <tr><td>
2274 <a href="/help/config">
2296 <a href="/help/config">
2275 config
2297 config
2276 </a>
2298 </a>
2277 </td><td>
2299 </td><td>
2278 show combined config settings from all hgrc files
2300 show combined config settings from all hgrc files
2279 </td></tr>
2301 </td></tr>
2280 <tr><td>
2302 <tr><td>
2281 <a href="/help/copy">
2303 <a href="/help/copy">
2282 copy
2304 copy
2283 </a>
2305 </a>
2284 </td><td>
2306 </td><td>
2285 mark files as copied for the next commit
2307 mark files as copied for the next commit
2286 </td></tr>
2308 </td></tr>
2287 <tr><td>
2309 <tr><td>
2288 <a href="/help/files">
2310 <a href="/help/files">
2289 files
2311 files
2290 </a>
2312 </a>
2291 </td><td>
2313 </td><td>
2292 list tracked files
2314 list tracked files
2293 </td></tr>
2315 </td></tr>
2294 <tr><td>
2316 <tr><td>
2295 <a href="/help/graft">
2317 <a href="/help/graft">
2296 graft
2318 graft
2297 </a>
2319 </a>
2298 </td><td>
2320 </td><td>
2299 copy changes from other branches onto the current branch
2321 copy changes from other branches onto the current branch
2300 </td></tr>
2322 </td></tr>
2301 <tr><td>
2323 <tr><td>
2302 <a href="/help/grep">
2324 <a href="/help/grep">
2303 grep
2325 grep
2304 </a>
2326 </a>
2305 </td><td>
2327 </td><td>
2306 search revision history for a pattern in specified files
2328 search revision history for a pattern in specified files
2307 </td></tr>
2329 </td></tr>
2308 <tr><td>
2330 <tr><td>
2309 <a href="/help/heads">
2331 <a href="/help/heads">
2310 heads
2332 heads
2311 </a>
2333 </a>
2312 </td><td>
2334 </td><td>
2313 show branch heads
2335 show branch heads
2314 </td></tr>
2336 </td></tr>
2315 <tr><td>
2337 <tr><td>
2316 <a href="/help/help">
2338 <a href="/help/help">
2317 help
2339 help
2318 </a>
2340 </a>
2319 </td><td>
2341 </td><td>
2320 show help for a given topic or a help overview
2342 show help for a given topic or a help overview
2321 </td></tr>
2343 </td></tr>
2322 <tr><td>
2344 <tr><td>
2323 <a href="/help/hgalias">
2345 <a href="/help/hgalias">
2324 hgalias
2346 hgalias
2325 </a>
2347 </a>
2326 </td><td>
2348 </td><td>
2327 summarize working directory state
2349 summarize working directory state
2328 </td></tr>
2350 </td></tr>
2329 <tr><td>
2351 <tr><td>
2330 <a href="/help/identify">
2352 <a href="/help/identify">
2331 identify
2353 identify
2332 </a>
2354 </a>
2333 </td><td>
2355 </td><td>
2334 identify the working directory or specified revision
2356 identify the working directory or specified revision
2335 </td></tr>
2357 </td></tr>
2336 <tr><td>
2358 <tr><td>
2337 <a href="/help/import">
2359 <a href="/help/import">
2338 import
2360 import
2339 </a>
2361 </a>
2340 </td><td>
2362 </td><td>
2341 import an ordered set of patches
2363 import an ordered set of patches
2342 </td></tr>
2364 </td></tr>
2343 <tr><td>
2365 <tr><td>
2344 <a href="/help/incoming">
2366 <a href="/help/incoming">
2345 incoming
2367 incoming
2346 </a>
2368 </a>
2347 </td><td>
2369 </td><td>
2348 show new changesets found in source
2370 show new changesets found in source
2349 </td></tr>
2371 </td></tr>
2350 <tr><td>
2372 <tr><td>
2351 <a href="/help/manifest">
2373 <a href="/help/manifest">
2352 manifest
2374 manifest
2353 </a>
2375 </a>
2354 </td><td>
2376 </td><td>
2355 output the current or given revision of the project manifest
2377 output the current or given revision of the project manifest
2356 </td></tr>
2378 </td></tr>
2357 <tr><td>
2379 <tr><td>
2358 <a href="/help/nohelp">
2380 <a href="/help/nohelp">
2359 nohelp
2381 nohelp
2360 </a>
2382 </a>
2361 </td><td>
2383 </td><td>
2362 (no help text available)
2384 (no help text available)
2363 </td></tr>
2385 </td></tr>
2364 <tr><td>
2386 <tr><td>
2365 <a href="/help/outgoing">
2387 <a href="/help/outgoing">
2366 outgoing
2388 outgoing
2367 </a>
2389 </a>
2368 </td><td>
2390 </td><td>
2369 show changesets not found in the destination
2391 show changesets not found in the destination
2370 </td></tr>
2392 </td></tr>
2371 <tr><td>
2393 <tr><td>
2372 <a href="/help/paths">
2394 <a href="/help/paths">
2373 paths
2395 paths
2374 </a>
2396 </a>
2375 </td><td>
2397 </td><td>
2376 show aliases for remote repositories
2398 show aliases for remote repositories
2377 </td></tr>
2399 </td></tr>
2378 <tr><td>
2400 <tr><td>
2379 <a href="/help/phase">
2401 <a href="/help/phase">
2380 phase
2402 phase
2381 </a>
2403 </a>
2382 </td><td>
2404 </td><td>
2383 set or show the current phase name
2405 set or show the current phase name
2384 </td></tr>
2406 </td></tr>
2385 <tr><td>
2407 <tr><td>
2386 <a href="/help/recover">
2408 <a href="/help/recover">
2387 recover
2409 recover
2388 </a>
2410 </a>
2389 </td><td>
2411 </td><td>
2390 roll back an interrupted transaction
2412 roll back an interrupted transaction
2391 </td></tr>
2413 </td></tr>
2392 <tr><td>
2414 <tr><td>
2393 <a href="/help/rename">
2415 <a href="/help/rename">
2394 rename
2416 rename
2395 </a>
2417 </a>
2396 </td><td>
2418 </td><td>
2397 rename files; equivalent of copy + remove
2419 rename files; equivalent of copy + remove
2398 </td></tr>
2420 </td></tr>
2399 <tr><td>
2421 <tr><td>
2400 <a href="/help/resolve">
2422 <a href="/help/resolve">
2401 resolve
2423 resolve
2402 </a>
2424 </a>
2403 </td><td>
2425 </td><td>
2404 redo merges or set/view the merge status of files
2426 redo merges or set/view the merge status of files
2405 </td></tr>
2427 </td></tr>
2406 <tr><td>
2428 <tr><td>
2407 <a href="/help/revert">
2429 <a href="/help/revert">
2408 revert
2430 revert
2409 </a>
2431 </a>
2410 </td><td>
2432 </td><td>
2411 restore files to their checkout state
2433 restore files to their checkout state
2412 </td></tr>
2434 </td></tr>
2413 <tr><td>
2435 <tr><td>
2414 <a href="/help/root">
2436 <a href="/help/root">
2415 root
2437 root
2416 </a>
2438 </a>
2417 </td><td>
2439 </td><td>
2418 print the root (top) of the current working directory
2440 print the root (top) of the current working directory
2419 </td></tr>
2441 </td></tr>
2420 <tr><td>
2442 <tr><td>
2421 <a href="/help/shellalias">
2443 <a href="/help/shellalias">
2422 shellalias
2444 shellalias
2423 </a>
2445 </a>
2424 </td><td>
2446 </td><td>
2425 (no help text available)
2447 (no help text available)
2426 </td></tr>
2448 </td></tr>
2427 <tr><td>
2449 <tr><td>
2428 <a href="/help/tag">
2450 <a href="/help/tag">
2429 tag
2451 tag
2430 </a>
2452 </a>
2431 </td><td>
2453 </td><td>
2432 add one or more tags for the current or given revision
2454 add one or more tags for the current or given revision
2433 </td></tr>
2455 </td></tr>
2434 <tr><td>
2456 <tr><td>
2435 <a href="/help/tags">
2457 <a href="/help/tags">
2436 tags
2458 tags
2437 </a>
2459 </a>
2438 </td><td>
2460 </td><td>
2439 list repository tags
2461 list repository tags
2440 </td></tr>
2462 </td></tr>
2441 <tr><td>
2463 <tr><td>
2442 <a href="/help/unbundle">
2464 <a href="/help/unbundle">
2443 unbundle
2465 unbundle
2444 </a>
2466 </a>
2445 </td><td>
2467 </td><td>
2446 apply one or more bundle files
2468 apply one or more bundle files
2447 </td></tr>
2469 </td></tr>
2448 <tr><td>
2470 <tr><td>
2449 <a href="/help/verify">
2471 <a href="/help/verify">
2450 verify
2472 verify
2451 </a>
2473 </a>
2452 </td><td>
2474 </td><td>
2453 verify the integrity of the repository
2475 verify the integrity of the repository
2454 </td></tr>
2476 </td></tr>
2455 <tr><td>
2477 <tr><td>
2456 <a href="/help/version">
2478 <a href="/help/version">
2457 version
2479 version
2458 </a>
2480 </a>
2459 </td><td>
2481 </td><td>
2460 output version and copyright information
2482 output version and copyright information
2461 </td></tr>
2483 </td></tr>
2462
2484
2463
2485
2464 </table>
2486 </table>
2465 </div>
2487 </div>
2466 </div>
2488 </div>
2467
2489
2468
2490
2469
2491
2470 </body>
2492 </body>
2471 </html>
2493 </html>
2472
2494
2473
2495
2474 $ get-with-headers.py $LOCALIP:$HGPORT "help/add"
2496 $ get-with-headers.py $LOCALIP:$HGPORT "help/add"
2475 200 Script output follows
2497 200 Script output follows
2476
2498
2477 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2499 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2478 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2500 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2479 <head>
2501 <head>
2480 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2502 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2481 <meta name="robots" content="index, nofollow" />
2503 <meta name="robots" content="index, nofollow" />
2482 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2504 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2483 <script type="text/javascript" src="/static/mercurial.js"></script>
2505 <script type="text/javascript" src="/static/mercurial.js"></script>
2484
2506
2485 <title>Help: add</title>
2507 <title>Help: add</title>
2486 </head>
2508 </head>
2487 <body>
2509 <body>
2488
2510
2489 <div class="container">
2511 <div class="container">
2490 <div class="menu">
2512 <div class="menu">
2491 <div class="logo">
2513 <div class="logo">
2492 <a href="https://mercurial-scm.org/">
2514 <a href="https://mercurial-scm.org/">
2493 <img src="/static/hglogo.png" alt="mercurial" /></a>
2515 <img src="/static/hglogo.png" alt="mercurial" /></a>
2494 </div>
2516 </div>
2495 <ul>
2517 <ul>
2496 <li><a href="/shortlog">log</a></li>
2518 <li><a href="/shortlog">log</a></li>
2497 <li><a href="/graph">graph</a></li>
2519 <li><a href="/graph">graph</a></li>
2498 <li><a href="/tags">tags</a></li>
2520 <li><a href="/tags">tags</a></li>
2499 <li><a href="/bookmarks">bookmarks</a></li>
2521 <li><a href="/bookmarks">bookmarks</a></li>
2500 <li><a href="/branches">branches</a></li>
2522 <li><a href="/branches">branches</a></li>
2501 </ul>
2523 </ul>
2502 <ul>
2524 <ul>
2503 <li class="active"><a href="/help">help</a></li>
2525 <li class="active"><a href="/help">help</a></li>
2504 </ul>
2526 </ul>
2505 </div>
2527 </div>
2506
2528
2507 <div class="main">
2529 <div class="main">
2508 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2530 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2509 <h3>Help: add</h3>
2531 <h3>Help: add</h3>
2510
2532
2511 <form class="search" action="/log">
2533 <form class="search" action="/log">
2512
2534
2513 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2535 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2514 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2536 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2515 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2537 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2516 </form>
2538 </form>
2517 <div id="doc">
2539 <div id="doc">
2518 <p>
2540 <p>
2519 hg add [OPTION]... [FILE]...
2541 hg add [OPTION]... [FILE]...
2520 </p>
2542 </p>
2521 <p>
2543 <p>
2522 add the specified files on the next commit
2544 add the specified files on the next commit
2523 </p>
2545 </p>
2524 <p>
2546 <p>
2525 Schedule files to be version controlled and added to the
2547 Schedule files to be version controlled and added to the
2526 repository.
2548 repository.
2527 </p>
2549 </p>
2528 <p>
2550 <p>
2529 The files will be added to the repository at the next commit. To
2551 The files will be added to the repository at the next commit. To
2530 undo an add before that, see 'hg forget'.
2552 undo an add before that, see 'hg forget'.
2531 </p>
2553 </p>
2532 <p>
2554 <p>
2533 If no names are given, add all files to the repository (except
2555 If no names are given, add all files to the repository (except
2534 files matching &quot;.hgignore&quot;).
2556 files matching &quot;.hgignore&quot;).
2535 </p>
2557 </p>
2536 <p>
2558 <p>
2537 Examples:
2559 Examples:
2538 </p>
2560 </p>
2539 <ul>
2561 <ul>
2540 <li> New (unknown) files are added automatically by 'hg add':
2562 <li> New (unknown) files are added automatically by 'hg add':
2541 <pre>
2563 <pre>
2542 \$ ls (re)
2564 \$ ls (re)
2543 foo.c
2565 foo.c
2544 \$ hg status (re)
2566 \$ hg status (re)
2545 ? foo.c
2567 ? foo.c
2546 \$ hg add (re)
2568 \$ hg add (re)
2547 adding foo.c
2569 adding foo.c
2548 \$ hg status (re)
2570 \$ hg status (re)
2549 A foo.c
2571 A foo.c
2550 </pre>
2572 </pre>
2551 <li> Specific files to be added can be specified:
2573 <li> Specific files to be added can be specified:
2552 <pre>
2574 <pre>
2553 \$ ls (re)
2575 \$ ls (re)
2554 bar.c foo.c
2576 bar.c foo.c
2555 \$ hg status (re)
2577 \$ hg status (re)
2556 ? bar.c
2578 ? bar.c
2557 ? foo.c
2579 ? foo.c
2558 \$ hg add bar.c (re)
2580 \$ hg add bar.c (re)
2559 \$ hg status (re)
2581 \$ hg status (re)
2560 A bar.c
2582 A bar.c
2561 ? foo.c
2583 ? foo.c
2562 </pre>
2584 </pre>
2563 </ul>
2585 </ul>
2564 <p>
2586 <p>
2565 Returns 0 if all files are successfully added.
2587 Returns 0 if all files are successfully added.
2566 </p>
2588 </p>
2567 <p>
2589 <p>
2568 options ([+] can be repeated):
2590 options ([+] can be repeated):
2569 </p>
2591 </p>
2570 <table>
2592 <table>
2571 <tr><td>-I</td>
2593 <tr><td>-I</td>
2572 <td>--include PATTERN [+]</td>
2594 <td>--include PATTERN [+]</td>
2573 <td>include names matching the given patterns</td></tr>
2595 <td>include names matching the given patterns</td></tr>
2574 <tr><td>-X</td>
2596 <tr><td>-X</td>
2575 <td>--exclude PATTERN [+]</td>
2597 <td>--exclude PATTERN [+]</td>
2576 <td>exclude names matching the given patterns</td></tr>
2598 <td>exclude names matching the given patterns</td></tr>
2577 <tr><td>-S</td>
2599 <tr><td>-S</td>
2578 <td>--subrepos</td>
2600 <td>--subrepos</td>
2579 <td>recurse into subrepositories</td></tr>
2601 <td>recurse into subrepositories</td></tr>
2580 <tr><td>-n</td>
2602 <tr><td>-n</td>
2581 <td>--dry-run</td>
2603 <td>--dry-run</td>
2582 <td>do not perform actions, just print output</td></tr>
2604 <td>do not perform actions, just print output</td></tr>
2583 </table>
2605 </table>
2584 <p>
2606 <p>
2585 global options ([+] can be repeated):
2607 global options ([+] can be repeated):
2586 </p>
2608 </p>
2587 <table>
2609 <table>
2588 <tr><td>-R</td>
2610 <tr><td>-R</td>
2589 <td>--repository REPO</td>
2611 <td>--repository REPO</td>
2590 <td>repository root directory or name of overlay bundle file</td></tr>
2612 <td>repository root directory or name of overlay bundle file</td></tr>
2591 <tr><td></td>
2613 <tr><td></td>
2592 <td>--cwd DIR</td>
2614 <td>--cwd DIR</td>
2593 <td>change working directory</td></tr>
2615 <td>change working directory</td></tr>
2594 <tr><td>-y</td>
2616 <tr><td>-y</td>
2595 <td>--noninteractive</td>
2617 <td>--noninteractive</td>
2596 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2618 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2597 <tr><td>-q</td>
2619 <tr><td>-q</td>
2598 <td>--quiet</td>
2620 <td>--quiet</td>
2599 <td>suppress output</td></tr>
2621 <td>suppress output</td></tr>
2600 <tr><td>-v</td>
2622 <tr><td>-v</td>
2601 <td>--verbose</td>
2623 <td>--verbose</td>
2602 <td>enable additional output</td></tr>
2624 <td>enable additional output</td></tr>
2603 <tr><td></td>
2625 <tr><td></td>
2604 <td>--color TYPE</td>
2626 <td>--color TYPE</td>
2605 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2627 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2606 <tr><td></td>
2628 <tr><td></td>
2607 <td>--config CONFIG [+]</td>
2629 <td>--config CONFIG [+]</td>
2608 <td>set/override config option (use 'section.name=value')</td></tr>
2630 <td>set/override config option (use 'section.name=value')</td></tr>
2609 <tr><td></td>
2631 <tr><td></td>
2610 <td>--debug</td>
2632 <td>--debug</td>
2611 <td>enable debugging output</td></tr>
2633 <td>enable debugging output</td></tr>
2612 <tr><td></td>
2634 <tr><td></td>
2613 <td>--debugger</td>
2635 <td>--debugger</td>
2614 <td>start debugger</td></tr>
2636 <td>start debugger</td></tr>
2615 <tr><td></td>
2637 <tr><td></td>
2616 <td>--encoding ENCODE</td>
2638 <td>--encoding ENCODE</td>
2617 <td>set the charset encoding (default: ascii)</td></tr>
2639 <td>set the charset encoding (default: ascii)</td></tr>
2618 <tr><td></td>
2640 <tr><td></td>
2619 <td>--encodingmode MODE</td>
2641 <td>--encodingmode MODE</td>
2620 <td>set the charset encoding mode (default: strict)</td></tr>
2642 <td>set the charset encoding mode (default: strict)</td></tr>
2621 <tr><td></td>
2643 <tr><td></td>
2622 <td>--traceback</td>
2644 <td>--traceback</td>
2623 <td>always print a traceback on exception</td></tr>
2645 <td>always print a traceback on exception</td></tr>
2624 <tr><td></td>
2646 <tr><td></td>
2625 <td>--time</td>
2647 <td>--time</td>
2626 <td>time how long the command takes</td></tr>
2648 <td>time how long the command takes</td></tr>
2627 <tr><td></td>
2649 <tr><td></td>
2628 <td>--profile</td>
2650 <td>--profile</td>
2629 <td>print command execution profile</td></tr>
2651 <td>print command execution profile</td></tr>
2630 <tr><td></td>
2652 <tr><td></td>
2631 <td>--version</td>
2653 <td>--version</td>
2632 <td>output version information and exit</td></tr>
2654 <td>output version information and exit</td></tr>
2633 <tr><td>-h</td>
2655 <tr><td>-h</td>
2634 <td>--help</td>
2656 <td>--help</td>
2635 <td>display help and exit</td></tr>
2657 <td>display help and exit</td></tr>
2636 <tr><td></td>
2658 <tr><td></td>
2637 <td>--hidden</td>
2659 <td>--hidden</td>
2638 <td>consider hidden changesets</td></tr>
2660 <td>consider hidden changesets</td></tr>
2639 <tr><td></td>
2661 <tr><td></td>
2640 <td>--pager TYPE</td>
2662 <td>--pager TYPE</td>
2641 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2663 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2642 </table>
2664 </table>
2643
2665
2644 </div>
2666 </div>
2645 </div>
2667 </div>
2646 </div>
2668 </div>
2647
2669
2648
2670
2649
2671
2650 </body>
2672 </body>
2651 </html>
2673 </html>
2652
2674
2653
2675
2654 $ get-with-headers.py $LOCALIP:$HGPORT "help/remove"
2676 $ get-with-headers.py $LOCALIP:$HGPORT "help/remove"
2655 200 Script output follows
2677 200 Script output follows
2656
2678
2657 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2679 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2658 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2680 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2659 <head>
2681 <head>
2660 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2682 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2661 <meta name="robots" content="index, nofollow" />
2683 <meta name="robots" content="index, nofollow" />
2662 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2684 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2663 <script type="text/javascript" src="/static/mercurial.js"></script>
2685 <script type="text/javascript" src="/static/mercurial.js"></script>
2664
2686
2665 <title>Help: remove</title>
2687 <title>Help: remove</title>
2666 </head>
2688 </head>
2667 <body>
2689 <body>
2668
2690
2669 <div class="container">
2691 <div class="container">
2670 <div class="menu">
2692 <div class="menu">
2671 <div class="logo">
2693 <div class="logo">
2672 <a href="https://mercurial-scm.org/">
2694 <a href="https://mercurial-scm.org/">
2673 <img src="/static/hglogo.png" alt="mercurial" /></a>
2695 <img src="/static/hglogo.png" alt="mercurial" /></a>
2674 </div>
2696 </div>
2675 <ul>
2697 <ul>
2676 <li><a href="/shortlog">log</a></li>
2698 <li><a href="/shortlog">log</a></li>
2677 <li><a href="/graph">graph</a></li>
2699 <li><a href="/graph">graph</a></li>
2678 <li><a href="/tags">tags</a></li>
2700 <li><a href="/tags">tags</a></li>
2679 <li><a href="/bookmarks">bookmarks</a></li>
2701 <li><a href="/bookmarks">bookmarks</a></li>
2680 <li><a href="/branches">branches</a></li>
2702 <li><a href="/branches">branches</a></li>
2681 </ul>
2703 </ul>
2682 <ul>
2704 <ul>
2683 <li class="active"><a href="/help">help</a></li>
2705 <li class="active"><a href="/help">help</a></li>
2684 </ul>
2706 </ul>
2685 </div>
2707 </div>
2686
2708
2687 <div class="main">
2709 <div class="main">
2688 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2710 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2689 <h3>Help: remove</h3>
2711 <h3>Help: remove</h3>
2690
2712
2691 <form class="search" action="/log">
2713 <form class="search" action="/log">
2692
2714
2693 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2715 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2694 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2716 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2695 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2717 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2696 </form>
2718 </form>
2697 <div id="doc">
2719 <div id="doc">
2698 <p>
2720 <p>
2699 hg remove [OPTION]... FILE...
2721 hg remove [OPTION]... FILE...
2700 </p>
2722 </p>
2701 <p>
2723 <p>
2702 aliases: rm
2724 aliases: rm
2703 </p>
2725 </p>
2704 <p>
2726 <p>
2705 remove the specified files on the next commit
2727 remove the specified files on the next commit
2706 </p>
2728 </p>
2707 <p>
2729 <p>
2708 Schedule the indicated files for removal from the current branch.
2730 Schedule the indicated files for removal from the current branch.
2709 </p>
2731 </p>
2710 <p>
2732 <p>
2711 This command schedules the files to be removed at the next commit.
2733 This command schedules the files to be removed at the next commit.
2712 To undo a remove before that, see 'hg revert'. To undo added
2734 To undo a remove before that, see 'hg revert'. To undo added
2713 files, see 'hg forget'.
2735 files, see 'hg forget'.
2714 </p>
2736 </p>
2715 <p>
2737 <p>
2716 -A/--after can be used to remove only files that have already
2738 -A/--after can be used to remove only files that have already
2717 been deleted, -f/--force can be used to force deletion, and -Af
2739 been deleted, -f/--force can be used to force deletion, and -Af
2718 can be used to remove files from the next revision without
2740 can be used to remove files from the next revision without
2719 deleting them from the working directory.
2741 deleting them from the working directory.
2720 </p>
2742 </p>
2721 <p>
2743 <p>
2722 The following table details the behavior of remove for different
2744 The following table details the behavior of remove for different
2723 file states (columns) and option combinations (rows). The file
2745 file states (columns) and option combinations (rows). The file
2724 states are Added [A], Clean [C], Modified [M] and Missing [!]
2746 states are Added [A], Clean [C], Modified [M] and Missing [!]
2725 (as reported by 'hg status'). The actions are Warn, Remove
2747 (as reported by 'hg status'). The actions are Warn, Remove
2726 (from branch) and Delete (from disk):
2748 (from branch) and Delete (from disk):
2727 </p>
2749 </p>
2728 <table>
2750 <table>
2729 <tr><td>opt/state</td>
2751 <tr><td>opt/state</td>
2730 <td>A</td>
2752 <td>A</td>
2731 <td>C</td>
2753 <td>C</td>
2732 <td>M</td>
2754 <td>M</td>
2733 <td>!</td></tr>
2755 <td>!</td></tr>
2734 <tr><td>none</td>
2756 <tr><td>none</td>
2735 <td>W</td>
2757 <td>W</td>
2736 <td>RD</td>
2758 <td>RD</td>
2737 <td>W</td>
2759 <td>W</td>
2738 <td>R</td></tr>
2760 <td>R</td></tr>
2739 <tr><td>-f</td>
2761 <tr><td>-f</td>
2740 <td>R</td>
2762 <td>R</td>
2741 <td>RD</td>
2763 <td>RD</td>
2742 <td>RD</td>
2764 <td>RD</td>
2743 <td>R</td></tr>
2765 <td>R</td></tr>
2744 <tr><td>-A</td>
2766 <tr><td>-A</td>
2745 <td>W</td>
2767 <td>W</td>
2746 <td>W</td>
2768 <td>W</td>
2747 <td>W</td>
2769 <td>W</td>
2748 <td>R</td></tr>
2770 <td>R</td></tr>
2749 <tr><td>-Af</td>
2771 <tr><td>-Af</td>
2750 <td>R</td>
2772 <td>R</td>
2751 <td>R</td>
2773 <td>R</td>
2752 <td>R</td>
2774 <td>R</td>
2753 <td>R</td></tr>
2775 <td>R</td></tr>
2754 </table>
2776 </table>
2755 <p>
2777 <p>
2756 <b>Note:</b>
2778 <b>Note:</b>
2757 </p>
2779 </p>
2758 <p>
2780 <p>
2759 'hg remove' never deletes files in Added [A] state from the
2781 'hg remove' never deletes files in Added [A] state from the
2760 working directory, not even if &quot;--force&quot; is specified.
2782 working directory, not even if &quot;--force&quot; is specified.
2761 </p>
2783 </p>
2762 <p>
2784 <p>
2763 Returns 0 on success, 1 if any warnings encountered.
2785 Returns 0 on success, 1 if any warnings encountered.
2764 </p>
2786 </p>
2765 <p>
2787 <p>
2766 options ([+] can be repeated):
2788 options ([+] can be repeated):
2767 </p>
2789 </p>
2768 <table>
2790 <table>
2769 <tr><td>-A</td>
2791 <tr><td>-A</td>
2770 <td>--after</td>
2792 <td>--after</td>
2771 <td>record delete for missing files</td></tr>
2793 <td>record delete for missing files</td></tr>
2772 <tr><td>-f</td>
2794 <tr><td>-f</td>
2773 <td>--force</td>
2795 <td>--force</td>
2774 <td>forget added files, delete modified files</td></tr>
2796 <td>forget added files, delete modified files</td></tr>
2775 <tr><td>-S</td>
2797 <tr><td>-S</td>
2776 <td>--subrepos</td>
2798 <td>--subrepos</td>
2777 <td>recurse into subrepositories</td></tr>
2799 <td>recurse into subrepositories</td></tr>
2778 <tr><td>-I</td>
2800 <tr><td>-I</td>
2779 <td>--include PATTERN [+]</td>
2801 <td>--include PATTERN [+]</td>
2780 <td>include names matching the given patterns</td></tr>
2802 <td>include names matching the given patterns</td></tr>
2781 <tr><td>-X</td>
2803 <tr><td>-X</td>
2782 <td>--exclude PATTERN [+]</td>
2804 <td>--exclude PATTERN [+]</td>
2783 <td>exclude names matching the given patterns</td></tr>
2805 <td>exclude names matching the given patterns</td></tr>
2784 </table>
2806 </table>
2785 <p>
2807 <p>
2786 global options ([+] can be repeated):
2808 global options ([+] can be repeated):
2787 </p>
2809 </p>
2788 <table>
2810 <table>
2789 <tr><td>-R</td>
2811 <tr><td>-R</td>
2790 <td>--repository REPO</td>
2812 <td>--repository REPO</td>
2791 <td>repository root directory or name of overlay bundle file</td></tr>
2813 <td>repository root directory or name of overlay bundle file</td></tr>
2792 <tr><td></td>
2814 <tr><td></td>
2793 <td>--cwd DIR</td>
2815 <td>--cwd DIR</td>
2794 <td>change working directory</td></tr>
2816 <td>change working directory</td></tr>
2795 <tr><td>-y</td>
2817 <tr><td>-y</td>
2796 <td>--noninteractive</td>
2818 <td>--noninteractive</td>
2797 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2819 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2798 <tr><td>-q</td>
2820 <tr><td>-q</td>
2799 <td>--quiet</td>
2821 <td>--quiet</td>
2800 <td>suppress output</td></tr>
2822 <td>suppress output</td></tr>
2801 <tr><td>-v</td>
2823 <tr><td>-v</td>
2802 <td>--verbose</td>
2824 <td>--verbose</td>
2803 <td>enable additional output</td></tr>
2825 <td>enable additional output</td></tr>
2804 <tr><td></td>
2826 <tr><td></td>
2805 <td>--color TYPE</td>
2827 <td>--color TYPE</td>
2806 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2828 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2807 <tr><td></td>
2829 <tr><td></td>
2808 <td>--config CONFIG [+]</td>
2830 <td>--config CONFIG [+]</td>
2809 <td>set/override config option (use 'section.name=value')</td></tr>
2831 <td>set/override config option (use 'section.name=value')</td></tr>
2810 <tr><td></td>
2832 <tr><td></td>
2811 <td>--debug</td>
2833 <td>--debug</td>
2812 <td>enable debugging output</td></tr>
2834 <td>enable debugging output</td></tr>
2813 <tr><td></td>
2835 <tr><td></td>
2814 <td>--debugger</td>
2836 <td>--debugger</td>
2815 <td>start debugger</td></tr>
2837 <td>start debugger</td></tr>
2816 <tr><td></td>
2838 <tr><td></td>
2817 <td>--encoding ENCODE</td>
2839 <td>--encoding ENCODE</td>
2818 <td>set the charset encoding (default: ascii)</td></tr>
2840 <td>set the charset encoding (default: ascii)</td></tr>
2819 <tr><td></td>
2841 <tr><td></td>
2820 <td>--encodingmode MODE</td>
2842 <td>--encodingmode MODE</td>
2821 <td>set the charset encoding mode (default: strict)</td></tr>
2843 <td>set the charset encoding mode (default: strict)</td></tr>
2822 <tr><td></td>
2844 <tr><td></td>
2823 <td>--traceback</td>
2845 <td>--traceback</td>
2824 <td>always print a traceback on exception</td></tr>
2846 <td>always print a traceback on exception</td></tr>
2825 <tr><td></td>
2847 <tr><td></td>
2826 <td>--time</td>
2848 <td>--time</td>
2827 <td>time how long the command takes</td></tr>
2849 <td>time how long the command takes</td></tr>
2828 <tr><td></td>
2850 <tr><td></td>
2829 <td>--profile</td>
2851 <td>--profile</td>
2830 <td>print command execution profile</td></tr>
2852 <td>print command execution profile</td></tr>
2831 <tr><td></td>
2853 <tr><td></td>
2832 <td>--version</td>
2854 <td>--version</td>
2833 <td>output version information and exit</td></tr>
2855 <td>output version information and exit</td></tr>
2834 <tr><td>-h</td>
2856 <tr><td>-h</td>
2835 <td>--help</td>
2857 <td>--help</td>
2836 <td>display help and exit</td></tr>
2858 <td>display help and exit</td></tr>
2837 <tr><td></td>
2859 <tr><td></td>
2838 <td>--hidden</td>
2860 <td>--hidden</td>
2839 <td>consider hidden changesets</td></tr>
2861 <td>consider hidden changesets</td></tr>
2840 <tr><td></td>
2862 <tr><td></td>
2841 <td>--pager TYPE</td>
2863 <td>--pager TYPE</td>
2842 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2864 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2843 </table>
2865 </table>
2844
2866
2845 </div>
2867 </div>
2846 </div>
2868 </div>
2847 </div>
2869 </div>
2848
2870
2849
2871
2850
2872
2851 </body>
2873 </body>
2852 </html>
2874 </html>
2853
2875
2854
2876
2855 $ get-with-headers.py $LOCALIP:$HGPORT "help/dates"
2877 $ get-with-headers.py $LOCALIP:$HGPORT "help/dates"
2856 200 Script output follows
2878 200 Script output follows
2857
2879
2858 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2880 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2859 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2881 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2860 <head>
2882 <head>
2861 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2883 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2862 <meta name="robots" content="index, nofollow" />
2884 <meta name="robots" content="index, nofollow" />
2863 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2885 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2864 <script type="text/javascript" src="/static/mercurial.js"></script>
2886 <script type="text/javascript" src="/static/mercurial.js"></script>
2865
2887
2866 <title>Help: dates</title>
2888 <title>Help: dates</title>
2867 </head>
2889 </head>
2868 <body>
2890 <body>
2869
2891
2870 <div class="container">
2892 <div class="container">
2871 <div class="menu">
2893 <div class="menu">
2872 <div class="logo">
2894 <div class="logo">
2873 <a href="https://mercurial-scm.org/">
2895 <a href="https://mercurial-scm.org/">
2874 <img src="/static/hglogo.png" alt="mercurial" /></a>
2896 <img src="/static/hglogo.png" alt="mercurial" /></a>
2875 </div>
2897 </div>
2876 <ul>
2898 <ul>
2877 <li><a href="/shortlog">log</a></li>
2899 <li><a href="/shortlog">log</a></li>
2878 <li><a href="/graph">graph</a></li>
2900 <li><a href="/graph">graph</a></li>
2879 <li><a href="/tags">tags</a></li>
2901 <li><a href="/tags">tags</a></li>
2880 <li><a href="/bookmarks">bookmarks</a></li>
2902 <li><a href="/bookmarks">bookmarks</a></li>
2881 <li><a href="/branches">branches</a></li>
2903 <li><a href="/branches">branches</a></li>
2882 </ul>
2904 </ul>
2883 <ul>
2905 <ul>
2884 <li class="active"><a href="/help">help</a></li>
2906 <li class="active"><a href="/help">help</a></li>
2885 </ul>
2907 </ul>
2886 </div>
2908 </div>
2887
2909
2888 <div class="main">
2910 <div class="main">
2889 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2911 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2890 <h3>Help: dates</h3>
2912 <h3>Help: dates</h3>
2891
2913
2892 <form class="search" action="/log">
2914 <form class="search" action="/log">
2893
2915
2894 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2916 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2895 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2917 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2896 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2918 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2897 </form>
2919 </form>
2898 <div id="doc">
2920 <div id="doc">
2899 <h1>Date Formats</h1>
2921 <h1>Date Formats</h1>
2900 <p>
2922 <p>
2901 Some commands allow the user to specify a date, e.g.:
2923 Some commands allow the user to specify a date, e.g.:
2902 </p>
2924 </p>
2903 <ul>
2925 <ul>
2904 <li> backout, commit, import, tag: Specify the commit date.
2926 <li> backout, commit, import, tag: Specify the commit date.
2905 <li> log, revert, update: Select revision(s) by date.
2927 <li> log, revert, update: Select revision(s) by date.
2906 </ul>
2928 </ul>
2907 <p>
2929 <p>
2908 Many date formats are valid. Here are some examples:
2930 Many date formats are valid. Here are some examples:
2909 </p>
2931 </p>
2910 <ul>
2932 <ul>
2911 <li> &quot;Wed Dec 6 13:18:29 2006&quot; (local timezone assumed)
2933 <li> &quot;Wed Dec 6 13:18:29 2006&quot; (local timezone assumed)
2912 <li> &quot;Dec 6 13:18 -0600&quot; (year assumed, time offset provided)
2934 <li> &quot;Dec 6 13:18 -0600&quot; (year assumed, time offset provided)
2913 <li> &quot;Dec 6 13:18 UTC&quot; (UTC and GMT are aliases for +0000)
2935 <li> &quot;Dec 6 13:18 UTC&quot; (UTC and GMT are aliases for +0000)
2914 <li> &quot;Dec 6&quot; (midnight)
2936 <li> &quot;Dec 6&quot; (midnight)
2915 <li> &quot;13:18&quot; (today assumed)
2937 <li> &quot;13:18&quot; (today assumed)
2916 <li> &quot;3:39&quot; (3:39AM assumed)
2938 <li> &quot;3:39&quot; (3:39AM assumed)
2917 <li> &quot;3:39pm&quot; (15:39)
2939 <li> &quot;3:39pm&quot; (15:39)
2918 <li> &quot;2006-12-06 13:18:29&quot; (ISO 8601 format)
2940 <li> &quot;2006-12-06 13:18:29&quot; (ISO 8601 format)
2919 <li> &quot;2006-12-6 13:18&quot;
2941 <li> &quot;2006-12-6 13:18&quot;
2920 <li> &quot;2006-12-6&quot;
2942 <li> &quot;2006-12-6&quot;
2921 <li> &quot;12-6&quot;
2943 <li> &quot;12-6&quot;
2922 <li> &quot;12/6&quot;
2944 <li> &quot;12/6&quot;
2923 <li> &quot;12/6/6&quot; (Dec 6 2006)
2945 <li> &quot;12/6/6&quot; (Dec 6 2006)
2924 <li> &quot;today&quot; (midnight)
2946 <li> &quot;today&quot; (midnight)
2925 <li> &quot;yesterday&quot; (midnight)
2947 <li> &quot;yesterday&quot; (midnight)
2926 <li> &quot;now&quot; - right now
2948 <li> &quot;now&quot; - right now
2927 </ul>
2949 </ul>
2928 <p>
2950 <p>
2929 Lastly, there is Mercurial's internal format:
2951 Lastly, there is Mercurial's internal format:
2930 </p>
2952 </p>
2931 <ul>
2953 <ul>
2932 <li> &quot;1165411109 0&quot; (Wed Dec 6 13:18:29 2006 UTC)
2954 <li> &quot;1165411109 0&quot; (Wed Dec 6 13:18:29 2006 UTC)
2933 </ul>
2955 </ul>
2934 <p>
2956 <p>
2935 This is the internal representation format for dates. The first number
2957 This is the internal representation format for dates. The first number
2936 is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
2958 is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
2937 second is the offset of the local timezone, in seconds west of UTC
2959 second is the offset of the local timezone, in seconds west of UTC
2938 (negative if the timezone is east of UTC).
2960 (negative if the timezone is east of UTC).
2939 </p>
2961 </p>
2940 <p>
2962 <p>
2941 The log command also accepts date ranges:
2963 The log command also accepts date ranges:
2942 </p>
2964 </p>
2943 <ul>
2965 <ul>
2944 <li> &quot;&lt;DATE&quot; - at or before a given date/time
2966 <li> &quot;&lt;DATE&quot; - at or before a given date/time
2945 <li> &quot;&gt;DATE&quot; - on or after a given date/time
2967 <li> &quot;&gt;DATE&quot; - on or after a given date/time
2946 <li> &quot;DATE to DATE&quot; - a date range, inclusive
2968 <li> &quot;DATE to DATE&quot; - a date range, inclusive
2947 <li> &quot;-DAYS&quot; - within a given number of days of today
2969 <li> &quot;-DAYS&quot; - within a given number of days of today
2948 </ul>
2970 </ul>
2949
2971
2950 </div>
2972 </div>
2951 </div>
2973 </div>
2952 </div>
2974 </div>
2953
2975
2954
2976
2955
2977
2956 </body>
2978 </body>
2957 </html>
2979 </html>
2958
2980
2959
2981
2960 Sub-topic indexes rendered properly
2982 Sub-topic indexes rendered properly
2961
2983
2962 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals"
2984 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals"
2963 200 Script output follows
2985 200 Script output follows
2964
2986
2965 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2987 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2966 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2988 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2967 <head>
2989 <head>
2968 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2990 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2969 <meta name="robots" content="index, nofollow" />
2991 <meta name="robots" content="index, nofollow" />
2970 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2992 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2971 <script type="text/javascript" src="/static/mercurial.js"></script>
2993 <script type="text/javascript" src="/static/mercurial.js"></script>
2972
2994
2973 <title>Help: internals</title>
2995 <title>Help: internals</title>
2974 </head>
2996 </head>
2975 <body>
2997 <body>
2976
2998
2977 <div class="container">
2999 <div class="container">
2978 <div class="menu">
3000 <div class="menu">
2979 <div class="logo">
3001 <div class="logo">
2980 <a href="https://mercurial-scm.org/">
3002 <a href="https://mercurial-scm.org/">
2981 <img src="/static/hglogo.png" alt="mercurial" /></a>
3003 <img src="/static/hglogo.png" alt="mercurial" /></a>
2982 </div>
3004 </div>
2983 <ul>
3005 <ul>
2984 <li><a href="/shortlog">log</a></li>
3006 <li><a href="/shortlog">log</a></li>
2985 <li><a href="/graph">graph</a></li>
3007 <li><a href="/graph">graph</a></li>
2986 <li><a href="/tags">tags</a></li>
3008 <li><a href="/tags">tags</a></li>
2987 <li><a href="/bookmarks">bookmarks</a></li>
3009 <li><a href="/bookmarks">bookmarks</a></li>
2988 <li><a href="/branches">branches</a></li>
3010 <li><a href="/branches">branches</a></li>
2989 </ul>
3011 </ul>
2990 <ul>
3012 <ul>
2991 <li><a href="/help">help</a></li>
3013 <li><a href="/help">help</a></li>
2992 </ul>
3014 </ul>
2993 </div>
3015 </div>
2994
3016
2995 <div class="main">
3017 <div class="main">
2996 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3018 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2997
3019
2998 <form class="search" action="/log">
3020 <form class="search" action="/log">
2999
3021
3000 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3022 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3001 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3023 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3002 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3024 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3003 </form>
3025 </form>
3004 <table class="bigtable">
3026 <table class="bigtable">
3005 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
3027 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
3006
3028
3007 <tr><td>
3029 <tr><td>
3008 <a href="/help/internals.bundles">
3030 <a href="/help/internals.bundles">
3009 bundles
3031 bundles
3010 </a>
3032 </a>
3011 </td><td>
3033 </td><td>
3012 Bundles
3034 Bundles
3013 </td></tr>
3035 </td></tr>
3014 <tr><td>
3036 <tr><td>
3015 <a href="/help/internals.censor">
3037 <a href="/help/internals.censor">
3016 censor
3038 censor
3017 </a>
3039 </a>
3018 </td><td>
3040 </td><td>
3019 Censor
3041 Censor
3020 </td></tr>
3042 </td></tr>
3021 <tr><td>
3043 <tr><td>
3022 <a href="/help/internals.changegroups">
3044 <a href="/help/internals.changegroups">
3023 changegroups
3045 changegroups
3024 </a>
3046 </a>
3025 </td><td>
3047 </td><td>
3026 Changegroups
3048 Changegroups
3027 </td></tr>
3049 </td></tr>
3028 <tr><td>
3050 <tr><td>
3029 <a href="/help/internals.requirements">
3051 <a href="/help/internals.requirements">
3030 requirements
3052 requirements
3031 </a>
3053 </a>
3032 </td><td>
3054 </td><td>
3033 Repository Requirements
3055 Repository Requirements
3034 </td></tr>
3056 </td></tr>
3035 <tr><td>
3057 <tr><td>
3036 <a href="/help/internals.revlogs">
3058 <a href="/help/internals.revlogs">
3037 revlogs
3059 revlogs
3038 </a>
3060 </a>
3039 </td><td>
3061 </td><td>
3040 Revision Logs
3062 Revision Logs
3041 </td></tr>
3063 </td></tr>
3042 <tr><td>
3064 <tr><td>
3043 <a href="/help/internals.wireprotocol">
3065 <a href="/help/internals.wireprotocol">
3044 wireprotocol
3066 wireprotocol
3045 </a>
3067 </a>
3046 </td><td>
3068 </td><td>
3047 Wire Protocol
3069 Wire Protocol
3048 </td></tr>
3070 </td></tr>
3049
3071
3050
3072
3051
3073
3052
3074
3053
3075
3054 </table>
3076 </table>
3055 </div>
3077 </div>
3056 </div>
3078 </div>
3057
3079
3058
3080
3059
3081
3060 </body>
3082 </body>
3061 </html>
3083 </html>
3062
3084
3063
3085
3064 Sub-topic topics rendered properly
3086 Sub-topic topics rendered properly
3065
3087
3066 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups"
3088 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups"
3067 200 Script output follows
3089 200 Script output follows
3068
3090
3069 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3091 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3070 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3092 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3071 <head>
3093 <head>
3072 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3094 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3073 <meta name="robots" content="index, nofollow" />
3095 <meta name="robots" content="index, nofollow" />
3074 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3096 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3075 <script type="text/javascript" src="/static/mercurial.js"></script>
3097 <script type="text/javascript" src="/static/mercurial.js"></script>
3076
3098
3077 <title>Help: internals.changegroups</title>
3099 <title>Help: internals.changegroups</title>
3078 </head>
3100 </head>
3079 <body>
3101 <body>
3080
3102
3081 <div class="container">
3103 <div class="container">
3082 <div class="menu">
3104 <div class="menu">
3083 <div class="logo">
3105 <div class="logo">
3084 <a href="https://mercurial-scm.org/">
3106 <a href="https://mercurial-scm.org/">
3085 <img src="/static/hglogo.png" alt="mercurial" /></a>
3107 <img src="/static/hglogo.png" alt="mercurial" /></a>
3086 </div>
3108 </div>
3087 <ul>
3109 <ul>
3088 <li><a href="/shortlog">log</a></li>
3110 <li><a href="/shortlog">log</a></li>
3089 <li><a href="/graph">graph</a></li>
3111 <li><a href="/graph">graph</a></li>
3090 <li><a href="/tags">tags</a></li>
3112 <li><a href="/tags">tags</a></li>
3091 <li><a href="/bookmarks">bookmarks</a></li>
3113 <li><a href="/bookmarks">bookmarks</a></li>
3092 <li><a href="/branches">branches</a></li>
3114 <li><a href="/branches">branches</a></li>
3093 </ul>
3115 </ul>
3094 <ul>
3116 <ul>
3095 <li class="active"><a href="/help">help</a></li>
3117 <li class="active"><a href="/help">help</a></li>
3096 </ul>
3118 </ul>
3097 </div>
3119 </div>
3098
3120
3099 <div class="main">
3121 <div class="main">
3100 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3122 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3101 <h3>Help: internals.changegroups</h3>
3123 <h3>Help: internals.changegroups</h3>
3102
3124
3103 <form class="search" action="/log">
3125 <form class="search" action="/log">
3104
3126
3105 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3127 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3106 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3128 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3107 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3129 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3108 </form>
3130 </form>
3109 <div id="doc">
3131 <div id="doc">
3110 <h1>Changegroups</h1>
3132 <h1>Changegroups</h1>
3111 <p>
3133 <p>
3112 Changegroups are representations of repository revlog data, specifically
3134 Changegroups are representations of repository revlog data, specifically
3113 the changelog data, root/flat manifest data, treemanifest data, and
3135 the changelog data, root/flat manifest data, treemanifest data, and
3114 filelogs.
3136 filelogs.
3115 </p>
3137 </p>
3116 <p>
3138 <p>
3117 There are 3 versions of changegroups: &quot;1&quot;, &quot;2&quot;, and &quot;3&quot;. From a
3139 There are 3 versions of changegroups: &quot;1&quot;, &quot;2&quot;, and &quot;3&quot;. From a
3118 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with the
3140 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with the
3119 only difference being an additional item in the *delta header*. Version
3141 only difference being an additional item in the *delta header*. Version
3120 &quot;3&quot; adds support for revlog flags in the *delta header* and optionally
3142 &quot;3&quot; adds support for revlog flags in the *delta header* and optionally
3121 exchanging treemanifests (enabled by setting an option on the
3143 exchanging treemanifests (enabled by setting an option on the
3122 &quot;changegroup&quot; part in the bundle2).
3144 &quot;changegroup&quot; part in the bundle2).
3123 </p>
3145 </p>
3124 <p>
3146 <p>
3125 Changegroups when not exchanging treemanifests consist of 3 logical
3147 Changegroups when not exchanging treemanifests consist of 3 logical
3126 segments:
3148 segments:
3127 </p>
3149 </p>
3128 <pre>
3150 <pre>
3129 +---------------------------------+
3151 +---------------------------------+
3130 | | | |
3152 | | | |
3131 | changeset | manifest | filelogs |
3153 | changeset | manifest | filelogs |
3132 | | | |
3154 | | | |
3133 | | | |
3155 | | | |
3134 +---------------------------------+
3156 +---------------------------------+
3135 </pre>
3157 </pre>
3136 <p>
3158 <p>
3137 When exchanging treemanifests, there are 4 logical segments:
3159 When exchanging treemanifests, there are 4 logical segments:
3138 </p>
3160 </p>
3139 <pre>
3161 <pre>
3140 +-------------------------------------------------+
3162 +-------------------------------------------------+
3141 | | | | |
3163 | | | | |
3142 | changeset | root | treemanifests | filelogs |
3164 | changeset | root | treemanifests | filelogs |
3143 | | manifest | | |
3165 | | manifest | | |
3144 | | | | |
3166 | | | | |
3145 +-------------------------------------------------+
3167 +-------------------------------------------------+
3146 </pre>
3168 </pre>
3147 <p>
3169 <p>
3148 The principle building block of each segment is a *chunk*. A *chunk*
3170 The principle building block of each segment is a *chunk*. A *chunk*
3149 is a framed piece of data:
3171 is a framed piece of data:
3150 </p>
3172 </p>
3151 <pre>
3173 <pre>
3152 +---------------------------------------+
3174 +---------------------------------------+
3153 | | |
3175 | | |
3154 | length | data |
3176 | length | data |
3155 | (4 bytes) | (&lt;length - 4&gt; bytes) |
3177 | (4 bytes) | (&lt;length - 4&gt; bytes) |
3156 | | |
3178 | | |
3157 +---------------------------------------+
3179 +---------------------------------------+
3158 </pre>
3180 </pre>
3159 <p>
3181 <p>
3160 All integers are big-endian signed integers. Each chunk starts with a 32-bit
3182 All integers are big-endian signed integers. Each chunk starts with a 32-bit
3161 integer indicating the length of the entire chunk (including the length field
3183 integer indicating the length of the entire chunk (including the length field
3162 itself).
3184 itself).
3163 </p>
3185 </p>
3164 <p>
3186 <p>
3165 There is a special case chunk that has a value of 0 for the length
3187 There is a special case chunk that has a value of 0 for the length
3166 (&quot;0x00000000&quot;). We call this an *empty chunk*.
3188 (&quot;0x00000000&quot;). We call this an *empty chunk*.
3167 </p>
3189 </p>
3168 <h2>Delta Groups</h2>
3190 <h2>Delta Groups</h2>
3169 <p>
3191 <p>
3170 A *delta group* expresses the content of a revlog as a series of deltas,
3192 A *delta group* expresses the content of a revlog as a series of deltas,
3171 or patches against previous revisions.
3193 or patches against previous revisions.
3172 </p>
3194 </p>
3173 <p>
3195 <p>
3174 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3196 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3175 to signal the end of the delta group:
3197 to signal the end of the delta group:
3176 </p>
3198 </p>
3177 <pre>
3199 <pre>
3178 +------------------------------------------------------------------------+
3200 +------------------------------------------------------------------------+
3179 | | | | | |
3201 | | | | | |
3180 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3202 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3181 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
3203 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
3182 | | | | | |
3204 | | | | | |
3183 +------------------------------------------------------------------------+
3205 +------------------------------------------------------------------------+
3184 </pre>
3206 </pre>
3185 <p>
3207 <p>
3186 Each *chunk*'s data consists of the following:
3208 Each *chunk*'s data consists of the following:
3187 </p>
3209 </p>
3188 <pre>
3210 <pre>
3189 +---------------------------------------+
3211 +---------------------------------------+
3190 | | |
3212 | | |
3191 | delta header | delta data |
3213 | delta header | delta data |
3192 | (various by version) | (various) |
3214 | (various by version) | (various) |
3193 | | |
3215 | | |
3194 +---------------------------------------+
3216 +---------------------------------------+
3195 </pre>
3217 </pre>
3196 <p>
3218 <p>
3197 The *delta data* is a series of *delta*s that describe a diff from an existing
3219 The *delta data* is a series of *delta*s that describe a diff from an existing
3198 entry (either that the recipient already has, or previously specified in the
3220 entry (either that the recipient already has, or previously specified in the
3199 bundle/changegroup).
3221 bundle/changegroup).
3200 </p>
3222 </p>
3201 <p>
3223 <p>
3202 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, and
3224 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, and
3203 &quot;3&quot; of the changegroup format.
3225 &quot;3&quot; of the changegroup format.
3204 </p>
3226 </p>
3205 <p>
3227 <p>
3206 Version 1 (headerlen=80):
3228 Version 1 (headerlen=80):
3207 </p>
3229 </p>
3208 <pre>
3230 <pre>
3209 +------------------------------------------------------+
3231 +------------------------------------------------------+
3210 | | | | |
3232 | | | | |
3211 | node | p1 node | p2 node | link node |
3233 | node | p1 node | p2 node | link node |
3212 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3234 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3213 | | | | |
3235 | | | | |
3214 +------------------------------------------------------+
3236 +------------------------------------------------------+
3215 </pre>
3237 </pre>
3216 <p>
3238 <p>
3217 Version 2 (headerlen=100):
3239 Version 2 (headerlen=100):
3218 </p>
3240 </p>
3219 <pre>
3241 <pre>
3220 +------------------------------------------------------------------+
3242 +------------------------------------------------------------------+
3221 | | | | | |
3243 | | | | | |
3222 | node | p1 node | p2 node | base node | link node |
3244 | node | p1 node | p2 node | base node | link node |
3223 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3245 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3224 | | | | | |
3246 | | | | | |
3225 +------------------------------------------------------------------+
3247 +------------------------------------------------------------------+
3226 </pre>
3248 </pre>
3227 <p>
3249 <p>
3228 Version 3 (headerlen=102):
3250 Version 3 (headerlen=102):
3229 </p>
3251 </p>
3230 <pre>
3252 <pre>
3231 +------------------------------------------------------------------------------+
3253 +------------------------------------------------------------------------------+
3232 | | | | | | |
3254 | | | | | | |
3233 | node | p1 node | p2 node | base node | link node | flags |
3255 | node | p1 node | p2 node | base node | link node | flags |
3234 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3256 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3235 | | | | | | |
3257 | | | | | | |
3236 +------------------------------------------------------------------------------+
3258 +------------------------------------------------------------------------------+
3237 </pre>
3259 </pre>
3238 <p>
3260 <p>
3239 The *delta data* consists of &quot;chunklen - 4 - headerlen&quot; bytes, which contain a
3261 The *delta data* consists of &quot;chunklen - 4 - headerlen&quot; bytes, which contain a
3240 series of *delta*s, densely packed (no separators). These deltas describe a diff
3262 series of *delta*s, densely packed (no separators). These deltas describe a diff
3241 from an existing entry (either that the recipient already has, or previously
3263 from an existing entry (either that the recipient already has, or previously
3242 specified in the bundle/changegroup). The format is described more fully in
3264 specified in the bundle/changegroup). The format is described more fully in
3243 &quot;hg help internals.bdiff&quot;, but briefly:
3265 &quot;hg help internals.bdiff&quot;, but briefly:
3244 </p>
3266 </p>
3245 <pre>
3267 <pre>
3246 +---------------------------------------------------------------+
3268 +---------------------------------------------------------------+
3247 | | | | |
3269 | | | | |
3248 | start offset | end offset | new length | content |
3270 | start offset | end offset | new length | content |
3249 | (4 bytes) | (4 bytes) | (4 bytes) | (&lt;new length&gt; bytes) |
3271 | (4 bytes) | (4 bytes) | (4 bytes) | (&lt;new length&gt; bytes) |
3250 | | | | |
3272 | | | | |
3251 +---------------------------------------------------------------+
3273 +---------------------------------------------------------------+
3252 </pre>
3274 </pre>
3253 <p>
3275 <p>
3254 Please note that the length field in the delta data does *not* include itself.
3276 Please note that the length field in the delta data does *not* include itself.
3255 </p>
3277 </p>
3256 <p>
3278 <p>
3257 In version 1, the delta is always applied against the previous node from
3279 In version 1, the delta is always applied against the previous node from
3258 the changegroup or the first parent if this is the first entry in the
3280 the changegroup or the first parent if this is the first entry in the
3259 changegroup.
3281 changegroup.
3260 </p>
3282 </p>
3261 <p>
3283 <p>
3262 In version 2 and up, the delta base node is encoded in the entry in the
3284 In version 2 and up, the delta base node is encoded in the entry in the
3263 changegroup. This allows the delta to be expressed against any parent,
3285 changegroup. This allows the delta to be expressed against any parent,
3264 which can result in smaller deltas and more efficient encoding of data.
3286 which can result in smaller deltas and more efficient encoding of data.
3265 </p>
3287 </p>
3266 <h2>Changeset Segment</h2>
3288 <h2>Changeset Segment</h2>
3267 <p>
3289 <p>
3268 The *changeset segment* consists of a single *delta group* holding
3290 The *changeset segment* consists of a single *delta group* holding
3269 changelog data. The *empty chunk* at the end of the *delta group* denotes
3291 changelog data. The *empty chunk* at the end of the *delta group* denotes
3270 the boundary to the *manifest segment*.
3292 the boundary to the *manifest segment*.
3271 </p>
3293 </p>
3272 <h2>Manifest Segment</h2>
3294 <h2>Manifest Segment</h2>
3273 <p>
3295 <p>
3274 The *manifest segment* consists of a single *delta group* holding manifest
3296 The *manifest segment* consists of a single *delta group* holding manifest
3275 data. If treemanifests are in use, it contains only the manifest for the
3297 data. If treemanifests are in use, it contains only the manifest for the
3276 root directory of the repository. Otherwise, it contains the entire
3298 root directory of the repository. Otherwise, it contains the entire
3277 manifest data. The *empty chunk* at the end of the *delta group* denotes
3299 manifest data. The *empty chunk* at the end of the *delta group* denotes
3278 the boundary to the next segment (either the *treemanifests segment* or the
3300 the boundary to the next segment (either the *treemanifests segment* or the
3279 *filelogs segment*, depending on version and the request options).
3301 *filelogs segment*, depending on version and the request options).
3280 </p>
3302 </p>
3281 <h3>Treemanifests Segment</h3>
3303 <h3>Treemanifests Segment</h3>
3282 <p>
3304 <p>
3283 The *treemanifests segment* only exists in changegroup version &quot;3&quot;, and
3305 The *treemanifests segment* only exists in changegroup version &quot;3&quot;, and
3284 only if the 'treemanifest' param is part of the bundle2 changegroup part
3306 only if the 'treemanifest' param is part of the bundle2 changegroup part
3285 (it is not possible to use changegroup version 3 outside of bundle2).
3307 (it is not possible to use changegroup version 3 outside of bundle2).
3286 Aside from the filenames in the *treemanifests segment* containing a
3308 Aside from the filenames in the *treemanifests segment* containing a
3287 trailing &quot;/&quot; character, it behaves identically to the *filelogs segment*
3309 trailing &quot;/&quot; character, it behaves identically to the *filelogs segment*
3288 (see below). The final sub-segment is followed by an *empty chunk* (logically,
3310 (see below). The final sub-segment is followed by an *empty chunk* (logically,
3289 a sub-segment with filename size 0). This denotes the boundary to the
3311 a sub-segment with filename size 0). This denotes the boundary to the
3290 *filelogs segment*.
3312 *filelogs segment*.
3291 </p>
3313 </p>
3292 <h2>Filelogs Segment</h2>
3314 <h2>Filelogs Segment</h2>
3293 <p>
3315 <p>
3294 The *filelogs segment* consists of multiple sub-segments, each
3316 The *filelogs segment* consists of multiple sub-segments, each
3295 corresponding to an individual file whose data is being described:
3317 corresponding to an individual file whose data is being described:
3296 </p>
3318 </p>
3297 <pre>
3319 <pre>
3298 +--------------------------------------------------+
3320 +--------------------------------------------------+
3299 | | | | | |
3321 | | | | | |
3300 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
3322 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
3301 | | | | | (4 bytes) |
3323 | | | | | (4 bytes) |
3302 | | | | | |
3324 | | | | | |
3303 +--------------------------------------------------+
3325 +--------------------------------------------------+
3304 </pre>
3326 </pre>
3305 <p>
3327 <p>
3306 The final filelog sub-segment is followed by an *empty chunk* (logically,
3328 The final filelog sub-segment is followed by an *empty chunk* (logically,
3307 a sub-segment with filename size 0). This denotes the end of the segment
3329 a sub-segment with filename size 0). This denotes the end of the segment
3308 and of the overall changegroup.
3330 and of the overall changegroup.
3309 </p>
3331 </p>
3310 <p>
3332 <p>
3311 Each filelog sub-segment consists of the following:
3333 Each filelog sub-segment consists of the following:
3312 </p>
3334 </p>
3313 <pre>
3335 <pre>
3314 +------------------------------------------------------+
3336 +------------------------------------------------------+
3315 | | | |
3337 | | | |
3316 | filename length | filename | delta group |
3338 | filename length | filename | delta group |
3317 | (4 bytes) | (&lt;length - 4&gt; bytes) | (various) |
3339 | (4 bytes) | (&lt;length - 4&gt; bytes) | (various) |
3318 | | | |
3340 | | | |
3319 +------------------------------------------------------+
3341 +------------------------------------------------------+
3320 </pre>
3342 </pre>
3321 <p>
3343 <p>
3322 That is, a *chunk* consisting of the filename (not terminated or padded)
3344 That is, a *chunk* consisting of the filename (not terminated or padded)
3323 followed by N chunks constituting the *delta group* for this file. The
3345 followed by N chunks constituting the *delta group* for this file. The
3324 *empty chunk* at the end of each *delta group* denotes the boundary to the
3346 *empty chunk* at the end of each *delta group* denotes the boundary to the
3325 next filelog sub-segment.
3347 next filelog sub-segment.
3326 </p>
3348 </p>
3327
3349
3328 </div>
3350 </div>
3329 </div>
3351 </div>
3330 </div>
3352 </div>
3331
3353
3332
3354
3333
3355
3334 </body>
3356 </body>
3335 </html>
3357 </html>
3336
3358
3337
3359
3338 $ killdaemons.py
3360 $ killdaemons.py
3339
3361
3340 #endif
3362 #endif
General Comments 0
You need to be logged in to leave comments. Login now