test-help.t
3830 lines
| 116.9 KiB
| text/troff
|
Tads3Lexer
/ tests / test-help.t
|
r12328 | Short help: | ||
|
r12073 | |||
$ hg | ||||
Mercurial Distributed SCM | ||||
basic commands: | ||||
|
r16853 | add add the specified files on the next commit | ||
annotate show changeset information by line for each file | ||||
clone make a copy of an existing repository | ||||
commit commit the specified files or all outstanding changes | ||||
diff diff repository (or selected files) | ||||
export dump the header and diffs for one or more changesets | ||||
forget forget the specified files on the next commit | ||||
init create a new repository in the given directory | ||||
log show revision history of entire repository or files | ||||
|
r23400 | merge merge another revision into working directory | ||
|
r16853 | pull pull changes from the specified source | ||
push push changes to the specified destination | ||||
remove remove the specified files on the next commit | ||||
serve start stand-alone webserver | ||||
status show changed files in the working directory | ||||
summary summarize working directory state | ||||
update update working directory (or switch revisions) | ||||
|
r12073 | |||
|
r29974 | (use 'hg help' for the full list of commands or 'hg -v' for details) | ||
|
r12073 | |||
$ hg -q | ||||
|
r16853 | add add the specified files on the next commit | ||
annotate show changeset information by line for each file | ||||
clone make a copy of an existing repository | ||||
commit commit the specified files or all outstanding changes | ||||
diff diff repository (or selected files) | ||||
export dump the header and diffs for one or more changesets | ||||
forget forget the specified files on the next commit | ||||
init create a new repository in the given directory | ||||
log show revision history of entire repository or files | ||||
|
r23400 | merge merge another revision into working directory | ||
|
r16853 | pull pull changes from the specified source | ||
push push changes to the specified destination | ||||
remove remove the specified files on the next commit | ||||
serve start stand-alone webserver | ||||
status show changed files in the working directory | ||||
summary summarize working directory state | ||||
update update working directory (or switch revisions) | ||||
|
r12073 | |||
|
r37360 | Extra extensions will be printed in help output in a non-reliable order since | ||
the extension is unknown. | ||||
#if no-extraextensions | ||||
|
r12073 | $ hg help | ||
Mercurial Distributed SCM | ||||
list of commands: | ||||
|
r40329 | Repository creation: | ||
clone make a copy of an existing repository | ||||
init create a new repository in the given directory | ||||
Remote repository management: | ||||
incoming show new changesets found in source | ||||
outgoing show changesets not found in the destination | ||||
paths show aliases for remote repositories | ||||
pull pull changes from the specified source | ||||
push push changes to the specified destination | ||||
serve start stand-alone webserver | ||||
Change creation: | ||||
commit commit the specified files or all outstanding changes | ||||
Change manipulation: | ||||
|
r15862 | backout reverse effect of earlier changeset | ||
|
r40329 | graft copy changes from other branches onto the current branch | ||
merge merge another revision into working directory | ||||
Change organization: | ||||
|
r21762 | bookmarks create a new bookmark or list existing bookmarks | ||
|
r15862 | branch set or show the current branch name | ||
branches list repository named branches | ||||
|
r40329 | phase set or show the current phase name | ||
tag add one or more tags for the current or given revision | ||||
tags list repository tags | ||||
File content management: | ||||
annotate show changeset information by line for each file | ||||
|
r15862 | cat output the current or given revision of files | ||
copy mark files as copied for the next commit | ||||
diff diff repository (or selected files) | ||||
|
r40329 | grep search revision history for a pattern in specified files | ||
Change navigation: | ||||
bisect subdivision search of changesets | ||||
heads show branch heads | ||||
identify identify the working directory or specified revision | ||||
log show revision history of entire repository or files | ||||
Working directory management: | ||||
add add the specified files on the next commit | ||||
addremove add all new files, delete all missing files | ||||
|
r22423 | files list tracked files | ||
|
r15862 | forget forget the specified files on the next commit | ||
remove remove the specified files on the next commit | ||||
rename rename files; equivalent of copy + remove | ||||
resolve redo merges or set/view the merge status of files | ||||
revert restore files to their checkout state | ||||
root print the root (top) of the current working directory | ||||
status show changed files in the working directory | ||||
summary summarize working directory state | ||||
|
r40329 | update update working directory (or switch revisions) | ||
Change import/export: | ||||
archive create an unversioned archive of a repository revision | ||||
bundle create a bundle file | ||||
export dump the header and diffs for one or more changesets | ||||
import import an ordered set of patches | ||||
|
r31795 | unbundle apply one or more bundle files | ||
|
r40329 | |||
Repository maintenance: | ||||
manifest output the current or given revision of the project manifest | ||||
recover roll back an interrupted transaction | ||||
|
r15862 | verify verify the integrity of the repository | ||
|
r40329 | |||
Help: | ||||
config show combined config settings from all hgrc files | ||||
help show help for a given topic or a help overview | ||||
|
r15862 | version output version and copyright information | ||
|
r12073 | |||
additional help topics: | ||||
|
r40330 | Mercurial identifiers: | ||
filesets Specifying File Sets | ||||
hgignore Syntax for Mercurial Ignore Files | ||||
patterns File Name Patterns | ||||
revisions Specifying Revisions | ||||
urls URL Paths | ||||
Mercurial output: | ||||
|
r31129 | color Colorizing Outputs | ||
|
r40330 | dates Date Formats | ||
diffs Diff Formats | ||||
templating Template Usage | ||||
Mercurial configuration: | ||||
|
r15862 | config Configuration Files | ||
environment Environment Variables | ||||
|
r16547 | extensions Using Additional Features | ||
|
r35036 | flags Command-line flags | ||
|
r15862 | hgweb Configuring hgweb | ||
merge-tools Merge Tools | ||||
|
r31061 | pager Pager Support | ||
|
r40330 | |||
Concepts: | ||||
bundlespec Bundle File Formats | ||||
glossary Glossary | ||||
|
r15996 | phases Working with Phases | ||
|
r40330 | subrepos Subrepositories | ||
Miscellaneous: | ||||
deprecated Deprecated Features | ||||
internals Technical implementation topics | ||||
|
r25881 | scripting Using Mercurial from scripts and automation | ||
|
r12073 | |||
|
r29974 | (use 'hg help -v' to show built-in aliases and global options) | ||
|
r12073 | |||
$ hg -q help | ||||
|
r40329 | Repository creation: | ||
clone make a copy of an existing repository | ||||
init create a new repository in the given directory | ||||
Remote repository management: | ||||
incoming show new changesets found in source | ||||
outgoing show changesets not found in the destination | ||||
paths show aliases for remote repositories | ||||
pull pull changes from the specified source | ||||
push push changes to the specified destination | ||||
serve start stand-alone webserver | ||||
Change creation: | ||||
commit commit the specified files or all outstanding changes | ||||
Change manipulation: | ||||
|
r15862 | backout reverse effect of earlier changeset | ||
|
r40329 | graft copy changes from other branches onto the current branch | ||
merge merge another revision into working directory | ||||
Change organization: | ||||
|
r21762 | bookmarks create a new bookmark or list existing bookmarks | ||
|
r15862 | branch set or show the current branch name | ||
branches list repository named branches | ||||
|
r40329 | phase set or show the current phase name | ||
tag add one or more tags for the current or given revision | ||||
tags list repository tags | ||||
File content management: | ||||
annotate show changeset information by line for each file | ||||
|
r15862 | cat output the current or given revision of files | ||
copy mark files as copied for the next commit | ||||
diff diff repository (or selected files) | ||||
|
r40329 | grep search revision history for a pattern in specified files | ||
Change navigation: | ||||
bisect subdivision search of changesets | ||||
heads show branch heads | ||||
identify identify the working directory or specified revision | ||||
log show revision history of entire repository or files | ||||
Working directory management: | ||||
add add the specified files on the next commit | ||||
addremove add all new files, delete all missing files | ||||
|
r22423 | files list tracked files | ||
|
r15862 | forget forget the specified files on the next commit | ||
remove remove the specified files on the next commit | ||||
rename rename files; equivalent of copy + remove | ||||
resolve redo merges or set/view the merge status of files | ||||
revert restore files to their checkout state | ||||
root print the root (top) of the current working directory | ||||
status show changed files in the working directory | ||||
summary summarize working directory state | ||||
|
r40329 | update update working directory (or switch revisions) | ||
Change import/export: | ||||
archive create an unversioned archive of a repository revision | ||||
bundle create a bundle file | ||||
export dump the header and diffs for one or more changesets | ||||
import import an ordered set of patches | ||||
|
r31795 | unbundle apply one or more bundle files | ||
|
r40329 | |||
Repository maintenance: | ||||
manifest output the current or given revision of the project manifest | ||||
recover roll back an interrupted transaction | ||||
|
r15862 | verify verify the integrity of the repository | ||
|
r40329 | |||
Help: | ||||
config show combined config settings from all hgrc files | ||||
help show help for a given topic or a help overview | ||||
|
r15862 | version output version and copyright information | ||
|
r12073 | |||
additional help topics: | ||||
|
r40330 | Mercurial identifiers: | ||
filesets Specifying File Sets | ||||
hgignore Syntax for Mercurial Ignore Files | ||||
patterns File Name Patterns | ||||
revisions Specifying Revisions | ||||
urls URL Paths | ||||
Mercurial output: | ||||
|
r31129 | color Colorizing Outputs | ||
|
r40330 | dates Date Formats | ||
diffs Diff Formats | ||||
templating Template Usage | ||||
Mercurial configuration: | ||||
|
r15862 | config Configuration Files | ||
environment Environment Variables | ||||
|
r16547 | extensions Using Additional Features | ||
|
r35036 | flags Command-line flags | ||
|
r15862 | hgweb Configuring hgweb | ||
merge-tools Merge Tools | ||||
|
r31061 | pager Pager Support | ||
|
r40330 | |||
Concepts: | ||||
bundlespec Bundle File Formats | ||||
glossary Glossary | ||||
|
r15996 | phases Working with Phases | ||
|
r40330 | subrepos Subrepositories | ||
Miscellaneous: | ||||
deprecated Deprecated Features | ||||
internals Technical implementation topics | ||||
|
r25881 | scripting Using Mercurial from scripts and automation | ||
|
r12073 | |||
|
r20581 | Test extension help: | ||
|
r20622 | $ hg help extensions --config extensions.rebase= --config extensions.children= | ||
|
r20581 | Using Additional Features | ||
""""""""""""""""""""""""" | ||||
Mercurial has the ability to add new features through the use of | ||||
extensions. Extensions may add new commands, add options to existing | ||||
commands, change the default behavior of commands, or implement hooks. | ||||
To enable the "foo" extension, either shipped with Mercurial or in the | ||||
Python search path, create an entry for it in your configuration file, | ||||
like this: | ||||
[extensions] | ||||
foo = | ||||
You may also specify the full path to an extension: | ||||
[extensions] | ||||
myfeature = ~/.hgext/myfeature.py | ||||
|
r27729 | See 'hg help config' for more information on configuration files. | ||
|
r20581 | |||
Extensions are not loaded by default for a variety of reasons: they can | ||||
increase startup overhead; they may be meant for advanced usage only; they | ||||
may provide potentially dangerous abilities (such as letting you destroy | ||||
or modify history); they might not be ready for prime time; or they may | ||||
alter some usual behaviors of stock Mercurial. It is thus up to the user | ||||
to activate extensions as needed. | ||||
To explicitly disable an extension enabled in a configuration file of | ||||
broader scope, prepend its path with !: | ||||
[extensions] | ||||
# disabling extension bar residing in /path/to/extension/bar.py | ||||
bar = !/path/to/extension/bar.py | ||||
# ditto, but no path was supplied for extension baz | ||||
baz = ! | ||||
enabled extensions: | ||||
children command to display child changesets (DEPRECATED) | ||||
rebase command to move sets of revisions to a different ancestor | ||||
disabled extensions: | ||||
acl hooks for controlling repository access | ||||
blackbox log repository events to a blackbox for debugging | ||||
bugzilla hooks for integrating with the Bugzilla bug tracker | ||||
|
r24347 | censor erase file content at a given revision | ||
|
r20581 | churn command to display statistics about repository history | ||
|
r26762 | clonebundles advertise pre-generated bundles to seed clones | ||
|
r40029 | closehead close arbitrary heads without checking them out first | ||
|
r20581 | convert import revisions from foreign VCS repositories into | ||
Mercurial | ||||
eol automatically manage newlines in repository files | ||||
extdiff command to allow external programs to compare revisions | ||||
factotum http authentication with factotum | ||||
|
r35732 | githelp try mapping git commands to Mercurial commands | ||
|
r20581 | gpg commands to sign and verify changesets | ||
hgk browse the repository in a graphical way | ||||
highlight syntax highlighting for hgweb (requires Pygments) | ||||
histedit interactive history editing | ||||
keyword expand keywords in tracked files | ||||
largefiles track large binary files | ||||
mq manage a stack of patches | ||||
notify hooks for sending email push notifications | ||||
patchbomb command to send changesets as (a series of) patch emails | ||||
purge command to delete untracked files from the working | ||||
directory | ||||
relink recreates hardlinks between repository clones | ||||
schemes extend schemes with shortcuts to repository swarms | ||||
share share a common history between several working directories | ||||
shelve save and restore changes to the working directory | ||||
|
r23139 | strip strip changesets and their descendants from history | ||
|
r20581 | transplant command to transplant changesets from another branch | ||
win32mbcs allow the use of MBCS paths with problematic encodings | ||||
zeroconf discover and advertise repositories on the local network | ||||
|
r26487 | |||
|
r37360 | #endif | ||
|
r36263 | Verify that deprecated extensions are included if --verbose: | ||
$ hg -v help extensions | grep children | ||||
children command to display child changesets (DEPRECATED) | ||||
|
r26487 | Verify that extension keywords appear in help templates | ||
$ hg help --config extensions.transplant= templating|grep transplant > /dev/null | ||||
|
r12073 | Test short command list with verbose option | ||
$ hg -v help shortlist | ||||
|
r15020 | Mercurial Distributed SCM | ||
|
r12073 | |||
basic commands: | ||||
|
r16853 | add add the specified files on the next commit | ||
annotate, blame | ||||
show changeset information by line for each file | ||||
clone make a copy of an existing repository | ||||
commit, ci commit the specified files or all outstanding changes | ||||
diff diff repository (or selected files) | ||||
export dump the header and diffs for one or more changesets | ||||
forget forget the specified files on the next commit | ||||
init create a new repository in the given directory | ||||
log, history show revision history of entire repository or files | ||||
|
r23400 | merge merge another revision into working directory | ||
|
r16853 | pull pull changes from the specified source | ||
push push changes to the specified destination | ||||
remove, rm remove the specified files on the next commit | ||||
serve start stand-alone webserver | ||||
status, st show changed files in the working directory | ||||
summary, sum summarize working directory state | ||||
update, up, checkout, co | ||||
update working directory (or switch revisions) | ||||
|
r12073 | |||
|
r22117 | global options ([+] can be repeated): | ||
|
r15145 | |||
-R --repository REPO repository root directory or name of overlay bundle | ||||
file | ||||
--cwd DIR change working directory | ||||
-y --noninteractive do not prompt, automatically pick the first choice for | ||||
all prompts | ||||
|
r30152 | -q --quiet suppress output | ||
-v --verbose enable additional output | ||||
|
r31104 | --color TYPE when to colorize (boolean, always, auto, never, or | ||
|
r31123 | debug) | ||
|
r15145 | --config CONFIG [+] set/override config option (use 'section.name=value') | ||
|
r30152 | --debug enable debugging output | ||
--debugger start debugger | ||||
|
r15145 | --encoding ENCODE set the charset encoding (default: ascii) | ||
--encodingmode MODE set the charset encoding mode (default: strict) | ||||
|
r30152 | --traceback always print a traceback on exception | ||
--time time how long the command takes | ||||
--profile print command execution profile | ||||
|
r15145 | --version output version information and exit | ||
-h --help display help and exit | ||||
|
r41046 | --hidden consider hidden changesets | ||
|
r30993 | --pager TYPE when to paginate (boolean, always, auto, or never) | ||
(default: auto) | ||||
|
r12073 | |||
|
r29974 | (use 'hg help' for the full list of commands) | ||
|
r12073 | |||
$ hg add -h | ||||
hg add [OPTION]... [FILE]... | ||||
add the specified files on the next commit | ||||
Schedule files to be version controlled and added to the repository. | ||||
The files will be added to the repository at the next commit. To undo an | ||||
|
r27729 | add before that, see 'hg forget'. | ||
|
r12073 | |||
|
r27424 | If no names are given, add all files to the repository (except files | ||
matching ".hgignore"). | ||||
|
r12073 | |||
Returns 0 if all files are successfully added. | ||||
|
r22117 | options ([+] can be repeated): | ||
|
r12073 | |||
|
r15145 | -I --include PATTERN [+] include names matching the given patterns | ||
-X --exclude PATTERN [+] exclude names matching the given patterns | ||||
|
r30152 | -S --subrepos recurse into subrepositories | ||
-n --dry-run do not perform actions, just print output | ||||
|
r12073 | |||
|
r22110 | (some details hidden, use --verbose to show complete help) | ||
|
r12073 | |||
Verbose help for add | ||||
$ hg add -hv | ||||
hg add [OPTION]... [FILE]... | ||||
add the specified files on the next commit | ||||
Schedule files to be version controlled and added to the repository. | ||||
The files will be added to the repository at the next commit. To undo an | ||||
|
r27729 | add before that, see 'hg forget'. | ||
|
r12073 | |||
|
r27424 | If no names are given, add all files to the repository (except files | ||
matching ".hgignore"). | ||||
|
r12073 | |||
|
r27143 | Examples: | ||
|
r27729 | - New (unknown) files are added automatically by 'hg add': | ||
|
r12073 | |||
|
r27143 | $ ls | ||
foo.c | ||||
$ hg status | ||||
? foo.c | ||||
$ hg add | ||||
adding foo.c | ||||
$ hg status | ||||
A foo.c | ||||
- Specific files to be added can be specified: | ||||
$ ls | ||||
bar.c foo.c | ||||
$ hg status | ||||
? bar.c | ||||
? foo.c | ||||
$ hg add bar.c | ||||
$ hg status | ||||
A bar.c | ||||
? foo.c | ||||
|
r12073 | |||
Returns 0 if all files are successfully added. | ||||
|
r22117 | options ([+] can be repeated): | ||
|
r12073 | |||
|
r15145 | -I --include PATTERN [+] include names matching the given patterns | ||
-X --exclude PATTERN [+] exclude names matching the given patterns | ||||
|
r30152 | -S --subrepos recurse into subrepositories | ||
-n --dry-run do not perform actions, just print output | ||||
|
r15145 | |||
|
r22117 | global options ([+] can be repeated): | ||
|
r15145 | |||
-R --repository REPO repository root directory or name of overlay bundle | ||||
file | ||||
--cwd DIR change working directory | ||||
-y --noninteractive do not prompt, automatically pick the first choice for | ||||
all prompts | ||||
|
r30152 | -q --quiet suppress output | ||
-v --verbose enable additional output | ||||
|
r31104 | --color TYPE when to colorize (boolean, always, auto, never, or | ||
|
r31123 | debug) | ||
|
r15145 | --config CONFIG [+] set/override config option (use 'section.name=value') | ||
|
r30152 | --debug enable debugging output | ||
--debugger start debugger | ||||
|
r15145 | --encoding ENCODE set the charset encoding (default: ascii) | ||
--encodingmode MODE set the charset encoding mode (default: strict) | ||||
|
r30152 | --traceback always print a traceback on exception | ||
--time time how long the command takes | ||||
--profile print command execution profile | ||||
|
r15145 | --version output version information and exit | ||
-h --help display help and exit | ||||
|
r41046 | --hidden consider hidden changesets | ||
|
r30993 | --pager TYPE when to paginate (boolean, always, auto, or never) | ||
(default: auto) | ||||
|
r12073 | |||
|
r29070 | Test the textwidth config option | ||
$ hg root -h --config ui.textwidth=50 | ||||
hg root | ||||
print the root (top) of the current working | ||||
directory | ||||
Print the root directory of the current | ||||
repository. | ||||
Returns 0 on success. | ||||
(some details hidden, use --verbose to show | ||||
complete help) | ||||
|
r12073 | Test help option with version option | ||
$ hg add -h --version | ||||
|
r12376 | Mercurial Distributed SCM (version *) (glob) | ||
|
r26421 | (see https://mercurial-scm.org for more information) | ||
|
r12073 | |||
|
r30907 | Copyright (C) 2005-* Matt Mackall and others (glob) | ||
|
r12073 | This is free software; see the source for copying conditions. There is NO | ||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||
$ hg add --skjdfks | ||||
hg add: option --skjdfks not recognized | ||||
hg add [OPTION]... [FILE]... | ||||
add the specified files on the next commit | ||||
|
r22117 | options ([+] can be repeated): | ||
|
r12073 | |||
|
r15145 | -I --include PATTERN [+] include names matching the given patterns | ||
-X --exclude PATTERN [+] exclude names matching the given patterns | ||||
|
r30152 | -S --subrepos recurse into subrepositories | ||
-n --dry-run do not perform actions, just print output | ||||
|
r12073 | |||
|
r29974 | (use 'hg add -h' to show more help) | ||
|
r12316 | [255] | ||
|
r12073 | |||
Test ambiguous command help | ||||
$ hg help ad | ||||
list of commands: | ||||
|
r16853 | add add the specified files on the next commit | ||
addremove add all new files, delete all missing files | ||||
|
r12073 | |||
|
r29974 | (use 'hg help -v ad' to show built-in aliases and global options) | ||
|
r12073 | |||
Test command without options | ||||
$ hg help verify | ||||
hg verify | ||||
verify the integrity of the repository | ||||
Verify the integrity of the current repository. | ||||
This will perform an extensive check of the repository's integrity, | ||||
validating the hashes and checksums of each entry in the changelog, | ||||
manifest, and tracked files, as well as the integrity of their crosslinks | ||||
and indices. | ||||
|
r26421 | Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more | ||
|
r17717 | information about recovery from corruption of the repository. | ||
|
r12073 | Returns 0 on success, 1 if errors are encountered. | ||
|
r22110 | (some details hidden, use --verbose to show complete help) | ||
|
r12073 | |||
$ hg help diff | ||||
hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... | ||||
diff repository (or selected files) | ||||
Show differences between revisions for the specified files. | ||||
Differences between files are shown using the unified diff format. | ||||
|
r12389 | Note: | ||
|
r27729 | 'hg diff' may generate unexpected results for merges, as it will | ||
|
r27476 | default to comparing against the working directory's first parent | ||
changeset if no revisions are specified. | ||||
|
r12073 | |||
When two revision arguments are given, then changes are shown between | ||||
those revisions. If only one revision is specified then that revision is | ||||
compared to the working directory, and, when no revisions are specified, | ||||
|
r27452 | the working directory files are compared to its first parent. | ||
|
r12073 | |||
Alternatively you can specify -c/--change with a revision to see the | ||||
changes in that changeset relative to its first parent. | ||||
Without the -a/--text option, diff will avoid generating diffs of files it | ||||
detects as binary. With -a, diff will generate a diff anyway, probably | ||||
with undesirable results. | ||||
Use the -g/--git option to generate diffs in the git extended diff format. | ||||
|
r27729 | For more information, read 'hg help diffs'. | ||
|
r12073 | |||
Returns 0 on success. | ||||
|
r22117 | options ([+] can be repeated): | ||
|
r12073 | |||
|
r30152 | -r --rev REV [+] revision | ||
-c --change REV change made by revision | ||||
-a --text treat all files as text | ||||
-g --git use git extended diff format | ||||
|
r31822 | --binary generate binary diffs in git mode (default) | ||
|
r30152 | --nodates omit dates from diff headers | ||
--noprefix omit a/ and b/ prefixes from filenames | ||||
-p --show-function show which function each change is in | ||||
--reverse produce a diff that undoes the changes | ||||
-w --ignore-all-space ignore white space when comparing lines | ||||
-b --ignore-space-change ignore changes in the amount of white space | ||||
-B --ignore-blank-lines ignore changes whose lines are all blank | ||||
|
r34015 | -Z --ignore-space-at-eol ignore changes in whitespace at EOL | ||
|
r30152 | -U --unified NUM number of lines of context to show | ||
--stat output diffstat-style summary of changes | ||||
--root DIR produce diffs relative to subdirectory | ||||
-I --include PATTERN [+] include names matching the given patterns | ||||
-X --exclude PATTERN [+] exclude names matching the given patterns | ||||
-S --subrepos recurse into subrepositories | ||||
|
r12073 | |||
|
r22110 | (some details hidden, use --verbose to show complete help) | ||
|
r12073 | |||
$ hg help status | ||||
hg status [OPTION]... [FILE]... | ||||
aliases: st | ||||
show changed files in the working directory | ||||
Show status of files in the repository. If names are given, only files | ||||
that match are shown. Files that are clean or ignored or the source of a | ||||
copy/move operation, are not listed unless -c/--clean, -i/--ignored, | ||||
-C/--copies or -A/--all are given. Unless options described with "show | ||||
only ..." are given, the options -mardu are used. | ||||
Option -q/--quiet hides untracked (unknown and ignored) files unless | ||||
explicitly requested with -u/--unknown or -i/--ignored. | ||||
|
r12390 | Note: | ||
|
r27729 | 'hg status' may appear to disagree with diff if permissions have | ||
|
r27476 | changed or a merge has occurred. The standard diff format does not | ||
report permission changes and diff only reports changes relative to one | ||||
merge parent. | ||||
|
r12073 | |||
If one revision is given, it is used as the base revision. If two | ||||
revisions are given, the differences between them are shown. The --change | ||||
option can also be used as a shortcut to list the changed files of a | ||||
revision from its first parent. | ||||
The codes used to show the status of files are: | ||||
M = modified | ||||
A = added | ||||
R = removed | ||||
C = clean | ||||
! = missing (deleted by non-hg command, but still tracked) | ||||
? = not tracked | ||||
I = ignored | ||||
|
r20660 | = origin of the previous file (with --copies) | ||
|
r12073 | |||
Returns 0 on success. | ||||
|
r22117 | options ([+] can be repeated): | ||
|
r12073 | |||
|
r30152 | -A --all show status of all files | ||
-m --modified show only modified files | ||||
-a --added show only added files | ||||
-r --removed show only removed files | ||||
-d --deleted show only deleted (but tracked) files | ||||
-c --clean show only files without changes | ||||
-u --unknown show only unknown (not tracked) files | ||||
-i --ignored show only ignored files | ||||
-n --no-status hide status prefix | ||||
-C --copies show source of copied files | ||||
-0 --print0 end filenames with NUL, for use with xargs | ||||
|
r15145 | --rev REV [+] show difference from revision | ||
--change REV list the changed files of a revision | ||||
-I --include PATTERN [+] include names matching the given patterns | ||||
-X --exclude PATTERN [+] exclude names matching the given patterns | ||||
|
r30152 | -S --subrepos recurse into subrepositories | ||
|
r39967 | -T --template TEMPLATE display with template | ||
|
r12073 | |||
|
r22110 | (some details hidden, use --verbose to show complete help) | ||
|
r12073 | |||
$ hg -q help status | ||||
hg status [OPTION]... [FILE]... | ||||
show changed files in the working directory | ||||
$ hg help foo | ||||
|
r21289 | abort: no such help topic: foo | ||
|
r29974 | (try 'hg help --keyword foo') | ||
|
r12316 | [255] | ||
|
r12073 | |||
$ hg skjdfks | ||||
hg: unknown command 'skjdfks' | ||||
|
r38823 | (use 'hg help' for a list of commands) | ||
|
r12316 | [255] | ||
|
r12073 | |||
|
r33326 | Typoed command gives suggestion | ||
$ hg puls | ||||
hg: unknown command 'puls' | ||||
(did you mean one of pull, push?) | ||||
[255] | ||||
Not enabled extension gets suggested | ||||
$ hg rebase | ||||
hg: unknown command 'rebase' | ||||
'rebase' is provided by the following extension: | ||||
rebase command to move sets of revisions to a different ancestor | ||||
(use 'hg help extensions' for information on enabling extensions) | ||||
[255] | ||||
Disabled extension gets suggested | ||||
$ hg --config extensions.rebase=! rebase | ||||
hg: unknown command 'rebase' | ||||
|
r33327 | 'rebase' is provided by the following extension: | ||
rebase command to move sets of revisions to a different ancestor | ||||
(use 'hg help extensions' for information on enabling extensions) | ||||
|
r33326 | [255] | ||
|
r20743 | |||
|
r26364 | Make sure that we don't run afoul of the help system thinking that | ||
this is a section and erroring out weirdly. | ||||
$ hg .log | ||||
hg: unknown command '.log' | ||||
|
r27623 | (did you mean log?) | ||
|
r26364 | [255] | ||
$ hg log. | ||||
hg: unknown command 'log.' | ||||
|
r27623 | (did you mean log?) | ||
|
r26364 | [255] | ||
$ hg pu.lh | ||||
hg: unknown command 'pu.lh' | ||||
(did you mean one of pull, push?) | ||||
[255] | ||||
|
r12073 | $ cat > helpext.py <<EOF | ||
> import os | ||||
|
r37109 | > from mercurial import commands, fancyopts, registrar | ||
|
r21254 | > | ||
|
r37109 | > def func(arg): | ||
> return '%sfoo' % arg | ||||
> class customopt(fancyopts.customopt): | ||||
> def newstate(self, oldstate, newparam, abort): | ||||
> return '%sbar' % oldstate | ||||
|
r21254 | > cmdtable = {} | ||
|
r32337 | > command = registrar.command(cmdtable) | ||
|
r12073 | > | ||
|
r32545 | > @command(b'nohelp', | ||
|
r37109 | > [(b'', b'longdesc', 3, b'x'*67), | ||
|
r32545 | > (b'n', b'', None, b'normal desc'), | ||
|
r37109 | > (b'', b'newline', b'', b'line1\nline2'), | ||
|
r40989 | > (b'', b'default-off', False, b'enable X'), | ||
> (b'', b'default-on', True, b'enable Y'), | ||||
|
r37109 | > (b'', b'callableopt', func, b'adds foo'), | ||
> (b'', b'customopt', customopt(''), b'adds bar'), | ||||
> (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')], | ||||
|
r32545 | > b'hg nohelp', | ||
|
r21773 | > norepo=True) | ||
|
r32545 | > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')]) | ||
> @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')]) | ||||
> @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')]) | ||||
|
r12073 | > def nohelp(ui, *args, **kwargs): | ||
> pass | ||||
> | ||||
|
r40451 | > @command(b'hashelp', [], b'hg hashelp', norepo=True) | ||
> def hashelp(ui, *args, **kwargs): | ||||
> """Extension command's help""" | ||||
> pass | ||||
> | ||||
|
r28828 | > def uisetup(ui): | ||
|
r32545 | > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext') | ||
> ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext') | ||||
|
r40450 | > ui.setconfig(b'alias', b'hgalias:doc', b'My doc', b'helpext') | ||
> ui.setconfig(b'alias', b'hgalias:category', b'navigation', b'helpext') | ||||
> ui.setconfig(b'alias', b'hgaliasnodoc', b'summary', b'helpext') | ||||
|
r28828 | > | ||
|
r12073 | > EOF | ||
$ echo '[extensions]' >> $HGRCPATH | ||||
$ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH | ||||
|
r28828 | Test for aliases | ||
|
r40450 | $ hg help | grep hgalias | ||
hgalias My doc | ||||
|
r28828 | $ hg help hgalias | ||
hg hgalias [--remote] | ||||
alias for: hg summary | ||||
|
r40450 | My doc | ||
defined by: helpext | ||||
options: | ||||
--remote check for push and pull | ||||
(some details hidden, use --verbose to show complete help) | ||||
$ hg help hgaliasnodoc | ||||
hg hgaliasnodoc [--remote] | ||||
alias for: hg summary | ||||
|
r28828 | summarize working directory state | ||
This generates a brief summary of the working directory state, including | ||||
parents, branch, commit status, phase and available updates. | ||||
With the --remote option, this will check the default paths for incoming | ||||
and outgoing changes. This can be time-consuming. | ||||
Returns 0 on success. | ||||
defined by: helpext | ||||
options: | ||||
|
r30152 | --remote check for push and pull | ||
|
r28828 | |||
(some details hidden, use --verbose to show complete help) | ||||
$ hg help shellalias | ||||
hg shellalias | ||||
|
r37152 | shell alias for: echo hi | ||
(no help text available) | ||||
|
r28828 | |||
defined by: helpext | ||||
(some details hidden, use --verbose to show complete help) | ||||
|
r12073 | Test command with no help text | ||
$ hg help nohelp | ||||
hg nohelp | ||||
(no help text available) | ||||
|
r20654 | options: | ||
|
r37109 | --longdesc VALUE | ||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | ||||
xxxxxxxxxxxxxxxxxxxxxxx (default: 3) | ||||
-n -- normal desc | ||||
--newline VALUE line1 line2 | ||||
|
r41046 | --default-off enable X | ||
|
r40991 | --[no-]default-on enable Y (default: on) | ||
|
r37109 | --callableopt VALUE adds foo | ||
--customopt VALUE adds bar | ||||
--customopt-withdefault VALUE adds bar (default: foo) | ||||
|
r20654 | |||
|
r22110 | (some details hidden, use --verbose to show complete help) | ||
|
r12073 | |||
|
r40451 | Test that default list of commands includes extension commands that have help, | ||
but not those that don't, except in verbose mode, when a keyword is passed, or | ||||
when help about the extension is requested. | ||||
#if no-extraextensions | ||||
$ hg help | grep hashelp | ||||
hashelp Extension command's help | ||||
$ hg help | grep nohelp | ||||
[1] | ||||
$ hg help -v | grep nohelp | ||||
nohelp (no help text available) | ||||
|
r16884 | $ hg help -k nohelp | ||
Commands: | ||||
nohelp hg nohelp | ||||
Extension Commands: | ||||
nohelp (no help text available) | ||||
|
r40451 | $ hg help helpext | ||
helpext extension - no help text available | ||||
|
r12073 | |||
list of commands: | ||||
|
r40451 | hashelp Extension command's help | ||
nohelp (no help text available) | ||||
(use 'hg help -v helpext' to show built-in aliases and global options) | ||||
|
r12073 | |||
|
r37360 | #endif | ||
|
r13888 | |||
|
r20822 | Test list of internal help commands | ||
$ hg help debug | ||||
debug commands (internal and unsupported): | ||||
debugancestor | ||||
find the ancestor revision of two revisions in a given index | ||||
|
r26758 | debugapplystreamclonebundle | ||
apply a stream clone bundle file | ||||
|
r20822 | debugbuilddag | ||
builds a repo with a given DAG from scratch in the current | ||||
empty repo | ||||
debugbundle lists the contents of a bundle | ||||
|
r34960 | debugcapabilities | ||
lists the capabilities of a remote peer | ||||
|
r20822 | debugcheckstate | ||
validate the correctness of the current dirstate | ||||
|
r31120 | debugcolor show available color, effects or style | ||
|
r20822 | debugcommands | ||
list all available commands and options | ||||
debugcomplete | ||||
returns the completion list associated with the given command | ||||
|
r26757 | debugcreatestreamclonebundle | ||
create a stream clone bundle file | ||||
|
r20822 | debugdag format the changelog or an index DAG as a concise textual | ||
description | ||||
debugdata dump the contents of a data file revision | ||||
debugdate parse and display a date | ||||
|
r27263 | debugdeltachain | ||
dump information about delta chains in a revlog | ||||
|
r20822 | debugdirstate | ||
show the contents of the current dirstate | ||||
debugdiscovery | ||||
runs the changeset discovery protocol in isolation | ||||
|
r35578 | debugdownload | ||
download a resource using Mercurial logic and config | ||||
|
r26351 | debugextensions | ||
show information about active extensions | ||||
|
r20822 | debugfileset parse and apply a fileset specification | ||
|
r35337 | debugformat display format information about the current repository | ||
|
r20822 | debugfsinfo show information detected about current filesystem | ||
debuggetbundle | ||||
retrieves a bundle from a repo | ||||
|
r27671 | debugignore display the combined ignore pattern and information about | ||
ignored files | ||||
|
r39318 | debugindex dump index data for a storage primitive | ||
|
r20822 | debugindexdot | ||
dump an index DAG as a graphviz dot file | ||||
|
r40016 | debugindexstats | ||
show stats related to the changelog index | ||||
|
r20822 | debuginstall test Mercurial installation | ||
debugknown test whether node ids are known to a repo | ||||
|
r22559 | debuglocks show or modify state of locks | ||
|
r38803 | debugmanifestfulltextcache | ||
show, clear or amend the contents of the manifest fulltext | ||||
cache | ||||
|
r26501 | debugmergestate | ||
print merge state | ||||
|
r23762 | debugnamecomplete | ||
complete "names" - tags, open branch names, bookmark names | ||||
|
r20822 | debugobsolete | ||
create arbitrary obsolete marker | ||||
|
r31080 | debugoptADV (no help text available) | ||
|
r20822 | debugoptDEP (no help text available) | ||
|
r24871 | debugoptEXP (no help text available) | ||
|
r20822 | debugpathcomplete | ||
complete part or all of a tracked path | ||||
|
r41656 | debugpathcopies | ||
show copies between two revisions | ||||
|
r35947 | debugpeer establish a connection to a peer repository | ||
|
r32256 | debugpickmergetool | ||
examine which merge tool is chosen for specified file | ||||
|
r20822 | debugpushkey access the pushkey key/value protocol | ||
debugpvec (no help text available) | ||||
debugrebuilddirstate | ||||
rebuild the dirstate as it would look like for the given | ||||
revision | ||||
|
r25652 | debugrebuildfncache | ||
rebuild the fncache file | ||||
|
r20822 | debugrename dump rename information | ||
debugrevlog show data and statistics about a revlog | ||||
|
r39318 | debugrevlogindex | ||
dump the contents of a revlog index | ||||
|
r20822 | debugrevspec parse and apply a revision specification | ||
|
r36544 | debugserve run a server with advanced settings | ||
|
r20822 | debugsetparents | ||
manually set the parents of the current working directory | ||||
|
r33493 | debugssl test a secure connection to a server | ||
|
r20822 | debugsub (no help text available) | ||
debugsuccessorssets | ||||
show set of successors for revision | ||||
|
r28548 | debugtemplate | ||
parse and apply a template | ||||
|
r36810 | debuguigetpass | ||
show prompt to type password | ||||
debuguiprompt | ||||
show plain prompt | ||||
|
r32265 | debugupdatecaches | ||
warm all known caches in the repository | ||||
|
r30774 | debugupgraderepo | ||
upgrade a repository to use different features | ||||
|
r20822 | debugwalk show how files match on given patterns | ||
r36972 | debugwhyunstable | |||
explain instabilities of a changeset | ||||
|
r20822 | debugwireargs | ||
(no help text available) | ||||
|
r36545 | debugwireproto | ||
send wire protocol commands to a server | ||||
|
r20822 | |||
|
r29974 | (use 'hg help -v debug' to show built-in aliases and global options) | ||
|
r20822 | |||
|
r27376 | internals topic renders index of available sub-topics | ||
$ hg help internals | ||||
Technical implementation topics | ||||
""""""""""""""""""""""""""""""" | ||||
|
r32076 | To access a subtopic, use "hg help internals.{subtopic-name}" | ||
|
r36469 | bundle2 Bundle2 | ||
|
r29747 | bundles Bundles | ||
|
r39446 | cbor CBOR | ||
|
r31293 | censor Censor | ||
|
r29747 | changegroups Changegroups | ||
|
r34953 | config Config Registrar | ||
|
r40631 | extensions Extension API | ||
|
r29747 | requirements Repository Requirements | ||
revlogs Revision Logs | ||||
|
r29859 | wireprotocol Wire Protocol | ||
|
r39650 | wireprotocolrpc | ||
Wire Protocol RPC | ||||
|
r39497 | wireprotocolv2 | ||
Wire Protocol Version 2 | ||||
|
r13888 | |||
|
r27379 | sub-topics can be accessed | ||
$ hg help internals.changegroups | ||||
|
r29747 | Changegroups | ||
"""""""""""" | ||||
|
r27379 | |||
Changegroups are representations of repository revlog data, specifically | ||||
|
r31213 | the changelog data, root/flat manifest data, treemanifest data, and | ||
filelogs. | ||||
|
r27379 | |||
|
r27434 | There are 3 versions of changegroups: "1", "2", and "3". From a high- | ||
level, versions "1" and "2" are almost exactly the same, with the only | ||||
|
r40083 | difference being an additional item in the *delta header*. Version "3" | ||
adds support for storage flags in the *delta header* and optionally | ||||
|
r31213 | exchanging treemanifests (enabled by setting an option on the | ||
"changegroup" part in the bundle2). | ||||
Changegroups when not exchanging treemanifests consist of 3 logical | ||||
segments: | ||||
|
r27379 | |||
+---------------------------------+ | ||||
| | | | | ||||
| changeset | manifest | filelogs | | ||||
| | | | | ||||
|
r31213 | | | | | | ||
|
r27379 | +---------------------------------+ | ||
|
r31213 | When exchanging treemanifests, there are 4 logical segments: | ||
+-------------------------------------------------+ | ||||
| | | | | | ||||
| changeset | root | treemanifests | filelogs | | ||||
| | manifest | | | | ||||
| | | | | | ||||
+-------------------------------------------------+ | ||||
|
r27379 | The principle building block of each segment is a *chunk*. A *chunk* is a | ||
framed piece of data: | ||||
+---------------------------------------+ | ||||
| | | | ||||
| length | data | | ||||
|
r31213 | | (4 bytes) | (<length - 4> bytes) | | ||
|
r27379 | | | | | ||
+---------------------------------------+ | ||||
|
r31213 | All integers are big-endian signed integers. Each chunk starts with a | ||
32-bit integer indicating the length of the entire chunk (including the | ||||
length field itself). | ||||
There is a special case chunk that has a value of 0 for the length | ||||
("0x00000000"). We call this an *empty chunk*. | ||||
|
r27379 | |||
Delta Groups | ||||
|
r29747 | ============ | ||
|
r27379 | |||
A *delta group* expresses the content of a revlog as a series of deltas, | ||||
or patches against previous revisions. | ||||
Delta groups consist of 0 or more *chunks* followed by the *empty chunk* | ||||
to signal the end of the delta group: | ||||
+------------------------------------------------------------------------+ | ||||
| | | | | | | ||||
| chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | | ||||
|
r31213 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | | ||
|
r27379 | | | | | | | | ||
|
r31213 | +------------------------------------------------------------------------+ | ||
|
r27379 | |||
Each *chunk*'s data consists of the following: | ||||
|
r31213 | +---------------------------------------+ | ||
| | | | ||||
| delta header | delta data | | ||||
| (various by version) | (various) | | ||||
| | | | ||||
+---------------------------------------+ | ||||
The *delta data* is a series of *delta*s that describe a diff from an | ||||
existing entry (either that the recipient already has, or previously | ||||
|
r32139 | specified in the bundle/changegroup). | ||
|
r27379 | |||
|
r27434 | The *delta header* is different between versions "1", "2", and "3" of the | ||
|
r27379 | changegroup format. | ||
|
r31213 | Version 1 (headerlen=80): | ||
|
r27379 | |||
+------------------------------------------------------+ | ||||
| | | | | | ||||
| node | p1 node | p2 node | link node | | ||||
| (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | ||||
| | | | | | ||||
+------------------------------------------------------+ | ||||
|
r31213 | Version 2 (headerlen=100): | ||
|
r27379 | |||
+------------------------------------------------------------------+ | ||||
| | | | | | | ||||
| node | p1 node | p2 node | base node | link node | | ||||
| (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | ||||
| | | | | | | ||||
+------------------------------------------------------------------+ | ||||
|
r31213 | Version 3 (headerlen=102): | ||
|
r27434 | |||
+------------------------------------------------------------------------------+ | ||||
| | | | | | | | ||||
|
r31213 | | node | p1 node | p2 node | base node | link node | flags | | ||
|
r27434 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | | ||
| | | | | | | | ||||
+------------------------------------------------------------------------------+ | ||||
|
r31213 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which | ||
contain a series of *delta*s, densely packed (no separators). These deltas | ||||
describe a diff from an existing entry (either that the recipient already | ||||
has, or previously specified in the bundle/changegroup). The format is | ||||
described more fully in "hg help internals.bdiff", but briefly: | ||||
|
r31287 | +---------------------------------------------------------------+ | ||
| | | | | | ||||
| start offset | end offset | new length | content | | ||||
| (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | | ||||
| | | | | | ||||
+---------------------------------------------------------------+ | ||||
|
r31213 | |||
Please note that the length field in the delta data does *not* include | ||||
itself. | ||||
|
r27379 | |||
In version 1, the delta is always applied against the previous node from | ||||
the changegroup or the first parent if this is the first entry in the | ||||
changegroup. | ||||
|
r31213 | In version 2 and up, the delta base node is encoded in the entry in the | ||
|
r27379 | changegroup. This allows the delta to be expressed against any parent, | ||
which can result in smaller deltas and more efficient encoding of data. | ||||
|
r40083 | The *flags* field holds bitwise flags affecting the processing of revision | ||
data. The following flags are defined: | ||||
32768 | ||||
Censored revision. The revision's fulltext has been replaced by censor | ||||
metadata. May only occur on file revisions. | ||||
16384 | ||||
Ellipsis revision. Revision hash does not match data (likely due to | ||||
rewritten parents). | ||||
8192 | ||||
Externally stored. The revision fulltext contains "key:value" "\n" | ||||
delimited metadata defining an object stored elsewhere. Used by the LFS | ||||
extension. | ||||
For historical reasons, the integer values are identical to revlog version | ||||
1 per-revision storage flags and correspond to bits being set in this | ||||
2-byte field. Bits were allocated starting from the most-significant bit, | ||||
hence the reverse ordering and allocation of these flags. | ||||
|
r27379 | Changeset Segment | ||
|
r29747 | ================= | ||
|
r27379 | |||
The *changeset segment* consists of a single *delta group* holding | ||||
|
r31213 | changelog data. The *empty chunk* at the end of the *delta group* denotes | ||
the boundary to the *manifest segment*. | ||||
|
r27379 | |||
Manifest Segment | ||||
|
r29747 | ================ | ||
|
r27379 | |||
The *manifest segment* consists of a single *delta group* holding manifest | ||||
|
r31213 | data. If treemanifests are in use, it contains only the manifest for the | ||
root directory of the repository. Otherwise, it contains the entire | ||||
manifest data. The *empty chunk* at the end of the *delta group* denotes | ||||
the boundary to the next segment (either the *treemanifests segment* or | ||||
the *filelogs segment*, depending on version and the request options). | ||||
Treemanifests Segment | ||||
--------------------- | ||||
The *treemanifests segment* only exists in changegroup version "3", and | ||||
only if the 'treemanifest' param is part of the bundle2 changegroup part | ||||
(it is not possible to use changegroup version 3 outside of bundle2). | ||||
Aside from the filenames in the *treemanifests segment* containing a | ||||
trailing "/" character, it behaves identically to the *filelogs segment* | ||||
(see below). The final sub-segment is followed by an *empty chunk* | ||||
(logically, a sub-segment with filename size 0). This denotes the boundary | ||||
to the *filelogs segment*. | ||||
|
r27379 | |||
Filelogs Segment | ||||
|
r29747 | ================ | ||
|
r27379 | |||
|
r31213 | The *filelogs segment* consists of multiple sub-segments, each | ||
|
r27379 | corresponding to an individual file whose data is being described: | ||
|
r31213 | +--------------------------------------------------+ | ||
| | | | | | | ||||
| filelog0 | filelog1 | filelog2 | ... | 0x0 | | ||||
| | | | | (4 bytes) | | ||||
| | | | | | | ||||
+--------------------------------------------------+ | ||||
The final filelog sub-segment is followed by an *empty chunk* (logically, | ||||
a sub-segment with filename size 0). This denotes the end of the segment | ||||
and of the overall changegroup. | ||||
|
r27379 | |||
Each filelog sub-segment consists of the following: | ||||
|
r31213 | +------------------------------------------------------+ | ||
| | | | | ||||
| filename length | filename | delta group | | ||||
| (4 bytes) | (<length - 4> bytes) | (various) | | ||||
| | | | | ||||
+------------------------------------------------------+ | ||||
|
r27379 | |||
That is, a *chunk* consisting of the filename (not terminated or padded) | ||||
|
r31213 | followed by N chunks constituting the *delta group* for this file. The | ||
*empty chunk* at the end of each *delta group* denotes the boundary to the | ||||
next filelog sub-segment. | ||||
|
r27379 | |||
|
r31080 | test advanced, deprecated and experimental options are hidden in command help | ||
$ hg help debugoptADV | ||||
hg debugoptADV | ||||
(no help text available) | ||||
options: | ||||
(some details hidden, use --verbose to show complete help) | ||||
|
r20743 | $ hg help debugoptDEP | ||
hg debugoptDEP | ||||
(no help text available) | ||||
options: | ||||
|
r22110 | (some details hidden, use --verbose to show complete help) | ||
|
r20743 | |||
|
r24871 | $ hg help debugoptEXP | ||
hg debugoptEXP | ||||
(no help text available) | ||||
options: | ||||
(some details hidden, use --verbose to show complete help) | ||||
|
r31080 | test advanced, deprecated and experimental options are shown with -v | ||
$ hg help -v debugoptADV | grep aopt | ||||
--aopt option is (ADVANCED) | ||||
|
r20743 | $ hg help -v debugoptDEP | grep dopt | ||
|
r30152 | --dopt option is (DEPRECATED) | ||
|
r24871 | $ hg help -v debugoptEXP | grep eopt | ||
|
r30152 | --eopt option is (EXPERIMENTAL) | ||
|
r20743 | |||
|
r21039 | #if gettext | ||
|
r20743 | test deprecated option is hidden with translation with untranslated description | ||
(use many globy for not failing on changed transaction) | ||||
$ LANGUAGE=sv hg help debugoptDEP | ||||
hg debugoptDEP | ||||
(*) (glob) | ||||
|
r22116 | options: | ||
|
r20743 | |||
|
r22110 | (some details hidden, use --verbose to show complete help) | ||
|
r21039 | #endif | ||
|
r20743 | |||
|
r21961 | Test commands that collide with topics (issue4240) | ||
$ hg config -hq | ||||
hg config [-u] [NAME]... | ||||
show combined config settings from all hgrc files | ||||
$ hg showconfig -hq | ||||
hg config [-u] [NAME]... | ||||
show combined config settings from all hgrc files | ||||
|
r12073 | Test a help topic | ||
|
r30768 | $ hg help dates | ||
Date Formats | ||||
"""""""""""" | ||||
Some commands allow the user to specify a date, e.g.: | ||||
- backout, commit, import, tag: Specify the commit date. | ||||
- log, revert, update: Select revision(s) by date. | ||||
Many date formats are valid. Here are some examples: | ||||
- "Wed Dec 6 13:18:29 2006" (local timezone assumed) | ||||
- "Dec 6 13:18 -0600" (year assumed, time offset provided) | ||||
- "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) | ||||
- "Dec 6" (midnight) | ||||
- "13:18" (today assumed) | ||||
- "3:39" (3:39AM assumed) | ||||
- "3:39pm" (15:39) | ||||
- "2006-12-06 13:18:29" (ISO 8601 format) | ||||
- "2006-12-6 13:18" | ||||
- "2006-12-6" | ||||
- "12-6" | ||||
- "12/6" | ||||
- "12/6/6" (Dec 6 2006) | ||||
- "today" (midnight) | ||||
- "yesterday" (midnight) | ||||
- "now" - right now | ||||
Lastly, there is Mercurial's internal format: | ||||
- "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) | ||||
This is the internal representation format for dates. The first number is | ||||
the number of seconds since the epoch (1970-01-01 00:00 UTC). The second | ||||
is the offset of the local timezone, in seconds west of UTC (negative if | ||||
the timezone is east of UTC). | ||||
The log command also accepts date ranges: | ||||
- "<DATE" - at or before a given date/time | ||||
- ">DATE" - on or after a given date/time | ||||
- "DATE to DATE" - a date range, inclusive | ||||
- "-DAYS" - within a given number of days of today | ||||
|
r12820 | |||
|
r26113 | Test repeated config section name | ||
$ hg help config.host | ||||
"http_proxy.host" | ||||
Host name and (optional) port of the proxy server, for example | ||||
"myproxy:8000". | ||||
"smtp.host" | ||||
Host name of mail server, e.g. "mail.example.com". | ||||
|
r39374 | |||
Test section name with dot | ||||
$ hg help config.ui.username | ||||
|
r39377 | "ui.username" | ||
The committer of a changeset created when running "commit". Typically | ||||
a person's name and email address, e.g. "Fred Widget | ||||
<fred@example.com>". Environment variables in the username are | ||||
expanded. | ||||
(default: "$EMAIL" or "username@hostname". If the username in hgrc is | ||||
empty, e.g. if the system admin set "username =" in the system hgrc, | ||||
it has to be specified manually or in a different hgrc file) | ||||
|
r39374 | |||
$ hg help config.annotate.git | ||||
|
r39375 | abort: help section not found: config.annotate.git | ||
[255] | ||||
|
r39374 | |||
$ hg help config.update.check | ||||
"commands.update.check" | ||||
Determines what level of checking 'hg update' will perform before | ||||
moving to a destination revision. Valid values are "abort", "none", | ||||
"linear", and "noconflict". "abort" always fails if the working | ||||
directory has uncommitted changes. "none" performs no checking, and | ||||
may result in a merge with uncommitted changes. "linear" allows any | ||||
update as long as it follows a straight line in the revision history, | ||||
and may trigger a merge with uncommitted changes. "noconflict" will | ||||
allow any update which would not trigger a merge with uncommitted | ||||
changes, if any are present. (default: "linear") | ||||
|
r39375 | $ hg help config.commands.update.check | ||
|
r39377 | "commands.update.check" | ||
Determines what level of checking 'hg update' will perform before | ||||
moving to a destination revision. Valid values are "abort", "none", | ||||
"linear", and "noconflict". "abort" always fails if the working | ||||
directory has uncommitted changes. "none" performs no checking, and | ||||
may result in a merge with uncommitted changes. "linear" allows any | ||||
update as long as it follows a straight line in the revision history, | ||||
and may trigger a merge with uncommitted changes. "noconflict" will | ||||
allow any update which would not trigger a merge with uncommitted | ||||
changes, if any are present. (default: "linear") | ||||
$ hg help config.ommands.update.check | ||||
abort: help section not found: config.ommands.update.check | ||||
|
r39375 | [255] | ||
|
r26170 | Unrelated trailing paragraphs shouldn't be included | ||
$ hg help config.extramsg | grep '^$' | ||||
|
r26159 | Test capitalized section name | ||
$ hg help scripting.HGPLAIN > /dev/null | ||||
|
r26157 | Help subsection: | ||
$ hg help config.charsets |grep "Email example:" > /dev/null | ||||
[1] | ||||
|
r26237 | Show nested definitions | ||
("profiling.type"[break]"ls"[break]"stat"[break]) | ||||
$ hg help config.type | egrep '^$'|wc -l | ||||
\s*3 (re) | ||||
|
r39377 | $ hg help config.profiling.type.ls | ||
"profiling.type.ls" | ||||
Use Python's built-in instrumenting profiler. This profiler works on | ||||
all platforms, but each line number it reports is the first line of | ||||
a function. This restriction makes it difficult to identify the | ||||
expensive parts of a non-trivial function. | ||||
|
r27614 | Separate sections from subsections | ||
$ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq | ||||
"format" | ||||
-------- | ||||
"usegeneraldelta" | ||||
"dotencode" | ||||
"usefncache" | ||||
"usestore" | ||||
|
r41524 | "sparse-revlog" | ||
|
r27614 | "profiling" | ||
----------- | ||||
"format" | ||||
"progress" | ||||
---------- | ||||
"format" | ||||
|
r26157 | Last item in help config.*: | ||
$ hg help config.`hg help config|grep '^ "'| \ | ||||
> tail -1|sed 's![ "]*!!g'`| \ | ||||
|
r29979 | > grep 'hg help -c config' > /dev/null | ||
|
r26157 | [1] | ||
note to use help -c for general hg help config: | ||||
|
r29979 | $ hg help config |grep 'hg help -c config' > /dev/null | ||
|
r26157 | |||
|
r13584 | Test templating help | ||
$ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' | ||||
|
r15861 | desc String. The text of the changeset description. | ||
diffstat String. Statistics of changes with the following format: | ||||
firstline Any text. Returns the first line of text. | ||||
nonempty Any text. Returns '(none)' if the string is empty. | ||||
|
r13584 | |||
|
r26415 | Test deprecated items | ||
$ hg help -v templating | grep currentbookmark | ||||
currentbookmark | ||||
$ hg help templating | (grep currentbookmark || true) | ||||
|
r12820 | Test help hooks | ||
$ cat > helphook1.py <<EOF | ||||
> from mercurial import help | ||||
> | ||||
|
r26414 | > def rewrite(ui, topic, doc): | ||
|
r40253 | > return doc + b'\nhelphook1\n' | ||
|
r12820 | > | ||
> def extsetup(ui): | ||||
|
r40253 | > help.addtopichook(b'revisions', rewrite) | ||
|
r12820 | > EOF | ||
$ cat > helphook2.py <<EOF | ||||
> from mercurial import help | ||||
> | ||||
|
r26414 | > def rewrite(ui, topic, doc): | ||
|
r40253 | > return doc + b'\nhelphook2\n' | ||
|
r12820 | > | ||
> def extsetup(ui): | ||||
|
r40253 | > help.addtopichook(b'revisions', rewrite) | ||
|
r12820 | > EOF | ||
$ echo '[extensions]' >> $HGRCPATH | ||||
$ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH | ||||
$ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH | ||||
$ hg help revsets | grep helphook | ||||
helphook1 | ||||
helphook2 | ||||
|
r16942 | |||
|
r27324 | help -c should only show debug --debug | ||
|
r27325 | $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$' | ||
|
r27324 | [1] | ||
help -c should only show deprecated for -v | ||||
|
r27325 | $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$' | ||
|
r27324 | [1] | ||
|
r27763 | Test -s / --system | ||
$ hg help config.files -s windows |grep 'etc/mercurial' | \ | ||||
> wc -l | sed -e 's/ //g' | ||||
0 | ||||
$ hg help config.files --system unix | grep 'USER' | \ | ||||
> wc -l | sed -e 's/ //g' | ||||
0 | ||||
|
r26238 | Test -e / -c / -k combinations | ||
|
r27386 | $ hg help -c|egrep '^[A-Z].*:|^ debug' | ||
|
r27325 | Commands: | ||
|
r27386 | $ hg help -e|egrep '^[A-Z].*:|^ debug' | ||
|
r27325 | Extensions: | ||
|
r27387 | $ hg help -k|egrep '^[A-Z].*:|^ debug' | ||
|
r27325 | Topics: | ||
Commands: | ||||
Extensions: | ||||
Extension Commands: | ||||
|
r27115 | $ hg help -c schemes | ||
abort: no such help topic: schemes | ||||
|
r29974 | (try 'hg help --keyword schemes') | ||
|
r26238 | [255] | ||
|
r27115 | $ hg help -e schemes |head -1 | ||
schemes extension - extend schemes with shortcuts to repository swarms | ||||
|
r26238 | $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):' | ||
Commands: | ||||
$ hg help -e -k a |egrep '^(Topics|Extensions|Commands):' | ||||
Extensions: | ||||
$ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):' | ||||
Extensions: | ||||
Commands: | ||||
$ hg help -c commit > /dev/null | ||||
$ hg help -e -c commit > /dev/null | ||||
|
r39255 | $ hg help -e commit | ||
abort: no such help topic: commit | ||||
(try 'hg help --keyword commit') | ||||
|
r26238 | [255] | ||
|
r16942 | Test keyword search help | ||
|
r19769 | $ cat > prefixedname.py <<EOF | ||
> '''matched against word "clone" | ||||
> ''' | ||||
> EOF | ||||
$ echo '[extensions]' >> $HGRCPATH | ||||
$ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH | ||||
|
r16942 | $ hg help -k clone | ||
Topics: | ||||
config Configuration Files | ||||
extensions Using Additional Features | ||||
glossary Glossary | ||||
phases Working with Phases | ||||
|
r17322 | subrepos Subrepositories | ||
|
r16942 | urls URL Paths | ||
Commands: | ||||
|
r27324 | bookmarks create a new bookmark or list existing bookmarks | ||
clone make a copy of an existing repository | ||||
paths show aliases for remote repositories | ||||
|
r37516 | pull pull changes from the specified source | ||
|
r27324 | update update working directory (or switch revisions) | ||
|
r16942 | |||
Extensions: | ||||
|
r27738 | clonebundles advertise pre-generated bundles to seed clones | ||
|
r36096 | narrow create clones which fetch history data for subset of files | ||
(EXPERIMENTAL) | ||||
|
r19769 | prefixedname matched against word "clone" | ||
relink recreates hardlinks between repository clones | ||||
|
r16942 | |||
Extension Commands: | ||||
qclone clone main and patch repository at same time | ||||
|
r21289 | Test unfound topic | ||
$ hg help nonexistingtopicthatwillneverexisteverever | ||||
abort: no such help topic: nonexistingtopicthatwillneverexisteverever | ||||
|
r29974 | (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever') | ||
|
r21289 | [255] | ||
|
r21288 | Test unfound keyword | ||
$ hg help --keyword nonexistingwordthatwillneverexisteverever | ||||
abort: no matches | ||||
|
r29974 | (try 'hg help' for a list of topics) | ||
|
r21288 | [255] | ||
|
r17837 | Test omit indicating for help | ||
$ cat > addverboseitems.py <<EOF | ||||
> '''extension to test omit indicating. | ||||
> | ||||
> This paragraph is never omitted (for extension) | ||||
> | ||||
> .. container:: verbose | ||||
> | ||||
> This paragraph is omitted, | ||||
|
r23612 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) | ||
|
r17837 | > | ||
> This paragraph is never omitted, too (for extension) | ||||
> ''' | ||||
|
r33961 | > from __future__ import absolute_import | ||
> from mercurial import commands, help | ||||
|
r40253 | > testtopic = b"""This paragraph is never omitted (for topic). | ||
|
r17837 | > | ||
> .. container:: verbose | ||||
> | ||||
> This paragraph is omitted, | ||||
|
r23612 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) | ||
|
r17837 | > | ||
> This paragraph is never omitted, too (for topic) | ||||
> """ | ||||
> def extsetup(ui): | ||||
|
r40253 | > help.helptable.append(([b"topic-containing-verbose"], | ||
> b"This is the topic to test omit indicating.", | ||||
|
r26413 | > lambda ui: testtopic)) | ||
|
r17837 | > EOF | ||
$ echo '[extensions]' >> $HGRCPATH | ||||
$ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH | ||||
$ hg help addverboseitems | ||||
addverboseitems extension - extension to test omit indicating. | ||||
This paragraph is never omitted (for extension) | ||||
This paragraph is never omitted, too (for extension) | ||||
|
r22114 | (some details hidden, use --verbose to show complete help) | ||
|
r17837 | |||
no commands defined | ||||
$ hg help -v addverboseitems | ||||
addverboseitems extension - extension to test omit indicating. | ||||
This paragraph is never omitted (for extension) | ||||
|
r27729 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for | ||
|
r23612 | extension) | ||
|
r17837 | |||
This paragraph is never omitted, too (for extension) | ||||
no commands defined | ||||
$ hg help topic-containing-verbose | ||||
This is the topic to test omit indicating. | ||||
|
r18748 | """""""""""""""""""""""""""""""""""""""""" | ||
|
r17837 | |||
This paragraph is never omitted (for topic). | ||||
This paragraph is never omitted, too (for topic) | ||||
|
r22114 | (some details hidden, use --verbose to show complete help) | ||
|
r17837 | $ hg help -v topic-containing-verbose | ||
This is the topic to test omit indicating. | ||||
|
r18748 | """""""""""""""""""""""""""""""""""""""""" | ||
|
r17837 | |||
This paragraph is never omitted (for topic). | ||||
|
r27729 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for | ||
|
r23612 | topic) | ||
|
r17837 | |||
This paragraph is never omitted, too (for topic) | ||||
|
r22587 | Test section lookup | ||
$ hg help revset.merge | ||||
"merge()" | ||||
Changeset is a merge changeset. | ||||
$ hg help glossary.dag | ||||
DAG | ||||
The repository of changesets of a distributed version control system | ||||
(DVCS) can be described as a directed acyclic graph (DAG), consisting | ||||
of nodes and edges, where nodes correspond to changesets and edges | ||||
imply a parent -> child relation. This graph can be visualized by | ||||
|
r27729 | graphical tools such as 'hg log --graph'. In Mercurial, the DAG is | ||
|
r22587 | limited by the requirement for children to have at most two parents. | ||
|
r22770 | |||
$ hg help hgrc.paths | ||||
"paths" | ||||
------- | ||||
|
r27266 | Assigns symbolic names and behavior to repositories. | ||
Options are symbolic names defining the URL or directory that is the | ||||
location of the repository. Example: | ||||
[paths] | ||||
my_server = https://example.com/my_repo | ||||
local_path = /home/me/repo | ||||
These symbolic names can be used from the command line. To pull from | ||||
|
r27729 | "my_server": 'hg pull my_server'. To push to "local_path": 'hg push | ||
local_path'. | ||||
|
r27266 | |||
Options containing colons (":") denote sub-options that can influence | ||||
behavior for that specific path. Example: | ||||
[paths] | ||||
my_server = https://example.com/my_path | ||||
my_server:pushurl = ssh://example.com/my_path | ||||
The following sub-options can be defined: | ||||
"pushurl" | ||||
The URL to use for push operations. If not defined, the location | ||||
defined by the path's main entry is used. | ||||
|
r29413 | "pushrev" | ||
A revset defining which revisions to push by default. | ||||
When 'hg push' is executed without a "-r" argument, the revset defined | ||||
by this sub-option is evaluated to determine what to push. | ||||
For example, a value of "." will push the working directory's revision | ||||
by default. | ||||
Revsets specifying bookmarks will not result in the bookmark being | ||||
pushed. | ||||
|
r27266 | The following special named paths exist: | ||
|
r22770 | |||
"default" | ||||
|
r27266 | The URL or directory to use when no source or remote is specified. | ||
|
r27729 | 'hg clone' will automatically define this path to the location the | ||
|
r27266 | repository was cloned from. | ||
|
r22770 | |||
"default-push" | ||||
|
r27729 | (deprecated) The URL or directory for the default 'hg push' location. | ||
|
r27266 | "default:pushurl" should be used instead. | ||
|
r22770 | |||
|
r22587 | $ hg help glossary.mcguffin | ||
|
r30878 | abort: help section not found: glossary.mcguffin | ||
|
r22587 | [255] | ||
|
r23122 | $ hg help glossary.mc.guffin | ||
|
r30878 | abort: help section not found: glossary.mc.guffin | ||
|
r23122 | [255] | ||
|
r25723 | $ hg help template.files | ||
files List of strings. All files modified, added, or removed by | ||||
this changeset. | ||||
|
r30008 | files(pattern) | ||
All files of the current changeset matching the pattern. See | ||||
'hg help patterns'. | ||||
|
r25723 | |||
|
r29155 | Test section lookup by translated message | ||
str.lower() instead of encoding.lower(str) on translated message might | ||||
make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z) | ||||
as the second or later byte of multi-byte character. | ||||
For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932) | ||||
contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this | ||||
replacement makes message meaningless. | ||||
This tests that section lookup by translated string isn't broken by | ||||
such str.lower(). | ||||
|
r39743 | $ "$PYTHON" <<EOF | ||
|
r29155 | > def escape(s): | ||
|
r40286 | > return b''.join(b'\\u%x' % ord(uc) for uc in s.decode('cp932')) | ||
|
r29155 | > # translation of "record" in ja_JP.cp932 | ||
|
r40286 | > upper = b"\x8bL\x98^" | ||
|
r29155 | > # str.lower()-ed section name should be treated as different one | ||
|
r40286 | > lower = b"\x8bl\x98^" | ||
> with open('ambiguous.py', 'wb') as fp: | ||||
> fp.write(b"""# ambiguous section names in ja_JP.cp932 | ||||
|
r29155 | > u'''summary of extension | ||
> | ||||
> %s | ||||
> ---- | ||||
> | ||||
> Upper name should show only this message | ||||
> | ||||
> %s | ||||
> ---- | ||||
> | ||||
> Lower name should show only this message | ||||
> | ||||
> subsequent section | ||||
> ------------------ | ||||
> | ||||
|
r29979 | > This should be hidden at 'hg help ambiguous' with section name. | ||
|
r29155 | > ''' | ||
> """ % (escape(upper), escape(lower))) | ||||
> EOF | ||||
$ cat >> $HGRCPATH <<EOF | ||||
> [extensions] | ||||
> ambiguous = ./ambiguous.py | ||||
> EOF | ||||
|
r39743 | $ "$PYTHON" <<EOF | sh | ||
|
r40286 | > from mercurial import pycompat | ||
> upper = b"\x8bL\x98^" | ||||
> pycompat.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % upper) | ||||
|
r29155 | > EOF | ||
\x8bL\x98^ (esc) | ||||
---- | ||||
Upper name should show only this message | ||||
|
r39743 | $ "$PYTHON" <<EOF | sh | ||
|
r40286 | > from mercurial import pycompat | ||
> lower = b"\x8bl\x98^" | ||||
> pycompat.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % lower) | ||||
|
r29155 | > EOF | ||
\x8bl\x98^ (esc) | ||||
---- | ||||
Lower name should show only this message | ||||
$ cat >> $HGRCPATH <<EOF | ||||
> [extensions] | ||||
> ambiguous = ! | ||||
> EOF | ||||
|
r29895 | Show help content of disabled extensions | ||
$ cat >> $HGRCPATH <<EOF | ||||
> [extensions] | ||||
> ambiguous = !./ambiguous.py | ||||
> EOF | ||||
$ hg help -e ambiguous | ||||
ambiguous extension - (no help text available) | ||||
|
r29974 | (use 'hg help extensions' for information on enabling extensions) | ||
|
r29895 | |||
|
r24100 | Test dynamic list of merge tools only shows up once | ||
$ hg help merge-tools | ||||
Merge Tools | ||||
""""""""""" | ||||
To merge files Mercurial uses merge tools. | ||||
A merge tool combines two different versions of a file into a merged file. | ||||
Merge tools are given the two files and the greatest common ancestor of | ||||
the two file versions, so they can determine the changes made on both | ||||
branches. | ||||
|
r27729 | Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg | ||
backout' and in several extensions. | ||||
|
r24100 | |||
Usually, the merge tool tries to automatically reconcile the files by | ||||
combining all non-overlapping changes that occurred separately in the two | ||||
different evolutions of the same initial base file. Furthermore, some | ||||
interactive merge programs make it easier to manually resolve conflicting | ||||
merges, either in a graphical way, or by inserting some conflict markers. | ||||
Mercurial does not include any interactive merge programs but relies on | ||||
external tools for that. | ||||
Available merge tools | ||||
===================== | ||||
External merge tools and their properties are configured in the merge- | ||||
tools configuration section - see hgrc(5) - but they can often just be | ||||
named by their executable. | ||||
A merge tool is generally usable if its executable can be found on the | ||||
system and if it can handle the merge. The executable is found if it is an | ||||
absolute or relative executable path or the name of an application in the | ||||
executable search path. The tool is assumed to be able to handle the merge | ||||
if it can handle symlinks if the file is a symlink, if it can handle | ||||
binary files if the file is binary, and if a GUI is available if the tool | ||||
requires a GUI. | ||||
There are some internal merge tools which can be used. The internal merge | ||||
tools are: | ||||
":dump" | ||||
Creates three versions of the files to merge, containing the contents of | ||||
local, other and base. These files can then be used to perform a merge | ||||
manually. If the file to be merged is named "a.txt", these files will | ||||
accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and | ||||
they will be placed in the same directory as "a.txt". | ||||
|
r34916 | This implies premerge. Therefore, files aren't dumped, if premerge runs | ||
|
r32255 | successfully. Use :forcedump to forcibly write files out. | ||
|
r39162 | (actual capabilities: binary, symlink) | ||
|
r24100 | ":fail" | ||
Rather than attempting to merge files that were modified on both | ||||
branches, it marks them as unresolved. The resolve command must be used | ||||
to resolve these conflicts. | ||||
|
r39162 | (actual capabilities: binary, symlink) | ||
|
r32255 | ":forcedump" | ||
Creates three versions of the files as same as :dump, but omits | ||||
premerge. | ||||
|
r39162 | (actual capabilities: binary, symlink) | ||
|
r24100 | ":local" | ||
|
r28640 | Uses the local 'p1()' version of files as the merged version. | ||
|
r24100 | |||
|
r39162 | (actual capabilities: binary, symlink) | ||
|
r24100 | ":merge" | ||
Uses the internal non-interactive simple merge algorithm for merging | ||||
files. It will fail if there are any conflicts and leave markers in the | ||||
partially merged file. Markers will have two sections, one for each side | ||||
of merge. | ||||
|
r26224 | ":merge-local" | ||
Like :merge, but resolve all conflicts non-interactively in favor of the | ||||
|
r28640 | local 'p1()' changes. | ||
|
r26224 | |||
":merge-other" | ||||
Like :merge, but resolve all conflicts non-interactively in favor of the | ||||
|
r28640 | other 'p2()' changes. | ||
|
r26224 | |||
|
r24100 | ":merge3" | ||
Uses the internal non-interactive simple merge algorithm for merging | ||||
files. It will fail if there are any conflicts and leave markers in the | ||||
partially merged file. Marker will have three sections, one from each | ||||
side of the merge and one for the base content. | ||||
":other" | ||||
|
r28640 | Uses the other 'p2()' version of files as the merged version. | ||
|
r24100 | |||
|
r39162 | (actual capabilities: binary, symlink) | ||
|
r24100 | ":prompt" | ||
|
r28640 | Asks the user which of the local 'p1()' or the other 'p2()' version to | ||
keep as the merged version. | ||||
|
r24100 | |||
|
r39162 | (actual capabilities: binary, symlink) | ||
|
r24100 | ":tagmerge" | ||
Uses the internal tag merge algorithm (experimental). | ||||
|
r26071 | ":union" | ||
Uses the internal non-interactive simple merge algorithm for merging | ||||
files. It will use both left and right sides for conflict regions. No | ||||
markers are inserted. | ||||
|
r24100 | Internal tools are always available and do not require a GUI but will by | ||
|
r39162 | default not handle symlinks or binary files. See next section for detail | ||
about "actual capabilities" described above. | ||||
|
r24100 | |||
Choosing a merge tool | ||||
===================== | ||||
Mercurial uses these rules when deciding which merge tool to use: | ||||
1. If a tool has been specified with the --tool option to merge or | ||||
resolve, it is used. If it is the name of a tool in the merge-tools | ||||
configuration, its configuration is used. Otherwise the specified tool | ||||
must be executable by the shell. | ||||
2. If the "HGMERGE" environment variable is present, its value is used and | ||||
must be executable by the shell. | ||||
3. If the filename of the file to be merged matches any of the patterns in | ||||
the merge-patterns configuration section, the first usable merge tool | ||||
|
r39157 | corresponding to a matching pattern is used. | ||
|
r24100 | 4. If ui.merge is set it will be considered next. If the value is not the | ||
name of a configured tool, the specified value is used and must be | ||||
executable by the shell. Otherwise the named tool is used if it is | ||||
usable. | ||||
5. If any usable merge tools are present in the merge-tools configuration | ||||
section, the one with the highest priority is used. | ||||
6. If a program named "hgmerge" can be found on the system, it is used - | ||||
but it will by default not be used for symlinks and binary files. | ||||
7. If the file to be merged is not binary and is not a symlink, then | ||||
internal ":merge" is used. | ||||
|
r32179 | 8. Otherwise, ":prompt" is used. | ||
|
r24100 | |||
|
r39304 | For historical reason, Mercurial treats merge tools as below while | ||
examining rules above. | ||||
|
r39157 | |||
step specified via binary symlink | ||||
---------------------------------- | ||||
|
r39304 | 1. --tool o/o o/o | ||
2. HGMERGE o/o o/o | ||||
3. merge-patterns o/o(*) x/?(*) | ||||
4. ui.merge x/?(*) x/?(*) | ||||
Each capability column indicates Mercurial behavior for internal/external | ||||
merge tools at examining each rule. | ||||
- "o": "assume that a tool has capability" | ||||
- "x": "assume that a tool does not have capability" | ||||
- "?": "check actual capability of a tool" | ||||
|
r39161 | |||
If "merge.strict-capability-check" configuration is true, Mercurial checks | ||||
|
r39304 | capabilities of merge tools strictly in (*) cases above (= each capability | ||
column becomes "?/?"). It is false by default for backward compatibility. | ||||
|
r39157 | |||
|
r24100 | Note: | ||
After selecting a merge program, Mercurial will by default attempt to | ||||
merge the files using a simple merge algorithm first. Only if it | ||||
|
r34950 | doesn't succeed because of conflicting changes will Mercurial actually | ||
|
r24100 | execute the merge program. Whether to use the simple merge algorithm | ||
first can be controlled by the premerge setting of the merge tool. | ||||
Premerge is enabled by default unless the file is binary or a symlink. | ||||
See the merge-tools and ui sections of hgrc(5) for details on the | ||||
configuration of merge tools. | ||||
|
r31793 | Compression engines listed in `hg help bundlespec` | ||
$ hg help bundlespec | grep gzip | ||||
"v1" bundles can only use the "gzip", "bzip2", and "none" compression | ||||
An algorithm that produces smaller bundles than "gzip". | ||||
This engine will likely produce smaller bundles than "gzip" but will be | ||||
"gzip" | ||||
|
r31817 | better compression than "gzip". It also frequently yields better (?) | ||
|
r31793 | |||
|
r17648 | Test usage of section marks in help documents | ||
$ cd "$TESTDIR"/../doc | ||||
|
r39743 | $ "$PYTHON" check-seclevel.py | ||
|
r18744 | $ cd $TESTTMP | ||
#if serve | ||||
Test the help pages in hgweb. | ||||
Dish up an empty repo; serve it cold. | ||||
$ hg init "$TESTTMP/test" | ||||
$ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid | ||||
$ cat hg.pid >> $DAEMON_PIDS | ||||
|
r31008 | $ get-with-headers.py $LOCALIP:$HGPORT "help" | ||
|
r18744 | 200 Script output follows | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | ||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | ||||
<head> | ||||
<link rel="icon" href="/static/hgicon.png" type="image/png" /> | ||||
<meta name="robots" content="index, nofollow" /> | ||||
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | ||||
<script type="text/javascript" src="/static/mercurial.js"></script> | ||||
<title>Help: Index</title> | ||||
</head> | ||||
<body> | ||||
<div class="container"> | ||||
<div class="menu"> | ||||
<div class="logo"> | ||||
|
r26421 | <a href="https://mercurial-scm.org/"> | ||
|
r18744 | <img src="/static/hglogo.png" alt="mercurial" /></a> | ||
</div> | ||||
<ul> | ||||
<li><a href="/shortlog">log</a></li> | ||||
<li><a href="/graph">graph</a></li> | ||||
<li><a href="/tags">tags</a></li> | ||||
<li><a href="/bookmarks">bookmarks</a></li> | ||||
<li><a href="/branches">branches</a></li> | ||||
</ul> | ||||
<ul> | ||||
<li class="active">help</li> | ||||
</ul> | ||||
</div> | ||||
<div class="main"> | ||||
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | ||||
|
r32758 | |||
|
r18744 | <form class="search" action="/log"> | ||
|
r32758 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | ||
|
r19796 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | ||
number or hash, or <a href="/help/revsets">revset expression</a>.</div> | ||||
|
r18744 | </form> | ||
<table class="bigtable"> | ||||
r30019 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> | |||
|
r18745 | |||
<tr><td> | ||||
|
r31793 | <a href="/help/bundlespec"> | ||
bundlespec | ||||
</a> | ||||
</td><td> | ||||
Bundle File Formats | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r31129 | <a href="/help/color"> | ||
color | ||||
</a> | ||||
</td><td> | ||||
Colorizing Outputs | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r18745 | <a href="/help/config"> | ||
config | ||||
</a> | ||||
</td><td> | ||||
Configuration Files | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/dates"> | ||||
dates | ||||
</a> | ||||
</td><td> | ||||
Date Formats | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r38019 | <a href="/help/deprecated"> | ||
deprecated | ||||
</a> | ||||
</td><td> | ||||
Deprecated Features | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r18745 | <a href="/help/diffs"> | ||
diffs | ||||
</a> | ||||
</td><td> | ||||
Diff Formats | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/environment"> | ||||
environment | ||||
</a> | ||||
</td><td> | ||||
Environment Variables | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/extensions"> | ||||
extensions | ||||
</a> | ||||
</td><td> | ||||
Using Additional Features | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/filesets"> | ||||
filesets | ||||
</a> | ||||
</td><td> | ||||
Specifying File Sets | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r35036 | <a href="/help/flags"> | ||
flags | ||||
</a> | ||||
</td><td> | ||||
Command-line flags | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r18745 | <a href="/help/glossary"> | ||
glossary | ||||
</a> | ||||
</td><td> | ||||
Glossary | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/hgignore"> | ||||
hgignore | ||||
</a> | ||||
</td><td> | ||||
Syntax for Mercurial Ignore Files | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/hgweb"> | ||||
hgweb | ||||
</a> | ||||
</td><td> | ||||
Configuring hgweb | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r27376 | <a href="/help/internals"> | ||
internals | ||||
</a> | ||||
</td><td> | ||||
Technical implementation topics | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r18745 | <a href="/help/merge-tools"> | ||
merge-tools | ||||
</a> | ||||
</td><td> | ||||
Merge Tools | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r31061 | <a href="/help/pager"> | ||
pager | ||||
</a> | ||||
</td><td> | ||||
Pager Support | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r18745 | <a href="/help/patterns"> | ||
patterns | ||||
</a> | ||||
</td><td> | ||||
File Name Patterns | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/phases"> | ||||
phases | ||||
</a> | ||||
</td><td> | ||||
Working with Phases | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/revisions"> | ||||
revisions | ||||
</a> | ||||
</td><td> | ||||
|
r30769 | Specifying Revisions | ||
|
r18745 | </td></tr> | ||
<tr><td> | ||||
|
r25881 | <a href="/help/scripting"> | ||
scripting | ||||
</a> | ||||
</td><td> | ||||
Using Mercurial from scripts and automation | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r18745 | <a href="/help/subrepos"> | ||
subrepos | ||||
</a> | ||||
</td><td> | ||||
Subrepositories | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/templating"> | ||||
templating | ||||
</a> | ||||
</td><td> | ||||
Template Usage | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/urls"> | ||||
urls | ||||
</a> | ||||
</td><td> | ||||
URL Paths | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/topic-containing-verbose"> | ||||
topic-containing-verbose | ||||
</a> | ||||
</td><td> | ||||
This is the topic to test omit indicating. | ||||
</td></tr> | ||||
|
r18744 | |||
|
r27578 | |||
|
r18744 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> | ||
|
r18745 | |||
<tr><td> | ||||
<a href="/help/add"> | ||||
add | ||||
</a> | ||||
</td><td> | ||||
add the specified files on the next commit | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/annotate"> | ||||
annotate | ||||
</a> | ||||
</td><td> | ||||
show changeset information by line for each file | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/clone"> | ||||
clone | ||||
</a> | ||||
</td><td> | ||||
make a copy of an existing repository | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/commit"> | ||||
commit | ||||
</a> | ||||
</td><td> | ||||
commit the specified files or all outstanding changes | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/diff"> | ||||
diff | ||||
</a> | ||||
</td><td> | ||||
diff repository (or selected files) | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/export"> | ||||
export | ||||
</a> | ||||
</td><td> | ||||
dump the header and diffs for one or more changesets | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/forget"> | ||||
forget | ||||
</a> | ||||
</td><td> | ||||
forget the specified files on the next commit | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/init"> | ||||
init | ||||
</a> | ||||
</td><td> | ||||
create a new repository in the given directory | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/log"> | ||||
log | ||||
</a> | ||||
</td><td> | ||||
show revision history of entire repository or files | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/merge"> | ||||
merge | ||||
</a> | ||||
</td><td> | ||||
|
r23400 | merge another revision into working directory | ||
|
r18745 | </td></tr> | ||
<tr><td> | ||||
<a href="/help/pull"> | ||||
pull | ||||
</a> | ||||
</td><td> | ||||
pull changes from the specified source | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/push"> | ||||
push | ||||
</a> | ||||
</td><td> | ||||
push changes to the specified destination | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/remove"> | ||||
remove | ||||
</a> | ||||
</td><td> | ||||
remove the specified files on the next commit | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/serve"> | ||||
serve | ||||
</a> | ||||
</td><td> | ||||
start stand-alone webserver | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/status"> | ||||
status | ||||
</a> | ||||
</td><td> | ||||
show changed files in the working directory | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/summary"> | ||||
summary | ||||
</a> | ||||
</td><td> | ||||
summarize working directory state | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/update"> | ||||
update | ||||
</a> | ||||
</td><td> | ||||
update working directory (or switch revisions) | ||||
</td></tr> | ||||
|
r18744 | |||
|
r27578 | |||
|
r18744 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> | ||
|
r18745 | |||
<tr><td> | ||||
<a href="/help/addremove"> | ||||
addremove | ||||
</a> | ||||
</td><td> | ||||
add all new files, delete all missing files | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/archive"> | ||||
archive | ||||
</a> | ||||
</td><td> | ||||
create an unversioned archive of a repository revision | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/backout"> | ||||
backout | ||||
</a> | ||||
</td><td> | ||||
reverse effect of earlier changeset | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/bisect"> | ||||
bisect | ||||
</a> | ||||
</td><td> | ||||
subdivision search of changesets | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/bookmarks"> | ||||
bookmarks | ||||
</a> | ||||
</td><td> | ||||
|
r21762 | create a new bookmark or list existing bookmarks | ||
|
r18745 | </td></tr> | ||
<tr><td> | ||||
<a href="/help/branch"> | ||||
branch | ||||
</a> | ||||
</td><td> | ||||
set or show the current branch name | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/branches"> | ||||
branches | ||||
</a> | ||||
</td><td> | ||||
list repository named branches | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/bundle"> | ||||
bundle | ||||
</a> | ||||
</td><td> | ||||
|
r31794 | create a bundle file | ||
|
r18745 | </td></tr> | ||
<tr><td> | ||||
<a href="/help/cat"> | ||||
cat | ||||
</a> | ||||
</td><td> | ||||
output the current or given revision of files | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r20570 | <a href="/help/config"> | ||
config | ||||
</a> | ||||
</td><td> | ||||
show combined config settings from all hgrc files | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r18745 | <a href="/help/copy"> | ||
copy | ||||
</a> | ||||
</td><td> | ||||
mark files as copied for the next commit | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r22423 | <a href="/help/files"> | ||
files | ||||
</a> | ||||
</td><td> | ||||
list tracked files | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r18745 | <a href="/help/graft"> | ||
graft | ||||
</a> | ||||
</td><td> | ||||
copy changes from other branches onto the current branch | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/grep"> | ||||
grep | ||||
</a> | ||||
</td><td> | ||||
|
r30009 | search revision history for a pattern in specified files | ||
|
r18745 | </td></tr> | ||
<tr><td> | ||||
|
r40451 | <a href="/help/hashelp"> | ||
hashelp | ||||
</a> | ||||
</td><td> | ||||
Extension command's help | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r18745 | <a href="/help/heads"> | ||
heads | ||||
</a> | ||||
</td><td> | ||||
|
r19469 | show branch heads | ||
|
r18745 | </td></tr> | ||
<tr><td> | ||||
<a href="/help/help"> | ||||
help | ||||
</a> | ||||
</td><td> | ||||
show help for a given topic or a help overview | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r28828 | <a href="/help/hgalias"> | ||
hgalias | ||||
</a> | ||||
</td><td> | ||||
|
r40450 | My doc | ||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/hgaliasnodoc"> | ||||
hgaliasnodoc | ||||
</a> | ||||
</td><td> | ||||
|
r28828 | summarize working directory state | ||
</td></tr> | ||||
<tr><td> | ||||
|
r18745 | <a href="/help/identify"> | ||
identify | ||||
</a> | ||||
</td><td> | ||||
|
r24364 | identify the working directory or specified revision | ||
|
r18745 | </td></tr> | ||
<tr><td> | ||||
<a href="/help/import"> | ||||
import | ||||
</a> | ||||
</td><td> | ||||
import an ordered set of patches | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/incoming"> | ||||
incoming | ||||
</a> | ||||
</td><td> | ||||
show new changesets found in source | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/manifest"> | ||||
manifest | ||||
</a> | ||||
</td><td> | ||||
output the current or given revision of the project manifest | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/nohelp"> | ||||
nohelp | ||||
</a> | ||||
</td><td> | ||||
(no help text available) | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/outgoing"> | ||||
outgoing | ||||
</a> | ||||
</td><td> | ||||
show changesets not found in the destination | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/paths"> | ||||
paths | ||||
</a> | ||||
</td><td> | ||||
show aliases for remote repositories | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/phase"> | ||||
phase | ||||
</a> | ||||
</td><td> | ||||
set or show the current phase name | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/recover"> | ||||
recover | ||||
</a> | ||||
</td><td> | ||||
roll back an interrupted transaction | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/rename"> | ||||
rename | ||||
</a> | ||||
</td><td> | ||||
rename files; equivalent of copy + remove | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/resolve"> | ||||
resolve | ||||
</a> | ||||
</td><td> | ||||
redo merges or set/view the merge status of files | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/revert"> | ||||
revert | ||||
</a> | ||||
</td><td> | ||||
restore files to their checkout state | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/root"> | ||||
root | ||||
</a> | ||||
</td><td> | ||||
print the root (top) of the current working directory | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r28828 | <a href="/help/shellalias"> | ||
shellalias | ||||
</a> | ||||
</td><td> | ||||
(no help text available) | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r18745 | <a href="/help/tag"> | ||
tag | ||||
</a> | ||||
</td><td> | ||||
add one or more tags for the current or given revision | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/tags"> | ||||
tags | ||||
</a> | ||||
</td><td> | ||||
list repository tags | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/unbundle"> | ||||
unbundle | ||||
</a> | ||||
</td><td> | ||||
|
r31795 | apply one or more bundle files | ||
|
r18745 | </td></tr> | ||
<tr><td> | ||||
<a href="/help/verify"> | ||||
verify | ||||
</a> | ||||
</td><td> | ||||
verify the integrity of the repository | ||||
</td></tr> | ||||
<tr><td> | ||||
<a href="/help/version"> | ||||
version | ||||
</a> | ||||
</td><td> | ||||
output version and copyright information | ||||
</td></tr> | ||||
|
r27578 | |||
|
r18744 | </table> | ||
</div> | ||||
</div> | ||||
</body> | ||||
</html> | ||||
|
r31008 | $ get-with-headers.py $LOCALIP:$HGPORT "help/add" | ||
|
r18744 | 200 Script output follows | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | ||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | ||||
<head> | ||||
<link rel="icon" href="/static/hgicon.png" type="image/png" /> | ||||
<meta name="robots" content="index, nofollow" /> | ||||
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | ||||
<script type="text/javascript" src="/static/mercurial.js"></script> | ||||
<title>Help: add</title> | ||||
</head> | ||||
<body> | ||||
<div class="container"> | ||||
<div class="menu"> | ||||
<div class="logo"> | ||||
|
r26421 | <a href="https://mercurial-scm.org/"> | ||
|
r18744 | <img src="/static/hglogo.png" alt="mercurial" /></a> | ||
</div> | ||||
<ul> | ||||
<li><a href="/shortlog">log</a></li> | ||||
<li><a href="/graph">graph</a></li> | ||||
<li><a href="/tags">tags</a></li> | ||||
<li><a href="/bookmarks">bookmarks</a></li> | ||||
<li><a href="/branches">branches</a></li> | ||||
</ul> | ||||
<ul> | ||||
<li class="active"><a href="/help">help</a></li> | ||||
</ul> | ||||
</div> | ||||
<div class="main"> | ||||
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | ||||
<h3>Help: add</h3> | ||||
<form class="search" action="/log"> | ||||
|
r32758 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | ||
|
r19796 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | ||
number or hash, or <a href="/help/revsets">revset expression</a>.</div> | ||||
|
r18744 | </form> | ||
|
r18747 | <div id="doc"> | ||
<p> | ||||
|
r18744 | hg add [OPTION]... [FILE]... | ||
|
r18747 | </p> | ||
<p> | ||||
|
r18744 | add the specified files on the next commit | ||
|
r18747 | </p> | ||
<p> | ||||
Schedule files to be version controlled and added to the | ||||
repository. | ||||
</p> | ||||
<p> | ||||
The files will be added to the repository at the next commit. To | ||||
|
r27729 | undo an add before that, see 'hg forget'. | ||
|
r18747 | </p> | ||
<p> | ||||
|
r27424 | If no names are given, add all files to the repository (except | ||
files matching ".hgignore"). | ||||
|
r18747 | </p> | ||
<p> | ||||
|
r27143 | Examples: | ||
|
r19079 | </p> | ||
|
r27143 | <ul> | ||
|
r27729 | <li> New (unknown) files are added automatically by 'hg add': | ||
|
r19079 | <pre> | ||
\$ ls (re) | ||||
foo.c | ||||
\$ hg status (re) | ||||
? foo.c | ||||
\$ hg add (re) | ||||
adding foo.c | ||||
\$ hg status (re) | ||||
A foo.c | ||||
</pre> | ||||
|
r27143 | <li> Specific files to be added can be specified: | ||
<pre> | ||||
\$ ls (re) | ||||
bar.c foo.c | ||||
\$ hg status (re) | ||||
? bar.c | ||||
? foo.c | ||||
\$ hg add bar.c (re) | ||||
\$ hg status (re) | ||||
A bar.c | ||||
? foo.c | ||||
</pre> | ||||
</ul> | ||||
|
r19079 | <p> | ||
|
r18747 | Returns 0 if all files are successfully added. | ||
</p> | ||||
<p> | ||||
|
r22117 | options ([+] can be repeated): | ||
|
r18747 | </p> | ||
<table> | ||||
|
r18751 | <tr><td>-I</td> | ||
<td>--include PATTERN [+]</td> | ||||
<td>include names matching the given patterns</td></tr> | ||||
<tr><td>-X</td> | ||||
<td>--exclude PATTERN [+]</td> | ||||
<td>exclude names matching the given patterns</td></tr> | ||||
<tr><td>-S</td> | ||||
|
r30152 | <td>--subrepos</td> | ||
|
r18751 | <td>recurse into subrepositories</td></tr> | ||
<tr><td>-n</td> | ||||
|
r30152 | <td>--dry-run</td> | ||
|
r18751 | <td>do not perform actions, just print output</td></tr> | ||
|
r18747 | </table> | ||
<p> | ||||
|
r22117 | global options ([+] can be repeated): | ||
|
r18747 | </p> | ||
<table> | ||||
|
r18751 | <tr><td>-R</td> | ||
<td>--repository REPO</td> | ||||
<td>repository root directory or name of overlay bundle file</td></tr> | ||||
<tr><td></td> | ||||
<td>--cwd DIR</td> | ||||
<td>change working directory</td></tr> | ||||
<tr><td>-y</td> | ||||
<td>--noninteractive</td> | ||||
<td>do not prompt, automatically pick the first choice for all prompts</td></tr> | ||||
<tr><td>-q</td> | ||||
|
r30152 | <td>--quiet</td> | ||
|
r18751 | <td>suppress output</td></tr> | ||
<tr><td>-v</td> | ||||
|
r30152 | <td>--verbose</td> | ||
|
r18751 | <td>enable additional output</td></tr> | ||
<tr><td></td> | ||||
|
r31104 | <td>--color TYPE</td> | ||
|
r31123 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> | ||
|
r31104 | <tr><td></td> | ||
|
r18751 | <td>--config CONFIG [+]</td> | ||
<td>set/override config option (use 'section.name=value')</td></tr> | ||||
<tr><td></td> | ||||
|
r30152 | <td>--debug</td> | ||
|
r18751 | <td>enable debugging output</td></tr> | ||
<tr><td></td> | ||||
|
r30152 | <td>--debugger</td> | ||
|
r18751 | <td>start debugger</td></tr> | ||
<tr><td></td> | ||||
<td>--encoding ENCODE</td> | ||||
<td>set the charset encoding (default: ascii)</td></tr> | ||||
<tr><td></td> | ||||
<td>--encodingmode MODE</td> | ||||
<td>set the charset encoding mode (default: strict)</td></tr> | ||||
<tr><td></td> | ||||
|
r30152 | <td>--traceback</td> | ||
|
r18751 | <td>always print a traceback on exception</td></tr> | ||
<tr><td></td> | ||||
|
r30152 | <td>--time</td> | ||
|
r18751 | <td>time how long the command takes</td></tr> | ||
<tr><td></td> | ||||
|
r30152 | <td>--profile</td> | ||
|
r18751 | <td>print command execution profile</td></tr> | ||
<tr><td></td> | ||||
<td>--version</td> | ||||
<td>output version information and exit</td></tr> | ||||
<tr><td>-h</td> | ||||
<td>--help</td> | ||||
<td>display help and exit</td></tr> | ||||
<tr><td></td> | ||||
|
r41045 | <td>--hidden</td> | ||
|
r41046 | <td>consider hidden changesets</td></tr> | ||
|
r30993 | <tr><td></td> | ||
<td>--pager TYPE</td> | ||||
<td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> | ||||
|
r18747 | </table> | ||
|
r18744 | |||
|
r18747 | </div> | ||
|
r18744 | </div> | ||
</div> | ||||
</body> | ||||
</html> | ||||
|
r31008 | $ get-with-headers.py $LOCALIP:$HGPORT "help/remove" | ||
|
r18744 | 200 Script output follows | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | ||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | ||||
<head> | ||||
<link rel="icon" href="/static/hgicon.png" type="image/png" /> | ||||
<meta name="robots" content="index, nofollow" /> | ||||
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | ||||
<script type="text/javascript" src="/static/mercurial.js"></script> | ||||
<title>Help: remove</title> | ||||
</head> | ||||
<body> | ||||
<div class="container"> | ||||
<div class="menu"> | ||||
<div class="logo"> | ||||
|
r26421 | <a href="https://mercurial-scm.org/"> | ||
|
r18744 | <img src="/static/hglogo.png" alt="mercurial" /></a> | ||
</div> | ||||
<ul> | ||||
<li><a href="/shortlog">log</a></li> | ||||
<li><a href="/graph">graph</a></li> | ||||
<li><a href="/tags">tags</a></li> | ||||
<li><a href="/bookmarks">bookmarks</a></li> | ||||
<li><a href="/branches">branches</a></li> | ||||
</ul> | ||||
<ul> | ||||
<li class="active"><a href="/help">help</a></li> | ||||
</ul> | ||||
</div> | ||||
<div class="main"> | ||||
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | ||||
<h3>Help: remove</h3> | ||||
<form class="search" action="/log"> | ||||
|
r32758 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | ||
|
r19796 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | ||
number or hash, or <a href="/help/revsets">revset expression</a>.</div> | ||||
|
r18744 | </form> | ||
|
r18747 | <div id="doc"> | ||
<p> | ||||
|
r18744 | hg remove [OPTION]... FILE... | ||
|
r18747 | </p> | ||
<p> | ||||
|
r18744 | aliases: rm | ||
|
r18747 | </p> | ||
<p> | ||||
|
r18744 | remove the specified files on the next commit | ||
|
r18747 | </p> | ||
<p> | ||||
Schedule the indicated files for removal from the current branch. | ||||
</p> | ||||
<p> | ||||
This command schedules the files to be removed at the next commit. | ||||
|
r27729 | To undo a remove before that, see 'hg revert'. To undo added | ||
files, see 'hg forget'. | ||||
|
r18747 | </p> | ||
<p> | ||||
|
r19079 | -A/--after can be used to remove only files that have already | ||
been deleted, -f/--force can be used to force deletion, and -Af | ||||
can be used to remove files from the next revision without | ||||
deleting them from the working directory. | ||||
</p> | ||||
<p> | ||||
The following table details the behavior of remove for different | ||||
file states (columns) and option combinations (rows). The file | ||||
states are Added [A], Clean [C], Modified [M] and Missing [!] | ||||
|
r27729 | (as reported by 'hg status'). The actions are Warn, Remove | ||
|
r19079 | (from branch) and Delete (from disk): | ||
</p> | ||||
<table> | ||||
|
r19960 | <tr><td>opt/state</td> | ||
|
r19079 | <td>A</td> | ||
<td>C</td> | ||||
<td>M</td> | ||||
<td>!</td></tr> | ||||
<tr><td>none</td> | ||||
<td>W</td> | ||||
<td>RD</td> | ||||
<td>W</td> | ||||
<td>R</td></tr> | ||||
<tr><td>-f</td> | ||||
<td>R</td> | ||||
<td>RD</td> | ||||
<td>RD</td> | ||||
<td>R</td></tr> | ||||
<tr><td>-A</td> | ||||
<td>W</td> | ||||
<td>W</td> | ||||
<td>W</td> | ||||
<td>R</td></tr> | ||||
<tr><td>-Af</td> | ||||
<td>R</td> | ||||
<td>R</td> | ||||
<td>R</td> | ||||
<td>R</td></tr> | ||||
</table> | ||||
<p> | ||||
|
r27489 | <b>Note:</b> | ||
</p> | ||||
<p> | ||||
|
r27729 | 'hg remove' never deletes files in Added [A] state from the | ||
|
r27489 | working directory, not even if "--force" is specified. | ||
|
r19079 | </p> | ||
<p> | ||||
|
r18747 | Returns 0 on success, 1 if any warnings encountered. | ||
</p> | ||||
<p> | ||||
|
r22117 | options ([+] can be repeated): | ||
|
r18747 | </p> | ||
<table> | ||||
|
r18751 | <tr><td>-A</td> | ||
|
r30152 | <td>--after</td> | ||
|
r18751 | <td>record delete for missing files</td></tr> | ||
<tr><td>-f</td> | ||||
|
r30152 | <td>--force</td> | ||
|
r28902 | <td>forget added files, delete modified files</td></tr> | ||
|
r23325 | <tr><td>-S</td> | ||
|
r30152 | <td>--subrepos</td> | ||
|
r23325 | <td>recurse into subrepositories</td></tr> | ||
|
r18751 | <tr><td>-I</td> | ||
<td>--include PATTERN [+]</td> | ||||
<td>include names matching the given patterns</td></tr> | ||||
<tr><td>-X</td> | ||||
<td>--exclude PATTERN [+]</td> | ||||
<td>exclude names matching the given patterns</td></tr> | ||||
|
r37168 | <tr><td>-n</td> | ||
<td>--dry-run</td> | ||||
<td>do not perform actions, just print output</td></tr> | ||||
|
r18747 | </table> | ||
<p> | ||||
|
r22117 | global options ([+] can be repeated): | ||
|
r18747 | </p> | ||
<table> | ||||
|
r18751 | <tr><td>-R</td> | ||
<td>--repository REPO</td> | ||||
<td>repository root directory or name of overlay bundle file</td></tr> | ||||
<tr><td></td> | ||||
<td>--cwd DIR</td> | ||||
<td>change working directory</td></tr> | ||||
<tr><td>-y</td> | ||||
<td>--noninteractive</td> | ||||
<td>do not prompt, automatically pick the first choice for all prompts</td></tr> | ||||
<tr><td>-q</td> | ||||
|
r30152 | <td>--quiet</td> | ||
|
r18751 | <td>suppress output</td></tr> | ||
<tr><td>-v</td> | ||||
|
r30152 | <td>--verbose</td> | ||
|
r18751 | <td>enable additional output</td></tr> | ||
<tr><td></td> | ||||
|
r31104 | <td>--color TYPE</td> | ||
|
r31123 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> | ||
|
r31104 | <tr><td></td> | ||
|
r18751 | <td>--config CONFIG [+]</td> | ||
<td>set/override config option (use 'section.name=value')</td></tr> | ||||
<tr><td></td> | ||||
|
r30152 | <td>--debug</td> | ||
|
r18751 | <td>enable debugging output</td></tr> | ||
<tr><td></td> | ||||
|
r30152 | <td>--debugger</td> | ||
|
r18751 | <td>start debugger</td></tr> | ||
<tr><td></td> | ||||
<td>--encoding ENCODE</td> | ||||
<td>set the charset encoding (default: ascii)</td></tr> | ||||
<tr><td></td> | ||||
<td>--encodingmode MODE</td> | ||||
<td>set the charset encoding mode (default: strict)</td></tr> | ||||
<tr><td></td> | ||||
|
r30152 | <td>--traceback</td> | ||
|
r18751 | <td>always print a traceback on exception</td></tr> | ||
<tr><td></td> | ||||
|
r30152 | <td>--time</td> | ||
|
r18751 | <td>time how long the command takes</td></tr> | ||
<tr><td></td> | ||||
|
r30152 | <td>--profile</td> | ||
|
r18751 | <td>print command execution profile</td></tr> | ||
<tr><td></td> | ||||
<td>--version</td> | ||||
<td>output version information and exit</td></tr> | ||||
<tr><td>-h</td> | ||||
<td>--help</td> | ||||
<td>display help and exit</td></tr> | ||||
<tr><td></td> | ||||
|
r41045 | <td>--hidden</td> | ||
|
r41046 | <td>consider hidden changesets</td></tr> | ||
|
r30993 | <tr><td></td> | ||
<td>--pager TYPE</td> | ||||
<td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> | ||||
|
r18747 | </table> | ||
|
r18744 | |||
|
r18747 | </div> | ||
|
r18744 | </div> | ||
</div> | ||||
</body> | ||||
</html> | ||||
|
r31008 | $ get-with-headers.py $LOCALIP:$HGPORT "help/dates" | ||
|
r18744 | 200 Script output follows | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | ||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | ||||
<head> | ||||
<link rel="icon" href="/static/hgicon.png" type="image/png" /> | ||||
<meta name="robots" content="index, nofollow" /> | ||||
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | ||||
<script type="text/javascript" src="/static/mercurial.js"></script> | ||||
|
r30768 | <title>Help: dates</title> | ||
|
r18744 | </head> | ||
<body> | ||||
<div class="container"> | ||||
<div class="menu"> | ||||
<div class="logo"> | ||||
|
r26421 | <a href="https://mercurial-scm.org/"> | ||
|
r18744 | <img src="/static/hglogo.png" alt="mercurial" /></a> | ||
</div> | ||||
<ul> | ||||
<li><a href="/shortlog">log</a></li> | ||||
<li><a href="/graph">graph</a></li> | ||||
<li><a href="/tags">tags</a></li> | ||||
<li><a href="/bookmarks">bookmarks</a></li> | ||||
<li><a href="/branches">branches</a></li> | ||||
</ul> | ||||
<ul> | ||||
<li class="active"><a href="/help">help</a></li> | ||||
</ul> | ||||
</div> | ||||
<div class="main"> | ||||
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | ||||
|
r30768 | <h3>Help: dates</h3> | ||
|
r18744 | |||
<form class="search" action="/log"> | ||||
|
r32758 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | ||
|
r19796 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | ||
number or hash, or <a href="/help/revsets">revset expression</a>.</div> | ||||
|
r18744 | </form> | ||
|
r18747 | <div id="doc"> | ||
|
r30768 | <h1>Date Formats</h1> | ||
|
r18747 | <p> | ||
|
r30768 | Some commands allow the user to specify a date, e.g.: | ||
|
r18747 | </p> | ||
|
r30768 | <ul> | ||
<li> backout, commit, import, tag: Specify the commit date. | ||||
<li> log, revert, update: Select revision(s) by date. | ||||
</ul> | ||||
|
r18747 | <p> | ||
|
r30768 | Many date formats are valid. Here are some examples: | ||
|
r18747 | </p> | ||
|
r30768 | <ul> | ||
<li> "Wed Dec 6 13:18:29 2006" (local timezone assumed) | ||||
<li> "Dec 6 13:18 -0600" (year assumed, time offset provided) | ||||
<li> "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) | ||||
<li> "Dec 6" (midnight) | ||||
<li> "13:18" (today assumed) | ||||
<li> "3:39" (3:39AM assumed) | ||||
<li> "3:39pm" (15:39) | ||||
<li> "2006-12-06 13:18:29" (ISO 8601 format) | ||||
<li> "2006-12-6 13:18" | ||||
<li> "2006-12-6" | ||||
<li> "12-6" | ||||
<li> "12/6" | ||||
<li> "12/6/6" (Dec 6 2006) | ||||
<li> "today" (midnight) | ||||
<li> "yesterday" (midnight) | ||||
<li> "now" - right now | ||||
</ul> | ||||
|
r18747 | <p> | ||
|
r30768 | Lastly, there is Mercurial's internal format: | ||
</p> | ||||
<ul> | ||||
<li> "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) | ||||
</ul> | ||||
<p> | ||||
This is the internal representation format for dates. The first number | ||||
is the number of seconds since the epoch (1970-01-01 00:00 UTC). The | ||||
second is the offset of the local timezone, in seconds west of UTC | ||||
(negative if the timezone is east of UTC). | ||||
|
r18747 | </p> | ||
<p> | ||||
|
r30768 | The log command also accepts date ranges: | ||
|
r18747 | </p> | ||
|
r30768 | <ul> | ||
<li> "<DATE" - at or before a given date/time | ||||
<li> ">DATE" - on or after a given date/time | ||||
<li> "DATE to DATE" - a date range, inclusive | ||||
<li> "-DAYS" - within a given number of days of today | ||||
</ul> | ||||
|
r18744 | |||
|
r18747 | </div> | ||
|
r18744 | </div> | ||
</div> | ||||
</body> | ||||
</html> | ||||
r38242 | $ get-with-headers.py $LOCALIP:$HGPORT "help/pager" | |||
200 Script output follows | ||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | ||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | ||||
<head> | ||||
<link rel="icon" href="/static/hgicon.png" type="image/png" /> | ||||
<meta name="robots" content="index, nofollow" /> | ||||
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | ||||
<script type="text/javascript" src="/static/mercurial.js"></script> | ||||
<title>Help: pager</title> | ||||
</head> | ||||
<body> | ||||
<div class="container"> | ||||
<div class="menu"> | ||||
<div class="logo"> | ||||
<a href="https://mercurial-scm.org/"> | ||||
<img src="/static/hglogo.png" alt="mercurial" /></a> | ||||
</div> | ||||
<ul> | ||||
<li><a href="/shortlog">log</a></li> | ||||
<li><a href="/graph">graph</a></li> | ||||
<li><a href="/tags">tags</a></li> | ||||
<li><a href="/bookmarks">bookmarks</a></li> | ||||
<li><a href="/branches">branches</a></li> | ||||
</ul> | ||||
<ul> | ||||
<li class="active"><a href="/help">help</a></li> | ||||
</ul> | ||||
</div> | ||||
<div class="main"> | ||||
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | ||||
<h3>Help: pager</h3> | ||||
<form class="search" action="/log"> | ||||
<p><input name="rev" id="search1" type="text" size="30" value="" /></p> | ||||
<div id="hint">Find changesets by keywords (author, files, the commit message), revision | ||||
number or hash, or <a href="/help/revsets">revset expression</a>.</div> | ||||
</form> | ||||
<div id="doc"> | ||||
<h1>Pager Support</h1> | ||||
<p> | ||||
Some Mercurial commands can produce a lot of output, and Mercurial will | ||||
attempt to use a pager to make those commands more pleasant. | ||||
</p> | ||||
<p> | ||||
To set the pager that should be used, set the application variable: | ||||
</p> | ||||
<pre> | ||||
[pager] | ||||
pager = less -FRX | ||||
</pre> | ||||
<p> | ||||
If no pager is set in the user or repository configuration, Mercurial uses the | ||||
environment variable $PAGER. If $PAGER is not set, pager.pager from the default | ||||
or system configuration is used. If none of these are set, a default pager will | ||||
be used, typically 'less' on Unix and 'more' on Windows. | ||||
</p> | ||||
<p> | ||||
You can disable the pager for certain commands by adding them to the | ||||
pager.ignore list: | ||||
</p> | ||||
<pre> | ||||
[pager] | ||||
ignore = version, help, update | ||||
</pre> | ||||
<p> | ||||
To ignore global commands like 'hg version' or 'hg help', you have | ||||
to specify them in your user configuration file. | ||||
</p> | ||||
<p> | ||||
To control whether the pager is used at all for an individual command, | ||||
you can use --pager=<value>: | ||||
</p> | ||||
<ul> | ||||
<li> use as needed: 'auto'. | ||||
<li> require the pager: 'yes' or 'on'. | ||||
<li> suppress the pager: 'no' or 'off' (any unrecognized value will also work). | ||||
</ul> | ||||
<p> | ||||
To globally turn off all attempts to use a pager, set: | ||||
</p> | ||||
<pre> | ||||
[ui] | ||||
paginate = never | ||||
</pre> | ||||
<p> | ||||
which will prevent the pager from running. | ||||
</p> | ||||
r38243 | ||||
r38242 | </div> | |||
</div> | ||||
</div> | ||||
</body> | ||||
</html> | ||||
|
r27581 | Sub-topic indexes rendered properly | ||
|
r31008 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals" | ||
|
r27581 | 200 Script output follows | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | ||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | ||||
<head> | ||||
<link rel="icon" href="/static/hgicon.png" type="image/png" /> | ||||
<meta name="robots" content="index, nofollow" /> | ||||
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | ||||
<script type="text/javascript" src="/static/mercurial.js"></script> | ||||
<title>Help: internals</title> | ||||
</head> | ||||
<body> | ||||
<div class="container"> | ||||
<div class="menu"> | ||||
<div class="logo"> | ||||
<a href="https://mercurial-scm.org/"> | ||||
<img src="/static/hglogo.png" alt="mercurial" /></a> | ||||
</div> | ||||
<ul> | ||||
<li><a href="/shortlog">log</a></li> | ||||
<li><a href="/graph">graph</a></li> | ||||
<li><a href="/tags">tags</a></li> | ||||
<li><a href="/bookmarks">bookmarks</a></li> | ||||
<li><a href="/branches">branches</a></li> | ||||
</ul> | ||||
<ul> | ||||
<li><a href="/help">help</a></li> | ||||
</ul> | ||||
</div> | ||||
<div class="main"> | ||||
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | ||||
|
r32758 | |||
|
r27581 | <form class="search" action="/log"> | ||
|
r32758 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | ||
|
r27581 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | ||
number or hash, or <a href="/help/revsets">revset expression</a>.</div> | ||||
</form> | ||||
<table class="bigtable"> | ||||
r30019 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> | |||
|
r27581 | |||
<tr><td> | ||||
|
r36469 | <a href="/help/internals.bundle2"> | ||
bundle2 | ||||
</a> | ||||
</td><td> | ||||
Bundle2 | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r27581 | <a href="/help/internals.bundles"> | ||
bundles | ||||
</a> | ||||
</td><td> | ||||
|
r29747 | Bundles | ||
|
r27581 | </td></tr> | ||
<tr><td> | ||||
|
r39446 | <a href="/help/internals.cbor"> | ||
cbor | ||||
</a> | ||||
</td><td> | ||||
CBOR | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r31293 | <a href="/help/internals.censor"> | ||
censor | ||||
</a> | ||||
</td><td> | ||||
Censor | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r27581 | <a href="/help/internals.changegroups"> | ||
changegroups | ||||
</a> | ||||
</td><td> | ||||
|
r29747 | Changegroups | ||
|
r27581 | </td></tr> | ||
|
r27631 | <tr><td> | ||
|
r34933 | <a href="/help/internals.config"> | ||
config | ||||
</a> | ||||
</td><td> | ||||
|
r34953 | Config Registrar | ||
|
r34933 | </td></tr> | ||
<tr><td> | ||||
|
r40631 | <a href="/help/internals.extensions"> | ||
extensions | ||||
</a> | ||||
</td><td> | ||||
Extension API | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r28523 | <a href="/help/internals.requirements"> | ||
requirements | ||||
</a> | ||||
</td><td> | ||||
|
r29747 | Repository Requirements | ||
|
r28523 | </td></tr> | ||
<tr><td> | ||||
|
r27631 | <a href="/help/internals.revlogs"> | ||
revlogs | ||||
</a> | ||||
</td><td> | ||||
|
r29747 | Revision Logs | ||
|
r27631 | </td></tr> | ||
|
r29859 | <tr><td> | ||
<a href="/help/internals.wireprotocol"> | ||||
wireprotocol | ||||
</a> | ||||
</td><td> | ||||
Wire Protocol | ||||
|
r27631 | </td></tr> | ||
|
r39497 | <tr><td> | ||
|
r39650 | <a href="/help/internals.wireprotocolrpc"> | ||
wireprotocolrpc | ||||
</a> | ||||
</td><td> | ||||
Wire Protocol RPC | ||||
</td></tr> | ||||
<tr><td> | ||||
|
r39497 | <a href="/help/internals.wireprotocolv2"> | ||
wireprotocolv2 | ||||
</a> | ||||
</td><td> | ||||
Wire Protocol Version 2 | ||||
</td></tr> | ||||
|
r27581 | |||
</table> | ||||
</div> | ||||
</div> | ||||
</body> | ||||
</html> | ||||
|
r27582 | Sub-topic topics rendered properly | ||
|
r31008 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups" | ||
|
r27582 | 200 Script output follows | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | ||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | ||||
<head> | ||||
<link rel="icon" href="/static/hgicon.png" type="image/png" /> | ||||
<meta name="robots" content="index, nofollow" /> | ||||
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | ||||
<script type="text/javascript" src="/static/mercurial.js"></script> | ||||
<title>Help: internals.changegroups</title> | ||||
</head> | ||||
<body> | ||||
<div class="container"> | ||||
<div class="menu"> | ||||
<div class="logo"> | ||||
<a href="https://mercurial-scm.org/"> | ||||
<img src="/static/hglogo.png" alt="mercurial" /></a> | ||||
</div> | ||||
<ul> | ||||
<li><a href="/shortlog">log</a></li> | ||||
<li><a href="/graph">graph</a></li> | ||||
<li><a href="/tags">tags</a></li> | ||||
<li><a href="/bookmarks">bookmarks</a></li> | ||||
<li><a href="/branches">branches</a></li> | ||||
</ul> | ||||
<ul> | ||||
<li class="active"><a href="/help">help</a></li> | ||||
</ul> | ||||
</div> | ||||
<div class="main"> | ||||
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | ||||
<h3>Help: internals.changegroups</h3> | ||||
<form class="search" action="/log"> | ||||
|
r32758 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | ||
|
r27582 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | ||
number or hash, or <a href="/help/revsets">revset expression</a>.</div> | ||||
</form> | ||||
<div id="doc"> | ||||
|
r29747 | <h1>Changegroups</h1> | ||
|
r27582 | <p> | ||
Changegroups are representations of repository revlog data, specifically | ||||
|
r31213 | the changelog data, root/flat manifest data, treemanifest data, and | ||
filelogs. | ||||
|
r27582 | </p> | ||
<p> | ||||
There are 3 versions of changegroups: "1", "2", and "3". From a | ||||
|
r31213 | high-level, versions "1" and "2" are almost exactly the same, with the | ||
|
r40083 | only difference being an additional item in the *delta header*. Version | ||
"3" adds support for storage flags in the *delta header* and optionally | ||||
|
r31213 | exchanging treemanifests (enabled by setting an option on the | ||
"changegroup" part in the bundle2). | ||||
|
r27582 | </p> | ||
<p> | ||||
|
r31213 | Changegroups when not exchanging treemanifests consist of 3 logical | ||
segments: | ||||
|
r27582 | </p> | ||
<pre> | ||||
+---------------------------------+ | ||||
| | | | | ||||
| changeset | manifest | filelogs | | ||||
| | | | | ||||
|
r31213 | | | | | | ||
|
r27582 | +---------------------------------+ | ||
</pre> | ||||
<p> | ||||
|
r31213 | When exchanging treemanifests, there are 4 logical segments: | ||
</p> | ||||
<pre> | ||||
+-------------------------------------------------+ | ||||
| | | | | | ||||
| changeset | root | treemanifests | filelogs | | ||||
| | manifest | | | | ||||
| | | | | | ||||
+-------------------------------------------------+ | ||||
</pre> | ||||
<p> | ||||
|
r27582 | The principle building block of each segment is a *chunk*. A *chunk* | ||
is a framed piece of data: | ||||
</p> | ||||
<pre> | ||||
+---------------------------------------+ | ||||
| | | | ||||
| length | data | | ||||
|
r31213 | | (4 bytes) | (<length - 4> bytes) | | ||
|
r27582 | | | | | ||
+---------------------------------------+ | ||||
</pre> | ||||
<p> | ||||
|
r31213 | All integers are big-endian signed integers. Each chunk starts with a 32-bit | ||
integer indicating the length of the entire chunk (including the length field | ||||
itself). | ||||
|
r27582 | </p> | ||
<p> | ||||
|
r31213 | There is a special case chunk that has a value of 0 for the length | ||
("0x00000000"). We call this an *empty chunk*. | ||||
|
r27582 | </p> | ||
|
r29747 | <h2>Delta Groups</h2> | ||
|
r27582 | <p> | ||
A *delta group* expresses the content of a revlog as a series of deltas, | ||||
or patches against previous revisions. | ||||
</p> | ||||
<p> | ||||
Delta groups consist of 0 or more *chunks* followed by the *empty chunk* | ||||
to signal the end of the delta group: | ||||
</p> | ||||
<pre> | ||||
+------------------------------------------------------------------------+ | ||||
| | | | | | | ||||
| chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | | ||||
|
r31213 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | | ||
|
r27582 | | | | | | | | ||
|
r31213 | +------------------------------------------------------------------------+ | ||
|
r27582 | </pre> | ||
<p> | ||||
Each *chunk*'s data consists of the following: | ||||
</p> | ||||
<pre> | ||||
|
r31213 | +---------------------------------------+ | ||
| | | | ||||
| delta header | delta data | | ||||
| (various by version) | (various) | | ||||
| | | | ||||
+---------------------------------------+ | ||||
|
r27582 | </pre> | ||
<p> | ||||
|
r31213 | The *delta data* is a series of *delta*s that describe a diff from an existing | ||
entry (either that the recipient already has, or previously specified in the | ||||
|
r32139 | bundle/changegroup). | ||
|
r27582 | </p> | ||
<p> | ||||
The *delta header* is different between versions "1", "2", and | ||||
"3" of the changegroup format. | ||||
</p> | ||||
<p> | ||||
|
r31213 | Version 1 (headerlen=80): | ||
|
r27582 | </p> | ||
<pre> | ||||
+------------------------------------------------------+ | ||||
| | | | | | ||||
| node | p1 node | p2 node | link node | | ||||
| (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | ||||
| | | | | | ||||
+------------------------------------------------------+ | ||||
</pre> | ||||
<p> | ||||
|
r31213 | Version 2 (headerlen=100): | ||
|
r27582 | </p> | ||
<pre> | ||||
+------------------------------------------------------------------+ | ||||
| | | | | | | ||||
| node | p1 node | p2 node | base node | link node | | ||||
| (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | ||||
| | | | | | | ||||
+------------------------------------------------------------------+ | ||||
</pre> | ||||
<p> | ||||
|
r31213 | Version 3 (headerlen=102): | ||
|
r27582 | </p> | ||
<pre> | ||||
+------------------------------------------------------------------------------+ | ||||
| | | | | | | | ||||
|
r31213 | | node | p1 node | p2 node | base node | link node | flags | | ||
|
r27582 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | | ||
| | | | | | | | ||||
+------------------------------------------------------------------------------+ | ||||
</pre> | ||||
<p> | ||||
|
r31213 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which contain a | ||
series of *delta*s, densely packed (no separators). These deltas describe a diff | ||||
from an existing entry (either that the recipient already has, or previously | ||||
specified in the bundle/changegroup). The format is described more fully in | ||||
"hg help internals.bdiff", but briefly: | ||||
|
r27582 | </p> | ||
|
r31287 | <pre> | ||
|
r31213 | +---------------------------------------------------------------+ | ||
| | | | | | ||||
| start offset | end offset | new length | content | | ||||
| (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | | ||||
| | | | | | ||||
+---------------------------------------------------------------+ | ||||
|
r31287 | </pre> | ||
|
r31213 | <p> | ||
Please note that the length field in the delta data does *not* include itself. | ||||
</p> | ||||
|
r27582 | <p> | ||
In version 1, the delta is always applied against the previous node from | ||||
the changegroup or the first parent if this is the first entry in the | ||||
changegroup. | ||||
</p> | ||||
<p> | ||||
|
r31213 | In version 2 and up, the delta base node is encoded in the entry in the | ||
|
r27582 | changegroup. This allows the delta to be expressed against any parent, | ||
which can result in smaller deltas and more efficient encoding of data. | ||||
</p> | ||||
|
r40083 | <p> | ||
The *flags* field holds bitwise flags affecting the processing of revision | ||||
data. The following flags are defined: | ||||
</p> | ||||
<dl> | ||||
<dt>32768 | ||||
<dd>Censored revision. The revision's fulltext has been replaced by censor metadata. May only occur on file revisions. | ||||
<dt>16384 | ||||
<dd>Ellipsis revision. Revision hash does not match data (likely due to rewritten parents). | ||||
<dt>8192 | ||||
<dd>Externally stored. The revision fulltext contains "key:value" "\n" delimited metadata defining an object stored elsewhere. Used by the LFS extension. | ||||
</dl> | ||||
<p> | ||||
For historical reasons, the integer values are identical to revlog version 1 | ||||
per-revision storage flags and correspond to bits being set in this 2-byte | ||||
field. Bits were allocated starting from the most-significant bit, hence the | ||||
reverse ordering and allocation of these flags. | ||||
</p> | ||||
|
r29747 | <h2>Changeset Segment</h2> | ||
|
r27582 | <p> | ||
The *changeset segment* consists of a single *delta group* holding | ||||
|
r31213 | changelog data. The *empty chunk* at the end of the *delta group* denotes | ||
the boundary to the *manifest segment*. | ||||
|
r27582 | </p> | ||
|
r29747 | <h2>Manifest Segment</h2> | ||
|
r27582 | <p> | ||
|
r31213 | The *manifest segment* consists of a single *delta group* holding manifest | ||
data. If treemanifests are in use, it contains only the manifest for the | ||||
root directory of the repository. Otherwise, it contains the entire | ||||
manifest data. The *empty chunk* at the end of the *delta group* denotes | ||||
the boundary to the next segment (either the *treemanifests segment* or the | ||||
*filelogs segment*, depending on version and the request options). | ||||
</p> | ||||
<h3>Treemanifests Segment</h3> | ||||
<p> | ||||
The *treemanifests segment* only exists in changegroup version "3", and | ||||
only if the 'treemanifest' param is part of the bundle2 changegroup part | ||||
(it is not possible to use changegroup version 3 outside of bundle2). | ||||
Aside from the filenames in the *treemanifests segment* containing a | ||||
trailing "/" character, it behaves identically to the *filelogs segment* | ||||
(see below). The final sub-segment is followed by an *empty chunk* (logically, | ||||
a sub-segment with filename size 0). This denotes the boundary to the | ||||
*filelogs segment*. | ||||
|
r27582 | </p> | ||
|
r29747 | <h2>Filelogs Segment</h2> | ||
|
r27582 | <p> | ||
|
r31213 | The *filelogs segment* consists of multiple sub-segments, each | ||
|
r27582 | corresponding to an individual file whose data is being described: | ||
</p> | ||||
<pre> | ||||
|
r31213 | +--------------------------------------------------+ | ||
| | | | | | | ||||
| filelog0 | filelog1 | filelog2 | ... | 0x0 | | ||||
| | | | | (4 bytes) | | ||||
| | | | | | | ||||
+--------------------------------------------------+ | ||||
|
r27582 | </pre> | ||
<p> | ||||
|
r31213 | The final filelog sub-segment is followed by an *empty chunk* (logically, | ||
a sub-segment with filename size 0). This denotes the end of the segment | ||||
and of the overall changegroup. | ||||
|
r27582 | </p> | ||
<p> | ||||
Each filelog sub-segment consists of the following: | ||||
</p> | ||||
<pre> | ||||
|
r31213 | +------------------------------------------------------+ | ||
| | | | | ||||
| filename length | filename | delta group | | ||||
| (4 bytes) | (<length - 4> bytes) | (various) | | ||||
| | | | | ||||
+------------------------------------------------------+ | ||||
|
r27582 | </pre> | ||
<p> | ||||
That is, a *chunk* consisting of the filename (not terminated or padded) | ||||
|
r31213 | followed by N chunks constituting the *delta group* for this file. The | ||
*empty chunk* at the end of each *delta group* denotes the boundary to the | ||||
next filelog sub-segment. | ||||
|
r27582 | </p> | ||
</div> | ||||
</div> | ||||
</div> | ||||
</body> | ||||
</html> | ||||
|
r36262 | $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic" | ||
404 Not Found | ||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | ||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | ||||
<head> | ||||
<link rel="icon" href="/static/hgicon.png" type="image/png" /> | ||||
<meta name="robots" content="index, nofollow" /> | ||||
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | ||||
<script type="text/javascript" src="/static/mercurial.js"></script> | ||||
<title>test: error</title> | ||||
</head> | ||||
<body> | ||||
<div class="container"> | ||||
<div class="menu"> | ||||
<div class="logo"> | ||||
<a href="https://mercurial-scm.org/"> | ||||
<img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> | ||||
</div> | ||||
<ul> | ||||
<li><a href="/shortlog">log</a></li> | ||||
<li><a href="/graph">graph</a></li> | ||||
<li><a href="/tags">tags</a></li> | ||||
<li><a href="/bookmarks">bookmarks</a></li> | ||||
<li><a href="/branches">branches</a></li> | ||||
</ul> | ||||
<ul> | ||||
<li><a href="/help">help</a></li> | ||||
</ul> | ||||
</div> | ||||
<div class="main"> | ||||
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | ||||
<h3>error</h3> | ||||
<form class="search" action="/log"> | ||||
<p><input name="rev" id="search1" type="text" size="30" value="" /></p> | ||||
<div id="hint">Find changesets by keywords (author, files, the commit message), revision | ||||
number or hash, or <a href="/help/revsets">revset expression</a>.</div> | ||||
</form> | ||||
<div class="description"> | ||||
<p> | ||||
An error occurred while processing your request: | ||||
</p> | ||||
<p> | ||||
Not Found | ||||
</p> | ||||
</div> | ||||
</div> | ||||
</div> | ||||
</body> | ||||
</html> | ||||
[1] | ||||
|
r25474 | $ killdaemons.py | ||
|
r18744 | |||
#endif | ||||