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