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