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