.\" Man page generated from reStructuredText. . .TH HG 1 "" "" "Mercurial Manual" .SH NAME hg \- Mercurial source code management system . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fBhg\fP \fIcommand\fP [\fIoption\fP]... [\fIargument\fP]... .SH DESCRIPTION .sp The \fBhg\fP command provides a command line interface to the Mercurial system. .SH COMMAND ELEMENTS .INDENT 0.0 .TP .B files... . indicates one or more filename or relative path filenames; see \%File Name Patterns\: for information on pattern matching .TP .B path . indicates a path on the local machine .TP .B revision . indicates a changeset which can be specified as a changeset revision number, a tag, or a unique substring of the changeset hash value .TP .B repository path . either the pathname of a local repository or the URI of a remote repository. .UNINDENT .SH OPTIONS .INDENT 0.0 .TP .BI \-R, \-\-repository \ . repository root directory or name of overlay bundle file .TP .BI \-\-cwd \ . change working directory .TP .B \-y, \-\-noninteractive . do not prompt, automatically pick the first choice for all prompts .TP .B \-q, \-\-quiet . suppress output .TP .B \-v, \-\-verbose . enable additional output .TP .BI \-\-color \ . when to colorize (boolean, always, auto, never, or debug) .TP .BI \-\-config \ . set/override config option (use \(aqsection.name=value\(aq) .TP .B \-\-debug . enable debugging output .TP .B \-\-debugger . start debugger .TP .BI \-\-encoding \ . set the charset encoding (default: UTF\-8) .TP .BI \-\-encodingmode \ . set the charset encoding mode (default: strict) .TP .B \-\-traceback . always print a traceback on exception .TP .B \-\-time . time how long the command takes .TP .B \-\-profile . print command execution profile .TP .B \-\-version . output version information and exit .TP .B \-h, \-\-help . display help and exit .TP .B \-\-hidden . consider hidden changesets .TP .BI \-\-pager \ . when to paginate (boolean, always, auto, or never) (default: auto) .UNINDENT .sp [+] marked option can be specified multiple times .SH COMMANDS .SS add .sp add the specified files on the next commit: .sp .nf .ft C hg add [OPTION]... [FILE]... .ft P .fi .sp Schedule files to be version controlled and added to the repository. .sp The files will be added to the repository at the next commit. To undo an add before that, see \%\fBhg forget\fP\:. .sp If no names are given, add all files to the repository (except files matching \fB.hgignore\fP). .sp Examples: .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .IP \(bu 2 . New (unknown) files are added automatically by \%\fBhg add\fP\:: .sp .nf .ft C $ ls foo.c $ hg status ? foo.c $ hg add adding foo.c $ hg status A foo.c .ft P .fi .IP \(bu 2 . Specific files to be added can be specified: .sp .nf .ft C $ ls bar.c foo.c $ hg status ? bar.c ? foo.c $ hg add bar.c $ hg status A bar.c ? foo.c .ft P .fi .UNINDENT .UNINDENT .UNINDENT .sp Returns 0 if all files are successfully added. .sp Options: .INDENT 0.0 .TP .BI \-I, \-\-include \ . include names matching the given patterns .TP .BI \-X, \-\-exclude \ . exclude names matching the given patterns .TP .B \-S, \-\-subrepos . recurse into subrepositories .TP .B \-n, \-\-dry\-run . do not perform actions, just print output .UNINDENT .sp [+] marked option can be specified multiple times .SS addremove .sp add all new files, delete all missing files: .sp .nf .ft C hg addremove [OPTION]... [FILE]... .ft P .fi .sp Add all new files and remove all missing files from the repository. .sp Unless names are given, new files are ignored if they match any of the patterns in \fB.hgignore\fP. As with add, these changes take effect at the next commit. .sp Use the \-s/\-\-similarity option to detect renamed files. This option takes a percentage between 0 (disabled) and 100 (files must be identical) as its parameter. With a parameter greater than 0, this compares every removed file with every added file and records those similar enough as renames. Detecting renamed files this way can be expensive. After using this option, \%\fBhg status \-C\fP\: can be used to check which files were identified as moved or renamed. If not specified, \-s/\-\-similarity defaults to 100 and only renames of identical files are detected. .sp Examples: .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .IP \(bu 2 . A number of files (bar.c and foo.c) are new, while foobar.c has been removed (without using \%\fBhg remove\fP\:) from the repository: .sp .nf .ft C $ ls bar.c foo.c $ hg status ! foobar.c ? bar.c ? foo.c $ hg addremove adding bar.c adding foo.c removing foobar.c $ hg status A bar.c A foo.c R foobar.c .ft P .fi .IP \(bu 2 . A file foobar.c was moved to foo.c without using \%\fBhg rename\fP\:. Afterwards, it was edited slightly: .sp .nf .ft C $ ls foo.c $ hg status ! foobar.c ? foo.c $ hg addremove \-\-similarity 90 removing foobar.c adding foo.c recording removal of foobar.c as rename to foo.c (94% similar) $ hg status \-C A foo.c foobar.c R foobar.c .ft P .fi .UNINDENT .UNINDENT .UNINDENT .sp Returns 0 if all files are successfully added. .sp Options: .INDENT 0.0 .TP .BI \-s, \-\-similarity \ . guess renamed files by similarity (0<=s<=100) .TP .B \-S, \-\-subrepos . recurse into subrepositories .TP .BI \-I, \-\-include \ . include names matching the given patterns .TP .BI \-X, \-\-exclude \ . exclude names matching the given patterns .TP .B \-n, \-\-dry\-run . do not perform actions, just print output .UNINDENT .sp [+] marked option can be specified multiple times .SS annotate .sp show changeset information by line for each file: .sp .nf .ft C hg annotate [\-r REV] [\-f] [\-a] [\-u] [\-d] [\-n] [\-c] [\-l] FILE... .ft P .fi .sp List changes in files, showing the revision id responsible for each line. .sp This command is useful for discovering when a change was made and by whom. .sp If you include \-\-file, \-\-user, or \-\-date, the revision number is suppressed unless you also include \-\-number. .sp Without the \-a/\-\-text option, annotate will avoid processing files it detects as binary. With \-a, annotate will annotate the file anyway, although the results will probably be neither useful nor desirable. .sp Template: .sp The following keywords are supported in addition to the common template keywords and functions. See also \%\fBhg help templates\fP\:. .INDENT 0.0 .TP .B lines . List of lines with annotation data. .TP .B path . String. Repository\-absolute path of the specified file. .UNINDENT .sp And each entry of \fB{lines}\fP provides the following sub\-keywords in addition to \fB{date}\fP, \fB{node}\fP, \fB{rev}\fP, \fB{user}\fP, etc. .INDENT 0.0 .TP .B line . String. Line content. .TP .B lineno . Integer. Line number at that revision. .TP .B path . String. Repository\-absolute path of the file at that revision. .UNINDENT .sp See \%\fBhg help templates.operators\fP\: for the list expansion syntax. .sp Returns 0 on success. .sp Options: .INDENT 0.0 .TP .BI \-r, \-\-rev \ . annotate the specified revision .TP .B \-\-follow . follow copies/renames and list the filename (DEPRECATED) .TP .B \-\-no\-follow . don\(aqt follow copies and renames .TP .B \-a, \-\-text . treat all files as text .TP .B \-u, \-\-user . list the author (long with \-v) .TP .B \-f, \-\-file . list the filename .TP .B \-d, \-\-date . list the date (short with \-q) .TP .B \-n, \-\-number . list the revision number (default) .TP .B \-c, \-\-changeset . list the changeset .TP .B \-l, \-\-line\-number . show line number at the first appearance .TP .BI \-\-skip \ . revision to not display (EXPERIMENTAL) .TP .B \-w, \-\-ignore\-all\-space . ignore white space when comparing lines .TP .B \-b, \-\-ignore\-space\-change . ignore changes in the amount of white space .TP .B \-B, \-\-ignore\-blank\-lines . ignore changes whose lines are all blank .TP .B \-Z, \-\-ignore\-space\-at\-eol . ignore changes in whitespace at EOL .TP .BI \-I, \-\-include \ . include names matching the given patterns .TP .BI \-X, \-\-exclude \ . exclude names matching the given patterns .TP .BI \-T, \-\-template \