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