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