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