diff options
Diffstat (limited to 'doc/hg.1.html')
-rw-r--r-- | doc/hg.1.html | 8975 |
1 files changed, 8975 insertions, 0 deletions
diff --git a/doc/hg.1.html b/doc/hg.1.html new file mode 100644 index 0000000..9a0a22f --- /dev/null +++ b/doc/hg.1.html @@ -0,0 +1,8975 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="generator" content="Docutils 0.8.1: http://docutils.sourceforge.net/" /> +<title>hg</title> +<meta name="author" content="Matt Mackall <mpm@selenic.com>" /> +<meta name="organization" content="Mercurial" /> +<link rel="stylesheet" href="style.css" type="text/css" /> +</head> +<body> +<div class="document" id="hg"> +<h1 class="title">hg</h1> +<h2 class="subtitle" id="mercurial-source-code-management-system">Mercurial source code management system</h2> +<table class="docinfo" frame="void" rules="none"> +<col class="docinfo-name" /> +<col class="docinfo-content" /> +<tbody valign="top"> +<tr><th class="docinfo-name">Author:</th> +<td>Matt Mackall <<a class="reference external" href="mailto:mpm@selenic.com">mpm@selenic.com</a>></td></tr> +<tr><th class="docinfo-name">Organization:</th> +<td>Mercurial</td></tr> +<tr class="field"><th class="docinfo-name">Manual section:</th><td class="field-body">1</td> +</tr> +<tr class="field"><th class="docinfo-name">Manual group:</th><td class="field-body">Mercurial Manual</td> +</tr> +</tbody> +</table> +<div class="contents htmlonly topic" id="contents"> +<p class="topic-title first">Contents</p> +<ul class="simple"> +<li><a class="reference internal" href="#synopsis" id="id39">Synopsis</a></li> +<li><a class="reference internal" href="#description" id="id40">Description</a></li> +<li><a class="reference internal" href="#command-elements" id="id41">Command Elements</a></li> +<li><a class="reference internal" href="#options" id="id42">Options</a></li> +<li><a class="reference internal" href="#commands" id="id43">Commands</a></li> +<li><a class="reference internal" href="#date-formats" id="id44">Date Formats</a></li> +<li><a class="reference internal" href="#diff-formats" id="id45">Diff Formats</a></li> +<li><a class="reference internal" href="#environment-variables" id="id46">Environment Variables</a></li> +<li><a class="reference internal" href="#using-additional-features" id="id47">Using Additional Features</a></li> +<li><a class="reference internal" href="#specifying-file-sets" id="id48">Specifying File Sets</a></li> +<li><a class="reference internal" href="#id1" id="id49">Glossary</a></li> +<li><a class="reference internal" href="#syntax-for-mercurial-ignore-files" id="id50">Syntax for Mercurial Ignore Files</a></li> +<li><a class="reference internal" href="#configuring-hgweb" id="id51">Configuring hgweb</a></li> +<li><a class="reference internal" href="#id4" id="id52">Merge Tools</a></li> +<li><a class="reference internal" href="#specifying-multiple-revisions" id="id53">Specifying Multiple Revisions</a></li> +<li><a class="reference internal" href="#file-name-patterns" id="id54">File Name Patterns</a></li> +<li><a class="reference internal" href="#working-with-phases" id="id55">Working with Phases</a></li> +<li><a class="reference internal" href="#specifying-single-revisions" id="id56">Specifying Single Revisions</a></li> +<li><a class="reference internal" href="#specifying-revision-sets" id="id57">Specifying Revision Sets</a></li> +<li><a class="reference internal" href="#subrepositories" id="id58">Subrepositories</a></li> +<li><a class="reference internal" href="#template-usage" id="id59">Template Usage</a></li> +<li><a class="reference internal" href="#url-paths" id="id60">URL Paths</a></li> +<li><a class="reference internal" href="#id5" id="id61">Extensions</a></li> +<li><a class="reference internal" href="#files" id="id62">Files</a></li> +<li><a class="reference internal" href="#bugs" id="id63">Bugs</a></li> +<li><a class="reference internal" href="#see-also" id="id64">See Also</a></li> +<li><a class="reference internal" href="#author" id="id65">Author</a></li> +<li><a class="reference internal" href="#resources" id="id66">Resources</a></li> +<li><a class="reference internal" href="#copying" id="id67">Copying</a></li> +</ul> +</div> +<div class="section" id="synopsis"> +<h1><a class="toc-backref" href="#contents">Synopsis</a></h1> +<p><strong>hg</strong> <em>command</em> [<em>option</em>]... [<em>argument</em>]...</p> +</div> +<div class="section" id="description"> +<h1><a class="toc-backref" href="#contents">Description</a></h1> +<p>The <strong>hg</strong> command provides a command line interface to the Mercurial +system.</p> +</div> +<div class="section" id="command-elements"> +<h1><a class="toc-backref" href="#contents">Command Elements</a></h1> +<dl class="docutils"> +<dt>files...</dt> +<dd>indicates one or more filename or relative path filenames; see +<a class="reference internal" href="#file-name-patterns">File Name Patterns</a> for information on pattern matching</dd> +<dt>path</dt> +<dd>indicates a path on the local machine</dd> +<dt>revision</dt> +<dd>indicates a changeset which can be specified as a changeset +revision number, a tag, or a unique substring of the changeset +hash value</dd> +<dt>repository path</dt> +<dd>either the pathname of a local repository or the URI of a remote +repository.</dd> +</dl> +</div> +<div class="section" id="options"> +<h1><a class="toc-backref" href="#contents">Options</a></h1> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-R</span>, <span class="option">--repository</span></kbd></td> +</tr> +<tr><td> </td><td>repository root directory or name of overlay bundle file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--cwd</span></kbd></td> +<td>change working directory</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-y</span>, <span class="option">--noninteractive</span></kbd></td> +</tr> +<tr><td> </td><td>do not prompt, automatically pick the first choice for all prompts</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-q</span>, <span class="option">--quiet</span></kbd></td> +<td>suppress output</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-v</span>, <span class="option">--verbose</span></kbd></td> +<td>enable additional output</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--config</span></kbd></td> +<td>set/override config option (use 'section.name=value')</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--debug</span></kbd></td> +<td>enable debugging output</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--debugger</span></kbd></td> +<td>start debugger</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--encoding</span></kbd></td> +<td>set the charset encoding (default: ascii)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--encodingmode</span></kbd></td> +<td>set the charset encoding mode (default: strict)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--traceback</span></kbd></td> +<td>always print a traceback on exception</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--time</span></kbd></td> +<td>time how long the command takes</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--profile</span></kbd></td> +<td>print command execution profile</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--version</span></kbd></td> +<td>output version information and exit</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-h</span>, <span class="option">--help</span></kbd></td> +<td>display help and exit</td></tr> +</tbody> +</table> +</div> +<div class="section" id="commands"> +<h1><a class="toc-backref" href="#contents">Commands</a></h1> +<div class="section" id="add"> +<h2>add</h2> +<pre class="literal-block"> +hg add [OPTION]... [FILE]... +</pre> +<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 +undo an add before that, see <a class="reference external" href="hg.1.html#forget"><tt class="docutils literal">hg forget</tt></a>.</p> +<p>If no names are given, add all files to the repository.</p> +<div class="verbose container"> +<p>An example showing how new (unknown) files are added +automatically by <a class="reference external" href="hg.1.html#add"><tt class="docutils literal">hg add</tt></a>:</p> +<pre class="literal-block"> +$ ls +foo.c +$ hg status +? foo.c +$ hg add +adding foo.c +$ hg status +A foo.c +</pre> +</div> +<p>Returns 0 if all files are successfully added.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-S</span>, <span class="option">--subrepos</span></kbd></td> +<td>recurse into subrepositories</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-n</span>, <span class="option">--dry-run</span></kbd></td> +<td>do not perform actions, just print output</td></tr> +</tbody> +</table> +</div> +<div class="section" id="addremove"> +<h2>addremove</h2> +<pre class="literal-block"> +hg addremove [OPTION]... [FILE]... +</pre> +<p>Add all new files and remove all missing files from the +repository.</p> +<p>New files are ignored if they match any of the patterns in +<tt class="docutils literal">.hgignore</tt>. As with add, these changes take effect at the next +commit.</p> +<p>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, <a class="reference external" href="hg.1.html#status"><tt class="docutils literal">hg status <span class="pre">-C</span></tt></a> 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.</p> +<p>Returns 0 if all files are successfully added.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-s</span>, <span class="option">--similarity</span></kbd></td> +</tr> +<tr><td> </td><td>guess renamed files by similarity (0<=s<=100)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-n</span>, <span class="option">--dry-run</span></kbd></td> +<td>do not perform actions, just print output</td></tr> +</tbody> +</table> +</div> +<div class="section" id="annotate"> +<h2>annotate</h2> +<pre class="literal-block"> +hg annotate [-r REV] [-f] [-a] [-u] [-d] [-n] [-c] [-l] FILE... +</pre> +<p>List changes in files, showing the revision id responsible for +each line</p> +<p>This command is useful for discovering when a change was made and +by whom.</p> +<p>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.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>annotate the specified revision</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--follow</span></kbd></td> +<td>follow copies/renames and list the filename (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--no-follow</span></kbd></td> +<td>don't follow copies and renames</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--text</span></kbd></td> +<td>treat all files as text</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--user</span></kbd></td> +<td>list the author (long with -v)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--file</span></kbd></td> +<td>list the filename</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>list the date (short with -q)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-n</span>, <span class="option">--number</span></kbd></td> +<td>list the revision number (default)</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-c</span>, <span class="option">--changeset</span></kbd></td> +</tr> +<tr><td> </td><td>list the changeset</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-l</span>, <span class="option">--line-number</span></kbd></td> +</tr> +<tr><td> </td><td>show line number at the first appearance</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-w</span>, <span class="option">--ignore-all-space</span></kbd></td> +</tr> +<tr><td> </td><td>ignore white space when comparing lines</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-b</span>, <span class="option">--ignore-space-change</span></kbd></td> +</tr> +<tr><td> </td><td>ignore changes in the amount of white space</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-B</span>, <span class="option">--ignore-blank-lines</span></kbd></td> +</tr> +<tr><td> </td><td>ignore changes whose lines are all blank</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td><p class="first">exclude names matching the given patterns</p> +<p class="last">aliases: blame</p> +</td></tr> +</tbody> +</table> +</div> +<div class="section" id="archive"> +<h2>archive</h2> +<pre class="literal-block"> +hg archive [OPTION]... DEST +</pre> +<p>By default, the revision used is the parent of the working +directory; use -r/--rev to specify a different revision.</p> +<p>The archive type is automatically detected based on file +extension (or override using -t/--type).</p> +<div class="verbose container"> +<p>Examples:</p> +<ul> +<li><p class="first">create a zip file containing the 1.0 release:</p> +<pre class="literal-block"> +hg archive -r 1.0 project-1.0.zip +</pre> +</li> +<li><p class="first">create a tarball excluding .hg files:</p> +<pre class="literal-block"> +hg archive project.tar.gz -X ".hg*" +</pre> +</li> +</ul> +</div> +<p>Valid types are:</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name"><tt class="docutils literal">files</tt>:</th><td class="field-body">a directory full of files (default)</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">tar</tt>:</th><td class="field-body">tar archive, uncompressed</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">tbz2</tt>:</th><td class="field-body">tar archive, compressed using bzip2</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">tgz</tt>:</th><td class="field-body">tar archive, compressed using gzip</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">uzip</tt>:</th><td class="field-body">zip archive, uncompressed</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">zip</tt>:</th><td class="field-body">zip archive, compressed using deflate</td> +</tr> +</tbody> +</table> +<p>The exact name of the destination archive or directory is given +using a format string; see <a class="reference external" href="hg.1.html#export"><tt class="docutils literal">hg help export</tt></a> for details.</p> +<p>Each member added to an archive file has a directory prefix +prepended. Use -p/--prefix to specify a format string for the +prefix. The default is the basename of the archive, with suffixes +removed.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">--no-decode</span></kbd></td> +<td>do not pass files through decoders</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-p</span>, <span class="option">--prefix</span></kbd></td> +<td>directory prefix for files in archive</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>revision to distribute</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-t</span>, <span class="option">--type</span></kbd></td> +<td>type of distribution to create</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-S</span>, <span class="option">--subrepos</span></kbd></td> +<td>recurse into subrepositories</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +</tbody> +</table> +</div> +<div class="section" id="backout"> +<h2>backout</h2> +<pre class="literal-block"> +hg backout [OPTION]... [-r] REV +</pre> +<p>Prepare a new changeset with the effect of REV undone in the +current working directory.</p> +<p>If REV is the parent of the working directory, then this new changeset +is committed automatically. Otherwise, hg needs to merge the +changes and the merged result is left uncommitted.</p> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">backout cannot be used to fix either an unwanted or +incorrect merge.</p> +</div> +<div class="verbose container"> +<p>By default, the pending changeset will have one parent, +maintaining a linear history. With --merge, the pending +changeset will instead have two parents: the old parent of the +working directory and a new child of REV that simply undoes REV.</p> +<p>Before version 1.7, the behavior without --merge was equivalent +to specifying --merge followed by <a class="reference external" href="hg.1.html#update"><tt class="docutils literal">hg update <span class="pre">--clean</span> .</tt></a> to +cancel the merge and leave the child of REV as a head to be +merged separately.</p> +</div> +<p>See <a class="reference external" href="hg.1.html#dates"><tt class="docutils literal">hg help dates</tt></a> for a list of formats valid for -d/--date.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">--merge</span></kbd></td> +<td>merge with old dirstate parent after backout</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--parent</span></kbd></td> +<td>parent to choose when backing out merge (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>revision to backout</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-t</span>, <span class="option">--tool</span></kbd></td> +<td>specify merge tool</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--message</span></kbd></td> +<td>use text as commit message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--logfile</span></kbd></td> +<td>read commit message from file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>record the specified date as commit date</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--user</span></kbd></td> +<td>record the specified user as committer</td></tr> +</tbody> +</table> +</div> +<div class="section" id="bisect"> +<h2>bisect</h2> +<pre class="literal-block"> +hg bisect [-gbsr] [-U] [-c CMD] [REV] +</pre> +<p>This command helps to find changesets which introduce problems. To +use, mark the earliest changeset you know exhibits the problem as +bad, then mark the latest changeset which is free from the problem +as good. Bisect will update your working directory to a revision +for testing (unless the -U/--noupdate option is specified). Once +you have performed tests, mark the working directory as good or +bad, and bisect will either update to another candidate changeset +or announce that it has found the bad revision.</p> +<p>As a shortcut, you can also use the revision argument to mark a +revision as good or bad without checking it out first.</p> +<p>If you supply a command, it will be used for automatic bisection. +The environment variable HG_NODE will contain the ID of the +changeset being tested. The exit status of the command will be +used to mark revisions as good or bad: status 0 means good, 125 +means to skip the revision, 127 (command not found) will abort the +bisection, and any other non-zero exit status means the revision +is bad.</p> +<div class="verbose container"> +<p>Some examples:</p> +<ul> +<li><p class="first">start a bisection with known bad revision 12, and good revision 34:</p> +<pre class="literal-block"> +hg bisect --bad 34 +hg bisect --good 12 +</pre> +</li> +<li><p class="first">advance the current bisection by marking current revision as good or +bad:</p> +<pre class="literal-block"> +hg bisect --good +hg bisect --bad +</pre> +</li> +<li><p class="first">mark the current revision, or a known revision, to be skipped (eg. if +that revision is not usable because of another issue):</p> +<pre class="literal-block"> +hg bisect --skip +hg bisect --skip 23 +</pre> +</li> +<li><p class="first">forget the current bisection:</p> +<pre class="literal-block"> +hg bisect --reset +</pre> +</li> +<li><p class="first">use 'make && make tests' to automatically find the first broken +revision:</p> +<pre class="literal-block"> +hg bisect --reset +hg bisect --bad 34 +hg bisect --good 12 +hg bisect --command 'make && make tests' +</pre> +</li> +<li><p class="first">see all changesets whose states are already known in the current +bisection:</p> +<pre class="literal-block"> +hg log -r "bisect(pruned)" +</pre> +</li> +<li><p class="first">see the changeset currently being bisected (especially useful +if running with -U/--noupdate):</p> +<pre class="literal-block"> +hg log -r "bisect(current)" +</pre> +</li> +<li><p class="first">see all changesets that took part in the current bisection:</p> +<pre class="literal-block"> +hg log -r "bisect(range)" +</pre> +</li> +<li><p class="first">with the graphlog extension, you can even get a nice graph:</p> +<pre class="literal-block"> +hg log --graph -r "bisect(range)" +</pre> +</li> +</ul> +<p>See <a class="reference external" href="hg.1.html#revsets"><tt class="docutils literal">hg help revsets</tt></a> for more about the <cite>bisect()</cite> keyword.</p> +</div> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--reset</span></kbd></td> +<td>reset bisect state</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-g</span>, <span class="option">--good</span></kbd></td> +<td>mark changeset good</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-b</span>, <span class="option">--bad</span></kbd></td> +<td>mark changeset bad</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-s</span>, <span class="option">--skip</span></kbd></td> +<td>skip testing changeset</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--extend</span></kbd></td> +<td>extend the bisect range</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-c</span>, <span class="option">--command</span></kbd></td> +<td>use command to check changeset state</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-U</span>, <span class="option">--noupdate</span></kbd></td> +<td>do not update to target</td></tr> +</tbody> +</table> +</div> +<div class="section" id="bookmarks"> +<h2>bookmarks</h2> +<pre class="literal-block"> +hg bookmarks [-f] [-d] [-i] [-m NAME] [-r REV] [NAME] +</pre> +<p>Bookmarks are pointers to certain commits that move when committing. +Bookmarks are local. They can be renamed, copied and deleted. It is +possible to use <a class="reference external" href="hg.1.html#merge"><tt class="docutils literal">hg merge NAME</tt></a> to merge from a given bookmark, and +<a class="reference external" href="hg.1.html#update"><tt class="docutils literal">hg update NAME</tt></a> to update to a given bookmark.</p> +<p>You can use <a class="reference external" href="hg.1.html#bookmark"><tt class="docutils literal">hg bookmark NAME</tt></a> to set a bookmark on the working +directory's parent revision with the given name. If you specify +a revision using -r REV (where REV may be an existing bookmark), +the bookmark is assigned to that revision.</p> +<p>Bookmarks can be pushed and pulled between repositories (see <a class="reference external" href="hg.1.html#push"><tt class="docutils literal">hg help +push</tt></a> and <a class="reference external" href="hg.1.html#pull"><tt class="docutils literal">hg help pull</tt></a>). This requires both the local and remote +repositories to support bookmarks. For versions prior to 1.8, this means +the bookmarks extension must be enabled.</p> +<p>With -i/--inactive, the new bookmark will not be made the active +bookmark. If -r/--rev is given, the new bookmark will not be made +active even if -i/--inactive is not given. If no NAME is given, the +current active bookmark will be marked inactive.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>force</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>revision</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--delete</span></kbd></td> +<td>delete a given bookmark</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--rename</span></kbd></td> +<td>rename a given bookmark</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-i</span>, <span class="option">--inactive</span></kbd></td> +<td>mark a bookmark inactive</td></tr> +</tbody> +</table> +</div> +<div class="section" id="branch"> +<h2>branch</h2> +<pre class="literal-block"> +hg branch [-fC] [NAME] +</pre> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">Branch names are permanent and global. Use <a class="reference external" href="hg.1.html#bookmark"><tt class="docutils literal">hg bookmark</tt></a> to create a +light-weight bookmark instead. See <a class="reference external" href="hg.1.html#glossary"><tt class="docutils literal">hg help glossary</tt></a> for more +information about named branches and bookmarks.</p> +</div> +<p>With no argument, show the current branch name. With one argument, +set the working directory branch name (the branch will not exist +in the repository until the next commit). Standard practice +recommends that primary development take place on the 'default' +branch.</p> +<p>Unless -f/--force is specified, branch will not let you set a +branch name that already exists, even if it's inactive.</p> +<p>Use -C/--clean to reset the working directory branch to that of +the parent of the working directory, negating a previous branch +change.</p> +<p>Use the command <a class="reference external" href="hg.1.html#update"><tt class="docutils literal">hg update</tt></a> to switch to an existing branch. Use +<a class="reference external" href="hg.1.html#commit"><tt class="docutils literal">hg commit <span class="pre">--close-branch</span></tt></a> to mark this branch as closed.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>set branch name even if it shadows an existing branch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-C</span>, <span class="option">--clean</span></kbd></td> +<td>reset branch name to parent branch name</td></tr> +</tbody> +</table> +</div> +<div class="section" id="branches"> +<h2>branches</h2> +<pre class="literal-block"> +hg branches [-ac] +</pre> +<p>List the repository's named branches, indicating which ones are +inactive. If -c/--closed is specified, also list branches which have +been marked closed (see <a class="reference external" href="hg.1.html#commit"><tt class="docutils literal">hg commit <span class="pre">--close-branch</span></tt></a>).</p> +<p>If -a/--active is specified, only show active branches. A branch +is considered active if it contains repository heads.</p> +<p>Use the command <a class="reference external" href="hg.1.html#update"><tt class="docutils literal">hg update</tt></a> to switch to an existing branch.</p> +<p>Returns 0.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--active</span></kbd></td> +<td>show only branches that have unmerged heads</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-c</span>, <span class="option">--closed</span></kbd></td> +<td>show normal and closed branches</td></tr> +</tbody> +</table> +</div> +<div class="section" id="bundle"> +<h2>bundle</h2> +<pre class="literal-block"> +hg bundle [-f] [-t TYPE] [-a] [-r REV]... [--base REV]... FILE [DEST] +</pre> +<p>Generate a compressed changegroup file collecting changesets not +known to be in another repository.</p> +<p>If you omit the destination repository, then hg assumes the +destination will have all the nodes you specify with --base +parameters. To create a bundle containing all changesets, use +-a/--all (or --base null).</p> +<p>You can change compression method with the -t/--type option. +The available compression methods are: none, bzip2, and +gzip (by default, bundles are compressed using bzip2).</p> +<p>The bundle file can then be transferred using conventional means +and applied to another repository with the unbundle or pull +command. This is useful when direct push and pull are not +available or when exporting an entire repository is undesirable.</p> +<p>Applying bundles preserves all changeset contents including +permissions, copy/rename information, and revision history.</p> +<p>Returns 0 on success, 1 if no changes found.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>run even when the destination is unrelated</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>a changeset intended to be added to the destination</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-b</span>, <span class="option">--branch</span></kbd></td> +<td>a specific branch you would like to bundle</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--base</span></kbd></td> +<td>a base changeset assumed to be available at the destination</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--all</span></kbd></td> +<td>bundle all changesets in the repository</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-t</span>, <span class="option">--type</span></kbd></td> +<td>bundle compression type to use (default: bzip2)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--ssh</span></kbd></td> +<td>specify ssh command to use</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--remotecmd</span></kbd></td> +<td>specify hg command to run on the remote side</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--insecure</span></kbd></td> +<td>do not verify server certificate (ignoring web.cacerts config)</td></tr> +</tbody> +</table> +</div> +<div class="section" id="cat"> +<h2>cat</h2> +<pre class="literal-block"> +hg cat [OPTION]... FILE... +</pre> +<p>Print the specified files as they were at the given revision. If +no revision is given, the parent of the working directory is used, +or tip if no revision is checked out.</p> +<p>Output may be to a file, in which case the name of the file is +given using a format string. The formatting rules are the same as +for the export command, with the following additions:</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name"><tt class="docutils literal">%s</tt>:</th><td class="field-body">basename of file being printed</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">%d</tt>:</th><td class="field-body">dirname of file being printed, or '.' if in repository root</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">%p</tt>:</th><td class="field-body">root-relative path name of file being printed</td> +</tr> +</tbody> +</table> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-o</span>, <span class="option">--output</span></kbd></td> +<td>print output to file with formatted name</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>print the given revision</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--decode</span></kbd></td> +<td>apply any matching decode filter</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +</tbody> +</table> +</div> +<div class="section" id="clone"> +<h2>clone</h2> +<pre class="literal-block"> +hg clone [OPTION]... SOURCE [DEST] +</pre> +<p>Create a copy of an existing repository in a new directory.</p> +<p>If no destination directory name is specified, it defaults to the +basename of the source.</p> +<p>The location of the source is added to the new repository's +<tt class="docutils literal">.hg/hgrc</tt> file, as the default to be used for future pulls.</p> +<p>Only local paths and <tt class="docutils literal"><span class="pre">ssh://</span></tt> URLs are supported as +destinations. For <tt class="docutils literal"><span class="pre">ssh://</span></tt> destinations, no working directory or +<tt class="docutils literal">.hg/hgrc</tt> will be created on the remote side.</p> +<p>To pull only a subset of changesets, specify one or more revisions +identifiers with -r/--rev or branches with -b/--branch. The +resulting clone will contain only the specified changesets and +their ancestors. These options (or 'clone src#rev dest') imply +--pull, even for local source repositories. Note that specifying a +tag will include the tagged changeset but not the changeset +containing the tag.</p> +<p>To check out a particular version, use -u/--update, or +-U/--noupdate to create a clone with no working directory.</p> +<div class="verbose container"> +<p>For efficiency, hardlinks are used for cloning whenever the +source and destination are on the same filesystem (note this +applies only to the repository data, not to the working +directory). Some filesystems, such as AFS, implement hardlinking +incorrectly, but do not report errors. In these cases, use the +--pull option to avoid hardlinking.</p> +<p>In some cases, you can clone repositories and the working +directory using full hardlinks with</p> +<pre class="literal-block"> +$ cp -al REPO REPOCLONE +</pre> +<p>This is the fastest way to clone, but it is not always safe. The +operation is not atomic (making sure REPO is not modified during +the operation is up to you) and you have to make sure your +editor breaks hardlinks (Emacs and most Linux Kernel tools do +so). Also, this is not compatible with certain extensions that +place their metadata under the .hg directory, such as mq.</p> +<p>Mercurial will update the working directory to the first applicable +revision from this list:</p> +<ol class="loweralpha simple"> +<li>null if -U or the source repository has no changesets</li> +<li>if -u . and the source repository is local, the first parent of +the source repository's working directory</li> +<li>the changeset specified with -u (if a branch name, this means the +latest head of that branch)</li> +<li>the changeset specified with -r</li> +<li>the tipmost head specified with -b</li> +<li>the tipmost head specified with the url#branch source syntax</li> +<li>the tipmost head of the default branch</li> +<li>tip</li> +</ol> +<p>Examples:</p> +<ul> +<li><p class="first">clone a remote repository to a new directory named hg/:</p> +<pre class="literal-block"> +hg clone http://selenic.com/hg +</pre> +</li> +<li><p class="first">create a lightweight local clone:</p> +<pre class="literal-block"> +hg clone project/ project-feature/ +</pre> +</li> +<li><p class="first">clone from an absolute path on an ssh server (note double-slash):</p> +<pre class="literal-block"> +hg clone ssh://user@server//home/projects/alpha/ +</pre> +</li> +<li><p class="first">do a high-speed clone over a LAN while checking out a +specified version:</p> +<pre class="literal-block"> +hg clone --uncompressed http://server/repo -u 1.5 +</pre> +</li> +<li><p class="first">create a repository without changesets after a particular revision:</p> +<pre class="literal-block"> +hg clone -r 04e544 experimental/ good/ +</pre> +</li> +<li><p class="first">clone (and track) a particular named branch:</p> +<pre class="literal-block"> +hg clone http://selenic.com/hg#stable +</pre> +</li> +</ul> +</div> +<p>See <a class="reference external" href="hg.1.html#urls"><tt class="docutils literal">hg help urls</tt></a> for details on specifying URLs.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-U</span>, <span class="option">--noupdate</span></kbd></td> +<td>the clone will include an empty working copy (only a repository)</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-u</span>, <span class="option">--updaterev</span></kbd></td> +</tr> +<tr><td> </td><td>revision, tag or branch to check out</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>include the specified changeset</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-b</span>, <span class="option">--branch</span></kbd></td> +<td>clone only the specified branch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--pull</span></kbd></td> +<td>use pull protocol to copy metadata</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--uncompressed</span></kbd></td> +<td>use uncompressed transfer (fast over LAN)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--ssh</span></kbd></td> +<td>specify ssh command to use</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--remotecmd</span></kbd></td> +<td>specify hg command to run on the remote side</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--insecure</span></kbd></td> +<td>do not verify server certificate (ignoring web.cacerts config)</td></tr> +</tbody> +</table> +</div> +<div class="section" id="commit"> +<h2>commit</h2> +<pre class="literal-block"> +hg commit [OPTION]... [FILE]... +</pre> +<p>Commit changes to the given files into the repository. Unlike a +centralized SCM, this operation is a local operation. See +<a class="reference external" href="hg.1.html#push"><tt class="docutils literal">hg push</tt></a> for a way to actively distribute your changes.</p> +<p>If a list of files is omitted, all changes reported by <a class="reference external" href="hg.1.html#status"><tt class="docutils literal">hg status</tt></a> +will be committed.</p> +<p>If you are committing the result of a merge, do not provide any +filenames or -I/-X filters.</p> +<p>If no commit message is specified, Mercurial starts your +configured editor where you can enter a message. In case your +commit fails, you will find a backup of your message in +<tt class="docutils literal"><span class="pre">.hg/last-message.txt</span></tt>.</p> +<p>The --amend flag can be used to amend the parent of the +working directory with a new commit that contains the changes +in the parent in addition to those currently reported by <a class="reference external" href="hg.1.html#status"><tt class="docutils literal">hg status</tt></a>, +if there are any. The old commit is stored in a backup bundle in +<tt class="docutils literal"><span class="pre">.hg/strip-backup</span></tt> (see <a class="reference external" href="hg.1.html#bundle"><tt class="docutils literal">hg help bundle</tt></a> and <a class="reference external" href="hg.1.html#unbundle"><tt class="docutils literal">hg help unbundle</tt></a> +on how to restore it).</p> +<p>Message, user and date are taken from the amended commit unless +specified. When a message isn't specified on the command line, +the editor will open with the message of the amended commit.</p> +<p>It is not possible to amend public changesets (see <a class="reference external" href="hg.1.html#phases"><tt class="docutils literal">hg help phases</tt></a>) +or changesets that have children.</p> +<p>See <a class="reference external" href="hg.1.html#dates"><tt class="docutils literal">hg help dates</tt></a> for a list of formats valid for -d/--date.</p> +<p>Returns 0 on success, 1 if nothing changed.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-A</span>, <span class="option">--addremove</span></kbd></td> +</tr> +<tr><td> </td><td>mark new/missing files as added/removed before committing</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--close-branch</span></kbd></td> +<td>mark a branch as closed, hiding it from the branch list</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--amend</span></kbd></td> +<td>amend the parent of the working dir</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--message</span></kbd></td> +<td>use text as commit message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--logfile</span></kbd></td> +<td>read commit message from file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>record the specified date as commit date</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--user</span></kbd></td> +<td>record the specified user as committer</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-S</span>, <span class="option">--subrepos</span></kbd></td> +<td><p class="first">recurse into subrepositories</p> +<p class="last">aliases: ci</p> +</td></tr> +</tbody> +</table> +</div> +<div class="section" id="copy"> +<h2>copy</h2> +<pre class="literal-block"> +hg copy [OPTION]... [SOURCE]... DEST +</pre> +<p>Mark dest as having copies of source files. If dest is a +directory, copies are put in that directory. If dest is a file, +the source must be a single file.</p> +<p>By default, this command copies the contents of files as they +exist in the working directory. If invoked with -A/--after, the +operation is recorded, but no copying is performed.</p> +<p>This command takes effect with the next commit. To undo a copy +before that, see <a class="reference external" href="hg.1.html#revert"><tt class="docutils literal">hg revert</tt></a>.</p> +<p>Returns 0 on success, 1 if errors are encountered.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-A</span>, <span class="option">--after</span></kbd></td> +<td>record a copy that has already occurred</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>forcibly copy over an existing managed file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-n</span>, <span class="option">--dry-run</span></kbd></td> +<td><p class="first">do not perform actions, just print output</p> +<p class="last">aliases: cp</p> +</td></tr> +</tbody> +</table> +</div> +<div class="section" id="diff"> +<h2>diff</h2> +<pre class="literal-block"> +hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... +</pre> +<p>Show differences between revisions for the specified files.</p> +<p>Differences between files are shown using the unified diff format.</p> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">diff may generate unexpected results for merges, as it will +default to comparing against the working directory's first +parent changeset if no revisions are specified.</p> +</div> +<p>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, the working directory files are compared +to its parent.</p> +<p>Alternatively you can specify -c/--change with a revision to see +the changes in that changeset relative to its first parent.</p> +<p>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.</p> +<p>Use the -g/--git option to generate diffs in the git extended diff +format. For more information, read <a class="reference external" href="hg.1.html#diffs"><tt class="docutils literal">hg help diffs</tt></a>.</p> +<div class="verbose container"> +<p>Examples:</p> +<ul> +<li><p class="first">compare a file in the current working directory to its parent:</p> +<pre class="literal-block"> +hg diff foo.c +</pre> +</li> +<li><p class="first">compare two historical versions of a directory, with rename info:</p> +<pre class="literal-block"> +hg diff --git -r 1.0:1.2 lib/ +</pre> +</li> +<li><p class="first">get change stats relative to the last change on some date:</p> +<pre class="literal-block"> +hg diff --stat -r "date('may 2')" +</pre> +</li> +<li><p class="first">diff all newly-added files that contain a keyword:</p> +<pre class="literal-block"> +hg diff "set:added() and grep(GNU)" +</pre> +</li> +<li><p class="first">compare a revision and its parents:</p> +<pre class="literal-block"> +hg diff -c 9353 # compare against first parent +hg diff -r 9353^:9353 # same using revset syntax +hg diff -r 9353^2:9353 # compare against the second parent +</pre> +</li> +</ul> +</div> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>revision</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-c</span>, <span class="option">--change</span></kbd></td> +<td>change made by revision</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--text</span></kbd></td> +<td>treat all files as text</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-g</span>, <span class="option">--git</span></kbd></td> +<td>use git extended diff format</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--nodates</span></kbd></td> +<td>omit dates from diff headers</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-p</span>, <span class="option">--show-function</span></kbd></td> +</tr> +<tr><td> </td><td>show which function each change is in</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--reverse</span></kbd></td> +<td>produce a diff that undoes the changes</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-w</span>, <span class="option">--ignore-all-space</span></kbd></td> +</tr> +<tr><td> </td><td>ignore white space when comparing lines</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-b</span>, <span class="option">--ignore-space-change</span></kbd></td> +</tr> +<tr><td> </td><td>ignore changes in the amount of white space</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-B</span>, <span class="option">--ignore-blank-lines</span></kbd></td> +</tr> +<tr><td> </td><td>ignore changes whose lines are all blank</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-U</span>, <span class="option">--unified</span></kbd></td> +<td>number of lines of context to show</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--stat</span></kbd></td> +<td>output diffstat-style summary of changes</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-S</span>, <span class="option">--subrepos</span></kbd></td> +<td>recurse into subrepositories</td></tr> +</tbody> +</table> +</div> +<div class="section" id="export"> +<h2>export</h2> +<pre class="literal-block"> +hg export [OPTION]... [-o OUTFILESPEC] [-r] REV... +</pre> +<p>Print the changeset header and diffs for one or more revisions.</p> +<p>The information shown in the changeset header is: author, date, +branch name (if non-default), changeset hash, parent(s) and commit +comment.</p> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">export may generate unexpected diff output for merge +changesets, as it will compare the merge changeset against its +first parent only.</p> +</div> +<p>Output may be to a file, in which case the name of the file is +given using a format string. The formatting rules are as follows:</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name"><tt class="docutils literal">%%</tt>:</th><td class="field-body">literal "%" character</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">%H</tt>:</th><td class="field-body">changeset hash (40 hexadecimal digits)</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">%N</tt>:</th><td class="field-body">number of patches being generated</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">%R</tt>:</th><td class="field-body">changeset revision number</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">%b</tt>:</th><td class="field-body">basename of the exporting repository</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">%h</tt>:</th><td class="field-body">short-form changeset hash (12 hexadecimal digits)</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">%m</tt>:</th><td class="field-body">first line of the commit message (only alphanumeric characters)</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">%n</tt>:</th><td class="field-body">zero-padded sequence number, starting at 1</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">%r</tt>:</th><td class="field-body">zero-padded changeset revision number</td> +</tr> +</tbody> +</table> +<p>Without the -a/--text option, export will avoid generating diffs +of files it detects as binary. With -a, export will generate a +diff anyway, probably with undesirable results.</p> +<p>Use the -g/--git option to generate diffs in the git extended diff +format. See <a class="reference external" href="hg.1.html#diffs"><tt class="docutils literal">hg help diffs</tt></a> for more information.</p> +<p>With the --switch-parent option, the diff will be against the +second parent. It can be useful to review a merge.</p> +<div class="verbose container"> +<p>Examples:</p> +<ul> +<li><p class="first">use export and import to transplant a bugfix to the current +branch:</p> +<pre class="literal-block"> +hg export -r 9353 | hg import - +</pre> +</li> +<li><p class="first">export all the changesets between two revisions to a file with +rename information:</p> +<pre class="literal-block"> +hg export --git -r 123:150 > changes.txt +</pre> +</li> +<li><p class="first">split outgoing changes into a series of patches with +descriptive names:</p> +<pre class="literal-block"> +hg export -r "outgoing()" -o "%n-%m.patch" +</pre> +</li> +</ul> +</div> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-o</span>, <span class="option">--output</span></kbd></td> +<td>print output to file with formatted name</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">--switch-parent</span></kbd></td> +</tr> +<tr><td> </td><td>diff against the second parent</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>revisions to export</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--text</span></kbd></td> +<td>treat all files as text</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-g</span>, <span class="option">--git</span></kbd></td> +<td>use git extended diff format</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--nodates</span></kbd></td> +<td>omit dates from diff headers</td></tr> +</tbody> +</table> +</div> +<div class="section" id="forget"> +<h2>forget</h2> +<pre class="literal-block"> +hg forget [OPTION]... FILE... +</pre> +<p>Mark the specified files so they will no longer be tracked +after the next commit.</p> +<p>This only removes files from the current branch, not from the +entire project history, and it does not delete them from the +working directory.</p> +<p>To undo a forget before the next commit, see <a class="reference external" href="hg.1.html#add"><tt class="docutils literal">hg add</tt></a>.</p> +<div class="verbose container"> +<p>Examples:</p> +<ul> +<li><p class="first">forget newly-added binary files:</p> +<pre class="literal-block"> +hg forget "set:added() and binary()" +</pre> +</li> +<li><p class="first">forget files that would be excluded by .hgignore:</p> +<pre class="literal-block"> +hg forget "set:hgignore()" +</pre> +</li> +</ul> +</div> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +</tbody> +</table> +</div> +<div class="section" id="graft"> +<h2>graft</h2> +<pre class="literal-block"> +hg graft [OPTION]... [-r] REV... +</pre> +<p>This command uses Mercurial's merge logic to copy individual +changes from other branches without merging branches in the +history graph. This is sometimes known as 'backporting' or +'cherry-picking'. By default, graft will copy user, date, and +description from the source changesets.</p> +<p>Changesets that are ancestors of the current revision, that have +already been grafted, or that are merges will be skipped.</p> +<p>If --log is specified, log messages will have a comment appended +of the form:</p> +<pre class="literal-block"> +(grafted from CHANGESETHASH) +</pre> +<p>If a graft merge results in conflicts, the graft process is +interrupted so that the current merge can be manually resolved. +Once all conflicts are addressed, the graft process can be +continued with the -c/--continue option.</p> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">The -c/--continue option does not reapply earlier options.</p> +</div> +<div class="verbose container"> +<p>Examples:</p> +<ul> +<li><p class="first">copy a single change to the stable branch and edit its description:</p> +<pre class="literal-block"> +hg update stable +hg graft --edit 9393 +</pre> +</li> +<li><p class="first">graft a range of changesets with one exception, updating dates:</p> +<pre class="literal-block"> +hg graft -D "2085::2093 and not 2091" +</pre> +</li> +<li><p class="first">continue a graft after resolving conflicts:</p> +<pre class="literal-block"> +hg graft -c +</pre> +</li> +<li><p class="first">show the source of a grafted changeset:</p> +<pre class="literal-block"> +hg log --debug -r tip +</pre> +</li> +</ul> +</div> +<p>Returns 0 on successful completion.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>revisions to graft</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-c</span>, <span class="option">--continue</span></kbd></td> +<td>resume interrupted graft</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--edit</span></kbd></td> +<td>invoke editor on commit messages</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--log</span></kbd></td> +<td>append graft info to log message</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-D</span>, <span class="option">--currentdate</span></kbd></td> +</tr> +<tr><td> </td><td>record the current date as commit date</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-U</span>, <span class="option">--currentuser</span></kbd></td> +</tr> +<tr><td> </td><td>record the current user as committer</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>record the specified date as commit date</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--user</span></kbd></td> +<td>record the specified user as committer</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-t</span>, <span class="option">--tool</span></kbd></td> +<td>specify merge tool</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-n</span>, <span class="option">--dry-run</span></kbd></td> +<td>do not perform actions, just print output</td></tr> +</tbody> +</table> +</div> +<div class="section" id="grep"> +<h2>grep</h2> +<pre class="literal-block"> +hg grep [OPTION]... PATTERN [FILE]... +</pre> +<p>Search revisions of files for a regular expression.</p> +<p>This command behaves differently than Unix grep. It only accepts +Python/Perl regexps. It searches repository history, not the +working directory. It always prints the revision number in which a +match appears.</p> +<p>By default, grep only prints output for the first revision of a +file in which it finds a match. To get it to print every revision +that contains a change in match status ("-" for a match that +becomes a non-match, or "+" for a non-match that becomes a match), +use the --all flag.</p> +<p>Returns 0 if a match is found, 1 otherwise.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-0</span>, <span class="option">--print0</span></kbd></td> +<td>end fields with NUL</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--all</span></kbd></td> +<td>print all revisions that match</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--text</span></kbd></td> +<td>treat all files as text</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--follow</span></kbd></td> +<td>follow changeset history, or file history across copies and renames</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-i</span>, <span class="option">--ignore-case</span></kbd></td> +</tr> +<tr><td> </td><td>ignore case when matching</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-l</span>, <span class="option">--files-with-matches</span></kbd></td> +</tr> +<tr><td> </td><td>print only filenames and revisions that match</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-n</span>, <span class="option">--line-number</span></kbd></td> +</tr> +<tr><td> </td><td>print matching line numbers</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>only search files changed within revision range</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--user</span></kbd></td> +<td>list the author (long with -v)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>list the date (short with -q)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +</tbody> +</table> +</div> +<div class="section" id="heads"> +<h2>heads</h2> +<pre class="literal-block"> +hg heads [-ct] [-r STARTREV] [REV]... +</pre> +<p>With no arguments, show all repository branch heads.</p> +<p>Repository "heads" are changesets with no child changesets. They are +where development generally takes place and are the usual targets +for update and merge operations. Branch heads are changesets that have +no child changeset on the same branch.</p> +<p>If one or more REVs are given, only branch heads on the branches +associated with the specified changesets are shown. This means +that you can use <a class="reference external" href="hg.1.html#heads"><tt class="docutils literal">hg heads foo</tt></a> to see the heads on a branch +named <tt class="docutils literal">foo</tt>.</p> +<p>If -c/--closed is specified, also show branch heads marked closed +(see <a class="reference external" href="hg.1.html#commit"><tt class="docutils literal">hg commit <span class="pre">--close-branch</span></tt></a>).</p> +<p>If STARTREV is specified, only those heads that are descendants of +STARTREV will be displayed.</p> +<p>If -t/--topo is specified, named branch mechanics will be ignored and only +changesets without children will be shown.</p> +<p>Returns 0 if matching heads are found, 1 if not.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>show only heads which are descendants of STARTREV</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-t</span>, <span class="option">--topo</span></kbd></td> +<td>show topological heads only</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--active</span></kbd></td> +<td>show active branchheads only (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-c</span>, <span class="option">--closed</span></kbd></td> +<td>show normal and closed branch heads</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--style</span></kbd></td> +<td>display using template map file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--template</span></kbd></td> +<td>display with template</td></tr> +</tbody> +</table> +</div> +<div class="section" id="help"> +<h2>help</h2> +<pre class="literal-block"> +hg help [-ec] [TOPIC] +</pre> +<p>With no arguments, print a list of commands with short help messages.</p> +<p>Given a topic, extension, or command name, print help for that +topic.</p> +<p>Returns 0 if successful.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-e</span>, <span class="option">--extension</span></kbd></td> +</tr> +<tr><td> </td><td>show only help for extensions</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-c</span>, <span class="option">--command</span></kbd></td> +<td>show only help for commands</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-k</span>, <span class="option">--keyword</span></kbd></td> +<td>show topics matching keyword</td></tr> +</tbody> +</table> +</div> +<div class="section" id="identify"> +<h2>identify</h2> +<pre class="literal-block"> +hg identify [-nibtB] [-r REV] [SOURCE] +</pre> +<p>Print a summary identifying the repository state at REV using one or +two parent hash identifiers, followed by a "+" if the working +directory has uncommitted changes, the branch name (if not default), +a list of tags, and a list of bookmarks.</p> +<p>When REV is not given, print a summary of the current state of the +repository.</p> +<p>Specifying a path to a repository root or Mercurial bundle will +cause lookup to operate on that repository/bundle.</p> +<div class="verbose container"> +<p>Examples:</p> +<ul> +<li><p class="first">generate a build identifier for the working directory:</p> +<pre class="literal-block"> +hg id --id > build-id.dat +</pre> +</li> +<li><p class="first">find the revision corresponding to a tag:</p> +<pre class="literal-block"> +hg id -n -r 1.3 +</pre> +</li> +<li><p class="first">check the most recent revision of a remote repository:</p> +<pre class="literal-block"> +hg id -r tip http://selenic.com/hg/ +</pre> +</li> +</ul> +</div> +<p>Returns 0 if successful.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>identify the specified revision</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-n</span>, <span class="option">--num</span></kbd></td> +<td>show local revision number</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-i</span>, <span class="option">--id</span></kbd></td> +<td>show global revision id</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-b</span>, <span class="option">--branch</span></kbd></td> +<td>show branch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-t</span>, <span class="option">--tags</span></kbd></td> +<td>show tags</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-B</span>, <span class="option">--bookmarks</span></kbd></td> +</tr> +<tr><td> </td><td>show bookmarks</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--ssh</span></kbd></td> +<td>specify ssh command to use</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--remotecmd</span></kbd></td> +<td>specify hg command to run on the remote side</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--insecure</span></kbd></td> +<td><p class="first">do not verify server certificate (ignoring web.cacerts config)</p> +<p class="last">aliases: id</p> +</td></tr> +</tbody> +</table> +</div> +<div class="section" id="import"> +<h2>import</h2> +<pre class="literal-block"> +hg import [OPTION]... PATCH... +</pre> +<p>Import a list of patches and commit them individually (unless +--no-commit is specified).</p> +<p>If there are outstanding changes in the working directory, import +will abort unless given the -f/--force flag.</p> +<p>You can import a patch straight from a mail message. Even patches +as attachments work (to use the body part, it must have type +text/plain or text/x-patch). From and Subject headers of email +message are used as default committer and commit message. All +text/plain body parts before first diff are added to commit +message.</p> +<p>If the imported patch was generated by <a class="reference external" href="hg.1.html#export"><tt class="docutils literal">hg export</tt></a>, user and +description from patch override values from message headers and +body. Values given on command line with -m/--message and -u/--user +override these.</p> +<p>If --exact is specified, import will set the working directory to +the parent of each patch before applying it, and will abort if the +resulting changeset has a different ID than the one recorded in +the patch. This may happen due to character set problems or other +deficiencies in the text patch format.</p> +<p>Use --bypass to apply and commit patches directly to the +repository, not touching the working directory. Without --exact, +patches will be applied on top of the working directory parent +revision.</p> +<p>With -s/--similarity, hg will attempt to discover renames and +copies in the patch in the same way as <a class="reference external" href="hg.1.html#addremove"><tt class="docutils literal">hg addremove</tt></a>.</p> +<p>To read a patch from standard input, use "-" as the patch name. If +a URL is specified, the patch will be downloaded from it. +See <a class="reference external" href="hg.1.html#dates"><tt class="docutils literal">hg help dates</tt></a> for a list of formats valid for -d/--date.</p> +<div class="verbose container"> +<p>Examples:</p> +<ul> +<li><p class="first">import a traditional patch from a website and detect renames:</p> +<pre class="literal-block"> +hg import -s 80 http://example.com/bugfix.patch +</pre> +</li> +<li><p class="first">import a changeset from an hgweb server:</p> +<pre class="literal-block"> +hg import http://www.selenic.com/hg/rev/5ca8c111e9aa +</pre> +</li> +<li><p class="first">import all the patches in an Unix-style mbox:</p> +<pre class="literal-block"> +hg import incoming-patches.mbox +</pre> +</li> +<li><p class="first">attempt to exactly restore an exported changeset (not always +possible):</p> +<pre class="literal-block"> +hg import --exact proposed-fix.patch +</pre> +</li> +</ul> +</div> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-p</span>, <span class="option">--strip</span></kbd></td> +<td>directory strip option for patch. This has the same meaning as the corresponding patch option (default: 1)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-b</span>, <span class="option">--base</span></kbd></td> +<td>base path (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--edit</span></kbd></td> +<td>invoke editor on commit messages</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>skip check for outstanding uncommitted changes</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--no-commit</span></kbd></td> +<td>don't commit, just update the working directory</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--bypass</span></kbd></td> +<td>apply patch without touching the working directory</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--exact</span></kbd></td> +<td>apply patch to the nodes from which it was generated</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">--import-branch</span></kbd></td> +</tr> +<tr><td> </td><td>use any branch information in patch (implied by --exact)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--message</span></kbd></td> +<td>use text as commit message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--logfile</span></kbd></td> +<td>read commit message from file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>record the specified date as commit date</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--user</span></kbd></td> +<td>record the specified user as committer</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-s</span>, <span class="option">--similarity</span></kbd></td> +</tr> +<tr><td> </td><td><p class="first">guess renamed files by similarity (0<=s<=100)</p> +<p class="last">aliases: patch</p> +</td></tr> +</tbody> +</table> +</div> +<div class="section" id="incoming"> +<h2>incoming</h2> +<pre class="literal-block"> +hg incoming [-p] [-n] [-M] [-f] [-r REV]... [--bundle FILENAME] [SOURCE] +</pre> +<p>Show new changesets found in the specified path/URL or the default +pull location. These are the changesets that would have been pulled +if a pull at the time you issued this command.</p> +<p>For remote repository, using --bundle avoids downloading the +changesets twice if the incoming is followed by a pull.</p> +<p>See pull for valid source format details.</p> +<p>Returns 0 if there are incoming changes, 1 otherwise.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>run even if remote repository is unrelated</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-n</span>, <span class="option">--newest-first</span></kbd></td> +</tr> +<tr><td> </td><td>show newest record first</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--bundle</span></kbd></td> +<td>file to store the bundles into</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>a remote changeset intended to be added</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-B</span>, <span class="option">--bookmarks</span></kbd></td> +</tr> +<tr><td> </td><td>compare bookmarks</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-b</span>, <span class="option">--branch</span></kbd></td> +<td>a specific branch you would like to pull</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-p</span>, <span class="option">--patch</span></kbd></td> +<td>show patch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-g</span>, <span class="option">--git</span></kbd></td> +<td>use git extended diff format</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--limit</span></kbd></td> +<td>limit number of changes displayed</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-M</span>, <span class="option">--no-merges</span></kbd></td> +</tr> +<tr><td> </td><td>do not show merges</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--stat</span></kbd></td> +<td>output diffstat-style summary of changes</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-G</span>, <span class="option">--graph</span></kbd></td> +<td>show the revision DAG</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--style</span></kbd></td> +<td>display using template map file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--template</span></kbd></td> +<td>display with template</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--ssh</span></kbd></td> +<td>specify ssh command to use</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--remotecmd</span></kbd></td> +<td>specify hg command to run on the remote side</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--insecure</span></kbd></td> +<td>do not verify server certificate (ignoring web.cacerts config)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-S</span>, <span class="option">--subrepos</span></kbd></td> +<td><p class="first">recurse into subrepositories</p> +<p class="last">aliases: in</p> +</td></tr> +</tbody> +</table> +</div> +<div class="section" id="init"> +<h2>init</h2> +<pre class="literal-block"> +hg init [-e CMD] [--remotecmd CMD] [DEST] +</pre> +<p>Initialize a new repository in the given directory. If the given +directory does not exist, it will be created.</p> +<p>If no directory is given, the current directory is used.</p> +<p>It is possible to specify an <tt class="docutils literal"><span class="pre">ssh://</span></tt> URL as the destination. +See <a class="reference external" href="hg.1.html#urls"><tt class="docutils literal">hg help urls</tt></a> for more information.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--ssh</span></kbd></td> +<td>specify ssh command to use</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--remotecmd</span></kbd></td> +<td>specify hg command to run on the remote side</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--insecure</span></kbd></td> +<td>do not verify server certificate (ignoring web.cacerts config)</td></tr> +</tbody> +</table> +</div> +<div class="section" id="locate"> +<h2>locate</h2> +<pre class="literal-block"> +hg locate [OPTION]... [PATTERN]... +</pre> +<p>Print files under Mercurial control in the working directory whose +names match the given patterns.</p> +<p>By default, this command searches all directories in the working +directory. To search just the current directory and its +subdirectories, use "--include .".</p> +<p>If no patterns are given to match, this command prints the names +of all files under Mercurial control in the working directory.</p> +<p>If you want to feed the output of this command into the "xargs" +command, use the -0 option to both this command and "xargs". This +will avoid the problem of "xargs" treating single filenames that +contain whitespace as multiple filenames.</p> +<p>Returns 0 if a match is found, 1 otherwise.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>search the repository as it is in REV</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-0</span>, <span class="option">--print0</span></kbd></td> +<td>end filenames with NUL, for use with xargs</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--fullpath</span></kbd></td> +<td>print complete paths from the filesystem root</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +</tbody> +</table> +</div> +<div class="section" id="log"> +<h2>log</h2> +<pre class="literal-block"> +hg log [OPTION]... [FILE] +</pre> +<p>Print the revision history of the specified files or the entire +project.</p> +<p>If no revision range is specified, the default is <tt class="docutils literal">tip:0</tt> unless +--follow is set, in which case the working directory parent is +used as the starting revision.</p> +<p>File history is shown without following rename or copy history of +files. Use -f/--follow with a filename to follow history across +renames and copies. --follow without a filename will only show +ancestors or descendants of the starting revision.</p> +<p>By default this command prints revision number and changeset id, +tags, non-trivial parents, user, date and time, and a summary for +each commit. When the -v/--verbose switch is used, the list of +changed files and full commit message are shown.</p> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">log -p/--patch may generate unexpected diff output for merge +changesets, as it will only compare the merge changeset against +its first parent. Also, only files different from BOTH parents +will appear in files:.</p> +</div> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">for performance reasons, log FILE may omit duplicate changes +made on branches and will not show deletions. To see all +changes including duplicates and deletions, use the --removed +switch.</p> +</div> +<div class="verbose container"> +<p>Some examples:</p> +<ul> +<li><p class="first">changesets with full descriptions and file lists:</p> +<pre class="literal-block"> +hg log -v +</pre> +</li> +<li><p class="first">changesets ancestral to the working directory:</p> +<pre class="literal-block"> +hg log -f +</pre> +</li> +<li><p class="first">last 10 commits on the current branch:</p> +<pre class="literal-block"> +hg log -l 10 -b . +</pre> +</li> +<li><p class="first">changesets showing all modifications of a file, including removals:</p> +<pre class="literal-block"> +hg log --removed file.c +</pre> +</li> +<li><p class="first">all changesets that touch a directory, with diffs, excluding merges:</p> +<pre class="literal-block"> +hg log -Mp lib/ +</pre> +</li> +<li><p class="first">all revision numbers that match a keyword:</p> +<pre class="literal-block"> +hg log -k bug --template "{rev}\n" +</pre> +</li> +<li><p class="first">check if a given changeset is included is a tagged release:</p> +<pre class="literal-block"> +hg log -r "a21ccf and ancestor(1.9)" +</pre> +</li> +<li><p class="first">find all changesets by some user in a date range:</p> +<pre class="literal-block"> +hg log -k alice -d "may 2008 to jul 2008" +</pre> +</li> +<li><p class="first">summary of all changesets after the last tag:</p> +<pre class="literal-block"> +hg log -r "last(tagged())::" --template "{desc|firstline}\n" +</pre> +</li> +</ul> +</div> +<p>See <a class="reference external" href="hg.1.html#dates"><tt class="docutils literal">hg help dates</tt></a> for a list of formats valid for -d/--date.</p> +<p>See <a class="reference external" href="hg.1.html#revisions"><tt class="docutils literal">hg help revisions</tt></a> and <a class="reference external" href="hg.1.html#revsets"><tt class="docutils literal">hg help revsets</tt></a> for more about +specifying revisions.</p> +<p>See <a class="reference external" href="hg.1.html#templates"><tt class="docutils literal">hg help templates</tt></a> for more about pre-packaged styles and +specifying custom templates.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--follow</span></kbd></td> +<td>follow changeset history, or file history across copies and renames</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--follow-first</span></kbd></td> +<td>only follow the first parent of merge changesets (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>show revisions matching date spec</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-C</span>, <span class="option">--copies</span></kbd></td> +<td>show copied files</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-k</span>, <span class="option">--keyword</span></kbd></td> +<td>do case-insensitive search for a given text</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>show the specified revision or range</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--removed</span></kbd></td> +<td>include revisions where files were removed</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-m</span>, <span class="option">--only-merges</span></kbd></td> +</tr> +<tr><td> </td><td>show only merges (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--user</span></kbd></td> +<td>revisions committed by user</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--only-branch</span></kbd></td> +<td>show only changesets within the given named branch (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-b</span>, <span class="option">--branch</span></kbd></td> +<td>show changesets within the given named branch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-P</span>, <span class="option">--prune</span></kbd></td> +<td>do not display revision or any of its ancestors</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--hidden</span></kbd></td> +<td>show hidden changesets (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-p</span>, <span class="option">--patch</span></kbd></td> +<td>show patch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-g</span>, <span class="option">--git</span></kbd></td> +<td>use git extended diff format</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--limit</span></kbd></td> +<td>limit number of changes displayed</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-M</span>, <span class="option">--no-merges</span></kbd></td> +</tr> +<tr><td> </td><td>do not show merges</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--stat</span></kbd></td> +<td>output diffstat-style summary of changes</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-G</span>, <span class="option">--graph</span></kbd></td> +<td>show the revision DAG</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--style</span></kbd></td> +<td>display using template map file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--template</span></kbd></td> +<td>display with template</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td><p class="first">exclude names matching the given patterns</p> +<p class="last">aliases: history</p> +</td></tr> +</tbody> +</table> +</div> +<div class="section" id="manifest"> +<h2>manifest</h2> +<pre class="literal-block"> +hg manifest [-r REV] +</pre> +<p>Print a list of version controlled files for the given revision. +If no revision is given, the first parent of the working directory +is used, or the null revision if no revision is checked out.</p> +<p>With -v, print file permissions, symlink and executable bits. +With --debug, print file revision hashes.</p> +<p>If option --all is specified, the list of all files from all revisions +is printed. This includes deleted and renamed files.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>revision to display</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--all</span></kbd></td> +<td>list files from all revisions</td></tr> +</tbody> +</table> +</div> +<div class="section" id="merge"> +<h2>merge</h2> +<pre class="literal-block"> +hg merge [-P] [-f] [[-r] REV] +</pre> +<p>The current working directory is updated with all changes made in +the requested revision since the last common predecessor revision.</p> +<p>Files that changed between either parent are marked as changed for +the next commit and a commit must be performed before any further +updates to the repository are allowed. The next commit will have +two parents.</p> +<p><tt class="docutils literal"><span class="pre">--tool</span></tt> can be used to specify the merge tool used for file +merges. It overrides the HGMERGE environment variable and your +configuration files. See <a class="reference external" href="hg.1.html#merge-tools"><tt class="docutils literal">hg help <span class="pre">merge-tools</span></tt></a> for options.</p> +<p>If no revision is specified, the working directory's parent is a +head revision, and the current branch contains exactly one other +head, the other head is merged with by default. Otherwise, an +explicit revision with which to merge with must be provided.</p> +<p><a class="reference external" href="hg.1.html#resolve"><tt class="docutils literal">hg resolve</tt></a> must be used to resolve unresolved files.</p> +<p>To undo an uncommitted merge, use <a class="reference external" href="hg.1.html#update"><tt class="docutils literal">hg update <span class="pre">--clean</span> .</tt></a> which +will check out a clean copy of the original merge parent, losing +all changes.</p> +<p>Returns 0 on success, 1 if there are unresolved files.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>force a merge with outstanding changes</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>revision to merge</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-P</span>, <span class="option">--preview</span></kbd></td> +<td>review revisions to merge (no merge is performed)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-t</span>, <span class="option">--tool</span></kbd></td> +<td>specify merge tool</td></tr> +</tbody> +</table> +</div> +<div class="section" id="outgoing"> +<h2>outgoing</h2> +<pre class="literal-block"> +hg outgoing [-M] [-p] [-n] [-f] [-r REV]... [DEST] +</pre> +<p>Show changesets not found in the specified destination repository +or the default push location. These are the changesets that would +be pushed if a push was requested.</p> +<p>See pull for details of valid destination formats.</p> +<p>Returns 0 if there are outgoing changes, 1 otherwise.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>run even when the destination is unrelated</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>a changeset intended to be included in the destination</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-n</span>, <span class="option">--newest-first</span></kbd></td> +</tr> +<tr><td> </td><td>show newest record first</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-B</span>, <span class="option">--bookmarks</span></kbd></td> +</tr> +<tr><td> </td><td>compare bookmarks</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-b</span>, <span class="option">--branch</span></kbd></td> +<td>a specific branch you would like to push</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-p</span>, <span class="option">--patch</span></kbd></td> +<td>show patch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-g</span>, <span class="option">--git</span></kbd></td> +<td>use git extended diff format</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--limit</span></kbd></td> +<td>limit number of changes displayed</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-M</span>, <span class="option">--no-merges</span></kbd></td> +</tr> +<tr><td> </td><td>do not show merges</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--stat</span></kbd></td> +<td>output diffstat-style summary of changes</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-G</span>, <span class="option">--graph</span></kbd></td> +<td>show the revision DAG</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--style</span></kbd></td> +<td>display using template map file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--template</span></kbd></td> +<td>display with template</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--ssh</span></kbd></td> +<td>specify ssh command to use</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--remotecmd</span></kbd></td> +<td>specify hg command to run on the remote side</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--insecure</span></kbd></td> +<td>do not verify server certificate (ignoring web.cacerts config)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-S</span>, <span class="option">--subrepos</span></kbd></td> +<td><p class="first">recurse into subrepositories</p> +<p class="last">aliases: out</p> +</td></tr> +</tbody> +</table> +</div> +<div class="section" id="parents"> +<h2>parents</h2> +<pre class="literal-block"> +hg parents [-r REV] [FILE] +</pre> +<p>Print the working directory's parent revisions. If a revision is +given via -r/--rev, the parent of that revision will be printed. +If a file argument is given, the revision in which the file was +last changed (before the working directory revision or the +argument to --rev if given) is printed.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>show parents of the specified revision</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--style</span></kbd></td> +<td>display using template map file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--template</span></kbd></td> +<td>display with template</td></tr> +</tbody> +</table> +</div> +<div class="section" id="paths"> +<h2>paths</h2> +<pre class="literal-block"> +hg paths [NAME] +</pre> +<p>Show definition of symbolic path name NAME. If no name is given, +show definition of all available names.</p> +<p>Option -q/--quiet suppresses all output when searching for NAME +and shows only the path names when listing all definitions.</p> +<p>Path names are defined in the [paths] section of your +configuration file and in <tt class="docutils literal">/etc/mercurial/hgrc</tt>. If run inside a +repository, <tt class="docutils literal">.hg/hgrc</tt> is used, too.</p> +<p>The path names <tt class="docutils literal">default</tt> and <tt class="docutils literal"><span class="pre">default-push</span></tt> have a special +meaning. When performing a push or pull operation, they are used +as fallbacks if no location is specified on the command-line. +When <tt class="docutils literal"><span class="pre">default-push</span></tt> is set, it will be used for push and +<tt class="docutils literal">default</tt> will be used for pull; otherwise <tt class="docutils literal">default</tt> is used +as the fallback for both. When cloning a repository, the clone +source is written as <tt class="docutils literal">default</tt> in <tt class="docutils literal">.hg/hgrc</tt>. Note that +<tt class="docutils literal">default</tt> and <tt class="docutils literal"><span class="pre">default-push</span></tt> apply to all inbound (e.g. +<a class="reference external" href="hg.1.html#incoming"><tt class="docutils literal">hg incoming</tt></a>) and outbound (e.g. <a class="reference external" href="hg.1.html#outgoing"><tt class="docutils literal">hg outgoing</tt></a>, <a class="reference external" href="hg.1.html#email"><tt class="docutils literal">hg email</tt></a> and +<a class="reference external" href="hg.1.html#bundle"><tt class="docutils literal">hg bundle</tt></a>) operations.</p> +<p>See <a class="reference external" href="hg.1.html#urls"><tt class="docutils literal">hg help urls</tt></a> for more information.</p> +<p>Returns 0 on success.</p> +</div> +<div class="section" id="phase"> +<h2>phase</h2> +<pre class="literal-block"> +hg phase [-p|-d|-s] [-f] [-r] REV... +</pre> +<p>With no argument, show the phase name of specified revisions.</p> +<p>With one of -p/--public, -d/--draft or -s/--secret, change the +phase value of the specified revisions.</p> +<p>Unless -f/--force is specified, <a class="reference external" href="hg.1.html#phase"><tt class="docutils literal">hg phase</tt></a> won't move changeset from a +lower phase to an higher phase. Phases are ordered as follows:</p> +<pre class="literal-block"> +public < draft < secret +</pre> +<p>Return 0 on success, 1 if no phases were changed or some could not +be changed.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-p</span>, <span class="option">--public</span></kbd></td> +<td>set changeset phase to public</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--draft</span></kbd></td> +<td>set changeset phase to draft</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-s</span>, <span class="option">--secret</span></kbd></td> +<td>set changeset phase to secret</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>allow to move boundary backward</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>target revision</td></tr> +</tbody> +</table> +</div> +<div class="section" id="pull"> +<h2>pull</h2> +<pre class="literal-block"> +hg pull [-u] [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [SOURCE] +</pre> +<p>Pull changes from a remote repository to a local one.</p> +<p>This finds all changes from the repository at the specified path +or URL and adds them to a local repository (the current one unless +-R is specified). By default, this does not update the copy of the +project in the working directory.</p> +<p>Use <a class="reference external" href="hg.1.html#incoming"><tt class="docutils literal">hg incoming</tt></a> if you want to see what would have been added +by a pull at the time you issued this command. If you then decide +to add those changes to the repository, you should use <a class="reference external" href="hg.1.html#pull"><tt class="docutils literal">hg pull +<span class="pre">-r</span> X</tt></a> where <tt class="docutils literal">X</tt> is the last changeset listed by <a class="reference external" href="hg.1.html#incoming"><tt class="docutils literal">hg incoming</tt></a>.</p> +<p>If SOURCE is omitted, the 'default' path will be used. +See <a class="reference external" href="hg.1.html#urls"><tt class="docutils literal">hg help urls</tt></a> for more information.</p> +<p>Returns 0 on success, 1 if an update had unresolved files.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--update</span></kbd></td> +<td>update to new branch head if changesets were pulled</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>run even when remote repository is unrelated</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>a remote changeset intended to be added</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-B</span>, <span class="option">--bookmark</span></kbd></td> +<td>bookmark to pull</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-b</span>, <span class="option">--branch</span></kbd></td> +<td>a specific branch you would like to pull</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--ssh</span></kbd></td> +<td>specify ssh command to use</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--remotecmd</span></kbd></td> +<td>specify hg command to run on the remote side</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--insecure</span></kbd></td> +<td>do not verify server certificate (ignoring web.cacerts config)</td></tr> +</tbody> +</table> +</div> +<div class="section" id="push"> +<h2>push</h2> +<pre class="literal-block"> +hg push [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [DEST] +</pre> +<p>Push changesets from the local repository to the specified +destination.</p> +<p>This operation is symmetrical to pull: it is identical to a pull +in the destination repository from the current one.</p> +<p>By default, push will not allow creation of new heads at the +destination, since multiple heads would make it unclear which head +to use. In this situation, it is recommended to pull and merge +before pushing.</p> +<p>Use --new-branch if you want to allow push to create a new named +branch that is not present at the destination. This allows you to +only create a new branch without forcing other changes.</p> +<p>Use -f/--force to override the default behavior and push all +changesets on all branches.</p> +<p>If -r/--rev is used, the specified revision and all its ancestors +will be pushed to the remote repository.</p> +<p>If -B/--bookmark is used, the specified bookmarked revision, its +ancestors, and the bookmark will be pushed to the remote +repository.</p> +<p>Please see <a class="reference external" href="hg.1.html#urls"><tt class="docutils literal">hg help urls</tt></a> for important details about <tt class="docutils literal"><span class="pre">ssh://</span></tt> +URLs. If DESTINATION is omitted, a default path will be used.</p> +<p>Returns 0 if push was successful, 1 if nothing to push.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>force push</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>a changeset intended to be included in the destination</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-B</span>, <span class="option">--bookmark</span></kbd></td> +<td>bookmark to push</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-b</span>, <span class="option">--branch</span></kbd></td> +<td>a specific branch you would like to push</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--new-branch</span></kbd></td> +<td>allow pushing a new branch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--ssh</span></kbd></td> +<td>specify ssh command to use</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--remotecmd</span></kbd></td> +<td>specify hg command to run on the remote side</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--insecure</span></kbd></td> +<td>do not verify server certificate (ignoring web.cacerts config)</td></tr> +</tbody> +</table> +</div> +<div class="section" id="recover"> +<h2>recover</h2> +<pre class="literal-block"> +hg recover +</pre> +<p>Recover from an interrupted commit or pull.</p> +<p>This command tries to fix the repository status after an +interrupted operation. It should only be necessary when Mercurial +suggests it.</p> +<p>Returns 0 if successful, 1 if nothing to recover or verify fails.</p> +</div> +<div class="section" id="remove"> +<h2>remove</h2> +<pre class="literal-block"> +hg remove [OPTION]... FILE... +</pre> +<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. +To undo a remove before that, see <a class="reference external" href="hg.1.html#revert"><tt class="docutils literal">hg revert</tt></a>. To undo added +files, see <a class="reference external" href="hg.1.html#forget"><tt class="docutils literal">hg forget</tt></a>.</p> +<div class="verbose container"> +<p>-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 [!] +(as reported by <a class="reference external" href="hg.1.html#status"><tt class="docutils literal">hg status</tt></a>). The actions are Warn, Remove +(from branch) and Delete (from disk):</p> +<table border="1" class="docutils"> +<colgroup> +<col width="47%" /> +<col width="13%" /> +<col width="13%" /> +<col width="13%" /> +<col width="13%" /> +</colgroup> +<thead valign="bottom"> +<tr><th class="head"> </th> +<th class="head"> </th> +<th class="head"> </th> +<th class="head"> </th> +<th class="head"> </th> +</tr> +</thead> +<tbody valign="top"> +<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> +</tbody> +</table> +<p>Note that remove never deletes files in Added [A] state from the +working directory, not even if option --force is specified.</p> +</div> +<p>Returns 0 on success, 1 if any warnings encountered.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-A</span>, <span class="option">--after</span></kbd></td> +<td>record delete for missing files</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>remove (and delete) file even if added or modified</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td><p class="first">exclude names matching the given patterns</p> +<p class="last">aliases: rm</p> +</td></tr> +</tbody> +</table> +</div> +<div class="section" id="rename"> +<h2>rename</h2> +<pre class="literal-block"> +hg rename [OPTION]... SOURCE... DEST +</pre> +<p>Mark dest as copies of sources; mark sources for deletion. If dest +is a directory, copies are put in that directory. If dest is a +file, there can only be one source.</p> +<p>By default, this command copies the contents of files as they +exist in the working directory. If invoked with -A/--after, the +operation is recorded, but no copying is performed.</p> +<p>This command takes effect at the next commit. To undo a rename +before that, see <a class="reference external" href="hg.1.html#revert"><tt class="docutils literal">hg revert</tt></a>.</p> +<p>Returns 0 on success, 1 if errors are encountered.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-A</span>, <span class="option">--after</span></kbd></td> +<td>record a rename that has already occurred</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>forcibly copy over an existing managed file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-n</span>, <span class="option">--dry-run</span></kbd></td> +<td><p class="first">do not perform actions, just print output</p> +<p class="last">aliases: move mv</p> +</td></tr> +</tbody> +</table> +</div> +<div class="section" id="resolve"> +<h2>resolve</h2> +<pre class="literal-block"> +hg resolve [OPTION]... [FILE]... +</pre> +<p>Merges with unresolved conflicts are often the result of +non-interactive merging using the <tt class="docutils literal">internal:merge</tt> configuration +setting, or a command-line merge tool like <tt class="docutils literal">diff3</tt>. The resolve +command is used to manage the files involved in a merge, after +<a class="reference external" href="hg.1.html#merge"><tt class="docutils literal">hg merge</tt></a> has been run, and before <a class="reference external" href="hg.1.html#commit"><tt class="docutils literal">hg commit</tt></a> is run (i.e. the +working directory must have two parents). See <a class="reference external" href="hg.1.html#merge-tools"><tt class="docutils literal">hg help +<span class="pre">merge-tools</span></tt></a> for information on configuring merge tools.</p> +<p>The resolve command can be used in the following ways:</p> +<ul class="simple"> +<li><a class="reference external" href="hg.1.html#resolve"><tt class="docutils literal">hg resolve <span class="pre">[--tool</span> TOOL] <span class="pre">FILE...</span></tt></a>: attempt to re-merge the specified +files, discarding any previous merge attempts. Re-merging is not +performed for files already marked as resolved. Use <tt class="docutils literal"><span class="pre">--all/-a</span></tt> +to select all unresolved files. <tt class="docutils literal"><span class="pre">--tool</span></tt> can be used to specify +the merge tool used for the given files. It overrides the HGMERGE +environment variable and your configuration files. Previous file +contents are saved with a <tt class="docutils literal">.orig</tt> suffix.</li> +<li><a class="reference external" href="hg.1.html#resolve"><tt class="docutils literal">hg resolve <span class="pre">-m</span> [FILE]</tt></a>: mark a file as having been resolved +(e.g. after having manually fixed-up the files). The default is +to mark all unresolved files.</li> +<li><a class="reference external" href="hg.1.html#resolve"><tt class="docutils literal">hg resolve <span class="pre">-u</span> <span class="pre">[FILE]...</span></tt></a>: mark a file as unresolved. The +default is to mark all resolved files.</li> +<li><a class="reference external" href="hg.1.html#resolve"><tt class="docutils literal">hg resolve <span class="pre">-l</span></tt></a>: list files which had or still have conflicts. +In the printed list, <tt class="docutils literal">U</tt> = unresolved and <tt class="docutils literal">R</tt> = resolved.</li> +</ul> +<p>Note that Mercurial will not let you commit files with unresolved +merge conflicts. You must use <a class="reference external" href="hg.1.html#resolve"><tt class="docutils literal">hg resolve <span class="pre">-m</span> ...</tt></a> before you can +commit after a conflicting merge.</p> +<p>Returns 0 on success, 1 if any files fail a resolve attempt.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--all</span></kbd></td> +<td>select all unresolved files</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--list</span></kbd></td> +<td>list state of files needing merge</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--mark</span></kbd></td> +<td>mark files as resolved</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--unmark</span></kbd></td> +<td>mark files as unresolved</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-n</span>, <span class="option">--no-status</span></kbd></td> +</tr> +<tr><td> </td><td>hide status prefix</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-t</span>, <span class="option">--tool</span></kbd></td> +<td>specify merge tool</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +</tbody> +</table> +</div> +<div class="section" id="revert"> +<h2>revert</h2> +<pre class="literal-block"> +hg revert [OPTION]... [-r REV] [NAME]... +</pre> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">To check out earlier revisions, you should use <a class="reference external" href="hg.1.html#update"><tt class="docutils literal">hg update REV</tt></a>. +To cancel an uncommitted merge (and lose your changes), use +<a class="reference external" href="hg.1.html#update"><tt class="docutils literal">hg update <span class="pre">--clean</span> .</tt></a>.</p> +</div> +<p>With no revision specified, revert the specified files or directories +to the contents they had in the parent of the working directory. +This restores the contents of files to an unmodified +state and unschedules adds, removes, copies, and renames. If the +working directory has two parents, you must explicitly specify a +revision.</p> +<p>Using the -r/--rev or -d/--date options, revert the given files or +directories to their states as of a specific revision. Because +revert does not change the working directory parents, this will +cause these files to appear modified. This can be helpful to "back +out" some or all of an earlier change. See <a class="reference external" href="hg.1.html#backout"><tt class="docutils literal">hg backout</tt></a> for a +related method.</p> +<p>Modified files are saved with a .orig suffix before reverting. +To disable these backups, use --no-backup.</p> +<p>See <a class="reference external" href="hg.1.html#dates"><tt class="docutils literal">hg help dates</tt></a> for a list of formats valid for -d/--date.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--all</span></kbd></td> +<td>revert all changes when no arguments given</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>tipmost revision matching date</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>revert to the specified revision</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-C</span>, <span class="option">--no-backup</span></kbd></td> +</tr> +<tr><td> </td><td>do not save backup copies of files</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-n</span>, <span class="option">--dry-run</span></kbd></td> +<td>do not perform actions, just print output</td></tr> +</tbody> +</table> +</div> +<div class="section" id="rollback"> +<h2>rollback</h2> +<pre class="literal-block"> +hg rollback +</pre> +<p>This command should be used with care. There is only one level of +rollback, and there is no way to undo a rollback. It will also +restore the dirstate at the time of the last transaction, losing +any dirstate changes since that time. This command does not alter +the working directory.</p> +<p>Transactions are used to encapsulate the effects of all commands +that create new changesets or propagate existing changesets into a +repository.</p> +<div class="verbose container"> +<p>For example, the following commands are transactional, and their +effects can be rolled back:</p> +<ul class="simple"> +<li>commit</li> +<li>import</li> +<li>pull</li> +<li>push (with this repository as the destination)</li> +<li>unbundle</li> +</ul> +<p>To avoid permanent data loss, rollback will refuse to rollback a +commit transaction if it isn't checked out. Use --force to +override this protection.</p> +</div> +<p>This command is not intended for use on public repositories. Once +changes are visible for pull by other users, rolling a transaction +back locally is ineffective (someone else may already have pulled +the changes). Furthermore, a race is possible with readers of the +repository; for example an in-progress pull from the repository +may fail if a rollback is performed.</p> +<p>Returns 0 on success, 1 if no rollback data is available.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-n</span>, <span class="option">--dry-run</span></kbd></td> +<td>do not perform actions, just print output</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>ignore safety measures</td></tr> +</tbody> +</table> +</div> +<div class="section" id="root"> +<h2>root</h2> +<pre class="literal-block"> +hg root +</pre> +<p>Print the root directory of the current repository.</p> +<p>Returns 0 on success.</p> +</div> +<div class="section" id="serve"> +<h2>serve</h2> +<pre class="literal-block"> +hg serve [OPTION]... +</pre> +<p>Start a local HTTP repository browser and pull server. You can use +this for ad-hoc sharing and browsing of repositories. It is +recommended to use a real web server to serve a repository for +longer periods of time.</p> +<p>Please note that the server does not implement access control. +This means that, by default, anybody can read from the server and +nobody can write to it by default. Set the <tt class="docutils literal">web.allow_push</tt> +option to <tt class="docutils literal">*</tt> to allow everybody to push to the server. You +should use a real web server if you need to authenticate users.</p> +<p>By default, the server logs accesses to stdout and errors to +stderr. Use the -A/--accesslog and -E/--errorlog options to log to +files.</p> +<p>To have the server choose a free port number to listen on, specify +a port number of 0; in this case, the server will print the port +number it uses.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-A</span>, <span class="option">--accesslog</span></kbd></td> +</tr> +<tr><td> </td><td>name of access log file to write to</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--daemon</span></kbd></td> +<td>run server in background</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">--daemon-pipefds</span></kbd></td> +</tr> +<tr><td> </td><td>used internally by daemon mode</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-E</span>, <span class="option">--errorlog</span></kbd></td> +<td>name of error log file to write to</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-p</span>, <span class="option">--port</span></kbd></td> +<td>port to listen on (default: 8000)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--address</span></kbd></td> +<td>address to listen on (default: all interfaces)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--prefix</span></kbd></td> +<td>prefix path to serve from (default: server root)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-n</span>, <span class="option">--name</span></kbd></td> +<td>name to show in web pages (default: working directory)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--web-conf</span></kbd></td> +<td>name of the hgweb config file (see "hg help hgweb")</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--webdir-conf</span></kbd></td> +<td>name of the hgweb config file (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--pid-file</span></kbd></td> +<td>name of file to write process ID to</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--stdio</span></kbd></td> +<td>for remote clients</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--cmdserver</span></kbd></td> +<td>for remote clients</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-t</span>, <span class="option">--templates</span></kbd></td> +</tr> +<tr><td> </td><td>web templates to use</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--style</span></kbd></td> +<td>template style to use</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-6</span>, <span class="option">--ipv6</span></kbd></td> +<td>use IPv6 in addition to IPv4</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--certificate</span></kbd></td> +<td>SSL certificate file</td></tr> +</tbody> +</table> +</div> +<div class="section" id="showconfig"> +<h2>showconfig</h2> +<pre class="literal-block"> +hg showconfig [-u] [NAME]... +</pre> +<p>With no arguments, print names and values of all config items.</p> +<p>With one argument of the form section.name, print just the value +of that config item.</p> +<p>With multiple arguments, print names and values of all config +items with matching section names.</p> +<p>With --debug, the source (filename and line number) is printed +for each config item.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-u</span>, <span class="option">--untrusted</span></kbd></td> +</tr> +<tr><td> </td><td><p class="first">show untrusted configuration options</p> +<p class="last">aliases: debugconfig</p> +</td></tr> +</tbody> +</table> +</div> +<div class="section" id="status"> +<h2>status</h2> +<pre class="literal-block"> +hg status [OPTION]... [FILE]... +</pre> +<p>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.</p> +<p>Option -q/--quiet hides untracked (unknown and ignored) files +unless explicitly requested with -u/--unknown or -i/--ignored.</p> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">status may appear to disagree with diff if permissions have +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.</p> +</div> +<p>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.</p> +<p>The codes used to show the status of files are:</p> +<pre class="literal-block"> +M = modified +A = added +R = removed +C = clean +! = missing (deleted by non-hg command, but still tracked) +? = not tracked +I = ignored + = origin of the previous file listed as A (added) +</pre> +<div class="verbose container"> +<p>Examples:</p> +<ul> +<li><p class="first">show changes in the working directory relative to a +changeset:</p> +<pre class="literal-block"> +hg status --rev 9353 +</pre> +</li> +<li><p class="first">show all changes including copies in an existing changeset:</p> +<pre class="literal-block"> +hg status --copies --change 9353 +</pre> +</li> +<li><p class="first">get a NUL separated list of added files, suitable for xargs:</p> +<pre class="literal-block"> +hg status -an0 +</pre> +</li> +</ul> +</div> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-A</span>, <span class="option">--all</span></kbd></td> +<td>show status of all files</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--modified</span></kbd></td> +<td>show only modified files</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--added</span></kbd></td> +<td>show only added files</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--removed</span></kbd></td> +<td>show only removed files</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--deleted</span></kbd></td> +<td>show only deleted (but tracked) files</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-c</span>, <span class="option">--clean</span></kbd></td> +<td>show only files without changes</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--unknown</span></kbd></td> +<td>show only unknown (not tracked) files</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-i</span>, <span class="option">--ignored</span></kbd></td> +<td>show only ignored files</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-n</span>, <span class="option">--no-status</span></kbd></td> +</tr> +<tr><td> </td><td>hide status prefix</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-C</span>, <span class="option">--copies</span></kbd></td> +<td>show source of copied files</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-0</span>, <span class="option">--print0</span></kbd></td> +<td>end filenames with NUL, for use with xargs</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--rev</span></kbd></td> +<td>show difference from revision</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--change</span></kbd></td> +<td>list the changed files of a revision</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-S</span>, <span class="option">--subrepos</span></kbd></td> +<td><p class="first">recurse into subrepositories</p> +<p class="last">aliases: st</p> +</td></tr> +</tbody> +</table> +</div> +<div class="section" id="summary"> +<h2>summary</h2> +<pre class="literal-block"> +hg summary [--remote] +</pre> +<p>This generates a brief summary of the working directory state, +including parents, branch, commit status, and available updates.</p> +<p>With the --remote option, this will check the default paths for +incoming and outgoing changes. This can be time-consuming.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">--remote</span></kbd></td> +<td><p class="first">check for push and pull</p> +<p class="last">aliases: sum</p> +</td></tr> +</tbody> +</table> +</div> +<div class="section" id="tag"> +<h2>tag</h2> +<pre class="literal-block"> +hg tag [-f] [-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME... +</pre> +<p>Name a particular revision using <name>.</p> +<p>Tags are used to name particular revisions of the repository and are +very useful to compare different revisions, to go back to significant +earlier versions or to mark branch points as releases, etc. Changing +an existing tag is normally disallowed; use -f/--force to override.</p> +<p>If no revision is given, the parent of the working directory is +used, or tip if no revision is checked out.</p> +<p>To facilitate version control, distribution, and merging of tags, +they are stored as a file named ".hgtags" which is managed similarly +to other project files and can be hand-edited if necessary. This +also means that tagging creates a new commit. The file +".hg/localtags" is used for local tags (not shared among +repositories).</p> +<p>Tag commits are usually made at the head of a branch. If the parent +of the working directory is not a branch head, <a class="reference external" href="hg.1.html#tag"><tt class="docutils literal">hg tag</tt></a> aborts; use +-f/--force to force the tag commit to be based on a non-head +changeset.</p> +<p>See <a class="reference external" href="hg.1.html#dates"><tt class="docutils literal">hg help dates</tt></a> for a list of formats valid for -d/--date.</p> +<p>Since tag names have priority over branch names during revision +lookup, using an existing branch name as a tag name is discouraged.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>force tag</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--local</span></kbd></td> +<td>make the tag local</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>revision to tag</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--remove</span></kbd></td> +<td>remove a tag</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--edit</span></kbd></td> +<td>edit commit message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--message</span></kbd></td> +<td>use <text> as commit message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>record the specified date as commit date</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--user</span></kbd></td> +<td>record the specified user as committer</td></tr> +</tbody> +</table> +</div> +<div class="section" id="tags"> +<h2>tags</h2> +<pre class="literal-block"> +hg tags +</pre> +<p>This lists both regular and local tags. When the -v/--verbose +switch is used, a third column "local" is printed for local tags.</p> +<p>Returns 0 on success.</p> +</div> +<div class="section" id="tip"> +<h2>tip</h2> +<pre class="literal-block"> +hg tip [-p] [-g] +</pre> +<p>The tip revision (usually just called the tip) is the changeset +most recently added to the repository (and therefore the most +recently changed head).</p> +<p>If you have just made a commit, that commit will be the tip. If +you have just pulled changes from another repository, the tip of +that repository becomes the current tip. The "tip" tag is special +and cannot be renamed or assigned to a different changeset.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-p</span>, <span class="option">--patch</span></kbd></td> +<td>show patch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-g</span>, <span class="option">--git</span></kbd></td> +<td>use git extended diff format</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--style</span></kbd></td> +<td>display using template map file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--template</span></kbd></td> +<td>display with template</td></tr> +</tbody> +</table> +</div> +<div class="section" id="unbundle"> +<h2>unbundle</h2> +<pre class="literal-block"> +hg unbundle [-u] FILE... +</pre> +<p>Apply one or more compressed changegroup files generated by the +bundle command.</p> +<p>Returns 0 on success, 1 if an update has unresolved files.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--update</span></kbd></td> +<td>update to new branch head if changesets were unbundled</td></tr> +</tbody> +</table> +</div> +<div class="section" id="update"> +<h2>update</h2> +<pre class="literal-block"> +hg update [-c] [-C] [-d DATE] [[-r] REV] +</pre> +<p>Update the repository's working directory to the specified +changeset. If no changeset is specified, update to the tip of the +current named branch and move the current bookmark (see <a class="reference external" href="hg.1.html#bookmarks"><tt class="docutils literal">hg help +bookmarks</tt></a>).</p> +<p>Update sets the working directory's parent revison to the specified +changeset (see <a class="reference external" href="hg.1.html#parents"><tt class="docutils literal">hg help parents</tt></a>).</p> +<p>If the changeset is not a descendant or ancestor of the working +directory's parent, the update is aborted. With the -c/--check +option, the working directory is checked for uncommitted changes; if +none are found, the working directory is updated to the specified +changeset.</p> +<div class="verbose container"> +<p>The following rules apply when the working directory contains +uncommitted changes:</p> +<ol class="arabic simple"> +<li>If neither -c/--check nor -C/--clean is specified, and if +the requested changeset is an ancestor or descendant of +the working directory's parent, the uncommitted changes +are merged into the requested changeset and the merged +result is left uncommitted. If the requested changeset is +not an ancestor or descendant (that is, it is on another +branch), the update is aborted and the uncommitted changes +are preserved.</li> +<li>With the -c/--check option, the update is aborted and the +uncommitted changes are preserved.</li> +<li>With the -C/--clean option, uncommitted changes are discarded and +the working directory is updated to the requested changeset.</li> +</ol> +</div> +<p>To cancel an uncommitted merge (and lose your changes), use +<a class="reference external" href="hg.1.html#update"><tt class="docutils literal">hg update <span class="pre">--clean</span> .</tt></a>.</p> +<p>Use null as the changeset to remove the working directory (like +<a class="reference external" href="hg.1.html#clone"><tt class="docutils literal">hg clone <span class="pre">-U</span></tt></a>).</p> +<p>If you want to revert just one file to an older revision, use +<a class="reference external" href="hg.1.html#revert"><tt class="docutils literal">hg revert <span class="pre">[-r</span> REV] NAME</tt></a>.</p> +<p>See <a class="reference external" href="hg.1.html#dates"><tt class="docutils literal">hg help dates</tt></a> for a list of formats valid for -d/--date.</p> +<p>Returns 0 on success, 1 if there are unresolved files.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-C</span>, <span class="option">--clean</span></kbd></td> +<td>discard uncommitted changes (no backup)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-c</span>, <span class="option">--check</span></kbd></td> +<td>update across branches if no uncommitted changes</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>tipmost revision matching date</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td><p class="first">revision</p> +<p class="last">aliases: up checkout co</p> +</td></tr> +</tbody> +</table> +</div> +<div class="section" id="verify"> +<h2>verify</h2> +<pre class="literal-block"> +hg verify +</pre> +<p>Verify the integrity of the current repository.</p> +<p>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.</p> +<p>Returns 0 on success, 1 if errors are encountered.</p> +</div> +<div class="section" id="version"> +<h2>version</h2> +<pre class="literal-block"> +hg version +</pre> +<p>output version and copyright information</p> +</div> +</div> +<div class="section" id="date-formats"> +<span id="dates"></span><h1><a class="toc-backref" href="#contents">Date Formats</a></h1> +<p>Some commands allow the user to specify a date, e.g.:</p> +<ul class="simple"> +<li>backout, commit, import, tag: Specify the commit date.</li> +<li>log, revert, update: Select revision(s) by date.</li> +</ul> +<p>Many date formats are valid. Here are some examples:</p> +<ul class="simple"> +<li><tt class="docutils literal">Wed Dec 6 13:18:29 2006</tt> (local timezone assumed)</li> +<li><tt class="docutils literal">Dec 6 13:18 <span class="pre">-0600</span></tt> (year assumed, time offset provided)</li> +<li><tt class="docutils literal">Dec 6 13:18 UTC</tt> (UTC and GMT are aliases for +0000)</li> +<li><tt class="docutils literal">Dec 6</tt> (midnight)</li> +<li><tt class="docutils literal">13:18</tt> (today assumed)</li> +<li><tt class="docutils literal">3:39</tt> (3:39AM assumed)</li> +<li><tt class="docutils literal">3:39pm</tt> (15:39)</li> +<li><tt class="docutils literal"><span class="pre">2006-12-06</span> 13:18:29</tt> (ISO 8601 format)</li> +<li><tt class="docutils literal"><span class="pre">2006-12-6</span> 13:18</tt></li> +<li><tt class="docutils literal"><span class="pre">2006-12-6</span></tt></li> +<li><tt class="docutils literal"><span class="pre">12-6</span></tt></li> +<li><tt class="docutils literal">12/6</tt></li> +<li><tt class="docutils literal">12/6/6</tt> (Dec 6 2006)</li> +</ul> +<p>Lastly, there is Mercurial's internal format:</p> +<ul class="simple"> +<li><tt class="docutils literal">1165432709 0</tt> (Wed Dec 6 13:18:29 2006 UTC)</li> +</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).</p> +<p>The log command also accepts date ranges:</p> +<ul class="simple"> +<li><tt class="docutils literal"><DATE</tt> - at or before a given date/time</li> +<li><tt class="docutils literal">>DATE</tt> - on or after a given date/time</li> +<li><tt class="docutils literal">DATE to DATE</tt> - a date range, inclusive</li> +<li><tt class="docutils literal"><span class="pre">-DAYS</span></tt> - within a given number of days of today</li> +</ul> +</div> +<div class="section" id="diff-formats"> +<span id="diffs"></span><h1><a class="toc-backref" href="#contents">Diff Formats</a></h1> +<p>Mercurial's default format for showing changes between two versions of +a file is compatible with the unified format of GNU diff, which can be +used by GNU patch and many other standard tools.</p> +<p>While this standard format is often enough, it does not encode the +following information:</p> +<ul class="simple"> +<li>executable status and other permission bits</li> +<li>copy or rename information</li> +<li>changes in binary files</li> +<li>creation or deletion of empty files</li> +</ul> +<p>Mercurial also supports the extended diff format from the git VCS +which addresses these limitations. The git diff format is not produced +by default because a few widespread tools still do not understand this +format.</p> +<p>This means that when generating diffs from a Mercurial repository +(e.g. with <a class="reference external" href="hg.1.html#export"><tt class="docutils literal">hg export</tt></a>), you should be careful about things like file +copies and renames or other things mentioned above, because when +applying a standard diff to a different repository, this extra +information is lost. Mercurial's internal operations (like push and +pull) are not affected by this, because they use an internal binary +format for communicating changes.</p> +<p>To make Mercurial produce the git extended diff format, use the --git +option available for many commands, or set 'git = True' in the [diff] +section of your configuration file. You do not need to set this option +when importing diffs in this format or using them in the mq extension.</p> +</div> +<div class="section" id="environment-variables"> +<span id="env"></span><span id="environment"></span><h1><a class="toc-backref" href="#contents">Environment Variables</a></h1> +<dl class="docutils"> +<dt>HG</dt> +<dd>Path to the 'hg' executable, automatically passed when running +hooks, extensions or external tools. If unset or empty, this is +the hg executable's name if it's frozen, or an executable named +'hg' (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on +Windows) is searched.</dd> +<dt>HGEDITOR</dt> +<dd><p class="first">This is the name of the editor to run when committing. See EDITOR.</p> +<p class="last">(deprecated, use configuration file)</p> +</dd> +<dt>HGENCODING</dt> +<dd>This overrides the default locale setting detected by Mercurial. +This setting is used to convert data including usernames, +changeset descriptions, tag names, and branches. This setting can +be overridden with the --encoding command-line option.</dd> +<dt>HGENCODINGMODE</dt> +<dd>This sets Mercurial's behavior for handling unknown characters +while transcoding user input. The default is "strict", which +causes Mercurial to abort if it can't map a character. Other +settings include "replace", which replaces unknown characters, and +"ignore", which drops them. This setting can be overridden with +the --encodingmode command-line option.</dd> +<dt>HGENCODINGAMBIGUOUS</dt> +<dd>This sets Mercurial's behavior for handling characters with +"ambiguous" widths like accented Latin characters with East Asian +fonts. By default, Mercurial assumes ambiguous characters are +narrow, set this variable to "wide" if such characters cause +formatting problems.</dd> +<dt>HGMERGE</dt> +<dd><p class="first">An executable to use for resolving merge conflicts. The program +will be executed with three arguments: local file, remote file, +ancestor file.</p> +<p class="last">(deprecated, use configuration file)</p> +</dd> +<dt>HGRCPATH</dt> +<dd><p class="first">A list of files or directories to search for configuration +files. Item separator is ":" on Unix, ";" on Windows. If HGRCPATH +is not set, platform default search path is used. If empty, only +the .hg/hgrc from the current repository is read.</p> +<p>For each element in HGRCPATH:</p> +<ul class="last simple"> +<li>if it's a directory, all files ending with .rc are added</li> +<li>otherwise, the file itself will be added</li> +</ul> +</dd> +<dt>HGPLAIN</dt> +<dd><p class="first">When set, this disables any configuration settings that might +change Mercurial's default output. This includes encoding, +defaults, verbose mode, debug mode, quiet mode, tracebacks, and +localization. This can be useful when scripting against Mercurial +in the face of existing user configuration.</p> +<p class="last">Equivalent options set via command line flags or environment +variables are not overridden.</p> +</dd> +<dt>HGPLAINEXCEPT</dt> +<dd><p class="first">This is a comma-separated list of features to preserve when +HGPLAIN is enabled. Currently the only value supported is "i18n", +which preserves internationalization in plain mode.</p> +<p class="last">Setting HGPLAINEXCEPT to anything (even an empty string) will +enable plain mode.</p> +</dd> +<dt>HGUSER</dt> +<dd><p class="first">This is the string used as the author of a commit. If not set, +available values will be considered in this order:</p> +<ul class="simple"> +<li>HGUSER (deprecated)</li> +<li>configuration files from the HGRCPATH</li> +<li>EMAIL</li> +<li>interactive prompt</li> +<li>LOGNAME (with <tt class="docutils literal">@hostname</tt> appended)</li> +</ul> +<p class="last">(deprecated, use configuration file)</p> +</dd> +<dt>EMAIL</dt> +<dd>May be used as the author of a commit; see HGUSER.</dd> +<dt>LOGNAME</dt> +<dd>May be used as the author of a commit; see HGUSER.</dd> +<dt>VISUAL</dt> +<dd>This is the name of the editor to use when committing. See EDITOR.</dd> +<dt>EDITOR</dt> +<dd>Sometimes Mercurial needs to open a text file in an editor for a +user to modify, for example when writing commit messages. The +editor it uses is determined by looking at the environment +variables HGEDITOR, VISUAL and EDITOR, in that order. The first +non-empty one is chosen. If all of them are empty, the editor +defaults to 'vi'.</dd> +<dt>PYTHONPATH</dt> +<dd>This is used by Python to find imported modules and may need to be +set appropriately if this Mercurial is not installed system-wide.</dd> +</dl> +</div> +<div class="section" id="using-additional-features"> +<span id="extensions"></span><h1><a class="toc-backref" href="#contents">Using Additional Features</a></h1> +<p>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.</p> +<p>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.</p> +<p>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:</p> +<pre class="literal-block"> +[extensions] +foo = +</pre> +<p>You may also specify the full path to an extension:</p> +<pre class="literal-block"> +[extensions] +myfeature = ~/.hgext/myfeature.py +</pre> +<p>To explicitly disable an extension enabled in a configuration file of +broader scope, prepend its path with !:</p> +<pre class="literal-block"> +[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 = ! +</pre> +<p>disabled extensions:</p> +<blockquote> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">acl:</th><td class="field-body">hooks for controlling repository access</td> +</tr> +<tr class="field"><th class="field-name">bugzilla:</th><td class="field-body">hooks for integrating with the Bugzilla bug tracker</td> +</tr> +<tr class="field"><th class="field-name">children:</th><td class="field-body">command to display child changesets (DEPRECATED)</td> +</tr> +<tr class="field"><th class="field-name">churn:</th><td class="field-body">command to display statistics about repository history</td> +</tr> +<tr class="field"><th class="field-name">color:</th><td class="field-body">colorize output from some commands</td> +</tr> +<tr class="field"><th class="field-name">convert:</th><td class="field-body">import revisions from foreign VCS repositories into Mercurial</td> +</tr> +<tr class="field"><th class="field-name">eol:</th><td class="field-body">automatically manage newlines in repository files</td> +</tr> +<tr class="field"><th class="field-name">extdiff:</th><td class="field-body">command to allow external programs to compare revisions</td> +</tr> +<tr class="field"><th class="field-name">factotum:</th><td class="field-body">http authentication with factotum</td> +</tr> +<tr class="field"><th class="field-name">fetch:</th><td class="field-body">pull, update and merge in one command (DEPRECATED)</td> +</tr> +<tr class="field"><th class="field-name">gpg:</th><td class="field-body">commands to sign and verify changesets</td> +</tr> +<tr class="field"><th class="field-name">graphlog:</th><td class="field-body">command to view revision graphs from a shell</td> +</tr> +<tr class="field"><th class="field-name">hgcia:</th><td class="field-body">hooks for integrating with the CIA.vc notification service</td> +</tr> +<tr class="field"><th class="field-name">hgk:</th><td class="field-body">browse the repository in a graphical way</td> +</tr> +<tr class="field"><th class="field-name">highlight:</th><td class="field-body">syntax highlighting for hgweb (requires Pygments)</td> +</tr> +<tr class="field"><th class="field-name">histedit:</th><td class="field-body">interactive history editing</td> +</tr> +<tr class="field"><th class="field-name">inotify:</th><td class="field-body">accelerate status report using Linux's inotify service</td> +</tr> +<tr class="field"><th class="field-name">interhg:</th><td class="field-body">expand expressions into changelog and summaries</td> +</tr> +<tr class="field"><th class="field-name">keyword:</th><td class="field-body">expand keywords in tracked files</td> +</tr> +<tr class="field"><th class="field-name">largefiles:</th><td class="field-body">track large binary files</td> +</tr> +<tr class="field"><th class="field-name">mq:</th><td class="field-body">manage a stack of patches</td> +</tr> +<tr class="field"><th class="field-name">notify:</th><td class="field-body">hooks for sending email push notifications</td> +</tr> +<tr class="field"><th class="field-name">pager:</th><td class="field-body">browse command output with an external pager</td> +</tr> +<tr class="field"><th class="field-name">patchbomb:</th><td class="field-body">command to send changesets as (a series of) patch emails</td> +</tr> +<tr class="field"><th class="field-name">progress:</th><td class="field-body">show progress bars for some actions</td> +</tr> +<tr class="field"><th class="field-name">purge:</th><td class="field-body">command to delete untracked files from the working directory</td> +</tr> +<tr class="field"><th class="field-name">rebase:</th><td class="field-body">command to move sets of revisions to a different ancestor</td> +</tr> +<tr class="field"><th class="field-name">record:</th><td class="field-body">commands to interactively select changes for commit/qrefresh</td> +</tr> +<tr class="field"><th class="field-name">relink:</th><td class="field-body">recreates hardlinks between repository clones</td> +</tr> +<tr class="field"><th class="field-name">schemes:</th><td class="field-body">extend schemes with shortcuts to repository swarms</td> +</tr> +<tr class="field"><th class="field-name">share:</th><td class="field-body">share a common history between several working directories</td> +</tr> +<tr class="field"><th class="field-name">transplant:</th><td class="field-body">command to transplant changesets from another branch</td> +</tr> +<tr class="field"><th class="field-name">win32mbcs:</th><td class="field-body">allow the use of MBCS paths with problematic encodings</td> +</tr> +<tr class="field"><th class="field-name">win32text:</th><td class="field-body">perform automatic newline conversion</td> +</tr> +<tr class="field"><th class="field-name">zeroconf:</th><td class="field-body">discover and advertise repositories on the local network</td> +</tr> +</tbody> +</table> +</blockquote> +</div> +<div class="section" id="specifying-file-sets"> +<span id="fileset"></span><span id="filesets"></span><h1><a class="toc-backref" href="#contents">Specifying File Sets</a></h1> +<p>Mercurial supports a functional language for selecting a set of +files.</p> +<p>Like other file patterns, this pattern type is indicated by a prefix, +'set:'. The language supports a number of predicates which are joined +by infix operators. Parenthesis can be used for grouping.</p> +<p>Identifiers such as filenames or patterns must be quoted with single +or double quotes if they contain characters outside of +<tt class="docutils literal"><span class="pre">[.*{}[]?/\_a-zA-Z0-9\x80-\xff]</span></tt> or if they match one of the +predefined predicates. This generally applies to file patterns other +than globs and arguments for predicates.</p> +<p>Special characters can be used in quoted identifiers by escaping them, +e.g., <tt class="docutils literal">\n</tt> is interpreted as a newline. To prevent them from being +interpreted, strings can be prefixed with <tt class="docutils literal">r</tt>, e.g. <tt class="docutils literal"><span class="pre">r'...'</span></tt>.</p> +<p>There is a single prefix operator:</p> +<dl class="docutils"> +<dt><tt class="docutils literal">not x</tt></dt> +<dd>Files not in x. Short form is <tt class="docutils literal">! x</tt>.</dd> +</dl> +<p>These are the supported infix operators:</p> +<dl class="docutils"> +<dt><tt class="docutils literal">x and y</tt></dt> +<dd>The intersection of files in x and y. Short form is <tt class="docutils literal">x & y</tt>.</dd> +<dt><tt class="docutils literal">x or y</tt></dt> +<dd>The union of files in x and y. There are two alternative short +forms: <tt class="docutils literal">x | y</tt> and <tt class="docutils literal">x + y</tt>.</dd> +<dt><tt class="docutils literal">x - y</tt></dt> +<dd>Files in x but not in y.</dd> +</dl> +<p>The following predicates are supported:</p> +<dl class="docutils"> +<dt><tt class="docutils literal">added()</tt></dt> +<dd>File that is added according to status.</dd> +<dt><tt class="docutils literal">binary()</tt></dt> +<dd>File that appears to be binary (contains NUL bytes).</dd> +<dt><tt class="docutils literal">clean()</tt></dt> +<dd>File that is clean according to status.</dd> +<dt><tt class="docutils literal">copied()</tt></dt> +<dd>File that is recorded as being copied.</dd> +<dt><tt class="docutils literal">deleted()</tt></dt> +<dd>File that is deleted according to status.</dd> +<dt><tt class="docutils literal">encoding(name)</tt></dt> +<dd>File can be successfully decoded with the given character +encoding. May not be useful for encodings other than ASCII and +UTF-8.</dd> +<dt><tt class="docutils literal">exec()</tt></dt> +<dd>File that is marked as executable.</dd> +<dt><tt class="docutils literal">grep(regex)</tt></dt> +<dd>File contains the given regular expression.</dd> +<dt><tt class="docutils literal">hgignore()</tt></dt> +<dd>File that matches the active .hgignore pattern.</dd> +<dt><tt class="docutils literal">ignored()</tt></dt> +<dd>File that is ignored according to status. These files will only be +considered if this predicate is used.</dd> +<dt><tt class="docutils literal">modified()</tt></dt> +<dd>File that is modified according to status.</dd> +<dt><tt class="docutils literal">removed()</tt></dt> +<dd>File that is removed according to status.</dd> +<dt><tt class="docutils literal">resolved()</tt></dt> +<dd>File that is marked resolved according to the resolve state.</dd> +<dt><tt class="docutils literal">size(expression)</tt></dt> +<dd><p class="first">File size matches the given expression. Examples:</p> +<ul class="last simple"> +<li>1k (files from 1024 to 2047 bytes)</li> +<li>< 20k (files less than 20480 bytes)</li> +<li>>= .5MB (files at least 524288 bytes)</li> +<li>4k - 1MB (files from 4096 bytes to 1048576 bytes)</li> +</ul> +</dd> +<dt><tt class="docutils literal"><span class="pre">subrepo([pattern])</span></tt></dt> +<dd>Subrepositories whose paths match the given pattern.</dd> +<dt><tt class="docutils literal">symlink()</tt></dt> +<dd>File that is marked as a symlink.</dd> +<dt><tt class="docutils literal">unknown()</tt></dt> +<dd>File that is unknown according to status. These files will only be +considered if this predicate is used.</dd> +<dt><tt class="docutils literal">unresolved()</tt></dt> +<dd>File that is marked unresolved according to the resolve state.</dd> +</dl> +<p>Some sample queries:</p> +<ul> +<li><p class="first">Show status of files that appear to be binary in the working directory:</p> +<pre class="literal-block"> +hg status -A "set:binary()" +</pre> +</li> +<li><p class="first">Forget files that are in .hgignore but are already tracked:</p> +<pre class="literal-block"> +hg forget "set:hgignore() and not ignored()" +</pre> +</li> +<li><p class="first">Find text files that contain a string:</p> +<pre class="literal-block"> +hg locate "set:grep(magic) and not binary()" +</pre> +</li> +<li><p class="first">Find C files in a non-standard encoding:</p> +<pre class="literal-block"> +hg locate "set:**.c and not encoding('UTF-8')" +</pre> +</li> +<li><p class="first">Revert copies of large binary files:</p> +<pre class="literal-block"> +hg revert "set:copied() and binary() and size('>1M')" +</pre> +</li> +<li><p class="first">Remove files listed in foo.lst that contain the letter a or b:</p> +<pre class="literal-block"> +hg remove "set: 'listfile:foo.lst' and (**a* or **b*)" +</pre> +</li> +</ul> +<p>See also <a class="reference external" href="hg.1.html#patterns"><tt class="docutils literal">hg help patterns</tt></a>.</p> +</div> +<div class="section" id="id1"> +<span id="glossary"></span><h1><a class="toc-backref" href="#contents">Glossary</a></h1> +<dl class="docutils"> +<dt>Ancestor</dt> +<dd>Any changeset that can be reached by an unbroken chain of parent +changesets from a given changeset. More precisely, the ancestors +of a changeset can be defined by two properties: a parent of a +changeset is an ancestor, and a parent of an ancestor is an +ancestor. See also: 'Descendant'.</dd> +<dt>Bookmark</dt> +<dd><p class="first">Bookmarks are pointers to certain commits that move when +committing. They are similar to tags in that it is possible to use +bookmark names in all places where Mercurial expects a changeset +ID, e.g., with <a class="reference external" href="hg.1.html#update"><tt class="docutils literal">hg update</tt></a>. Unlike tags, bookmarks move along +when you make a commit.</p> +<p class="last">Bookmarks can be renamed, copied and deleted. Bookmarks are local, +unless they are explicitly pushed or pulled between repositories. +Pushing and pulling bookmarks allow you to collaborate with others +on a branch without creating a named branch.</p> +</dd> +<dt>Branch</dt> +<dd><p class="first">(Noun) A child changeset that has been created from a parent that +is not a head. These are known as topological branches, see +'Branch, topological'. If a topological branch is named, it becomes +a named branch. If a topological branch is not named, it becomes +an anonymous branch. See 'Branch, anonymous' and 'Branch, named'.</p> +<p>Branches may be created when changes are pulled from or pushed to +a remote repository, since new heads may be created by these +operations. Note that the term branch can also be used informally +to describe a development process in which certain development is +done independently of other development. This is sometimes done +explicitly with a named branch, but it can also be done locally, +using bookmarks or clones and anonymous branches.</p> +<p>Example: "The experimental branch".</p> +<p>(Verb) The action of creating a child changeset which results in +its parent having more than one child.</p> +<p class="last">Example: "I'm going to branch at X".</p> +</dd> +<dt>Branch, anonymous</dt> +<dd>Every time a new child changeset is created from a parent that is not +a head and the name of the branch is not changed, a new anonymous +branch is created.</dd> +<dt>Branch, closed</dt> +<dd>A named branch whose branch heads have all been closed.</dd> +<dt>Branch, default</dt> +<dd>The branch assigned to a changeset when no name has previously been +assigned.</dd> +<dt>Branch head</dt> +<dd>See 'Head, branch'.</dd> +<dt>Branch, inactive</dt> +<dd><p class="first">If a named branch has no topological heads, it is considered to be +inactive. As an example, a feature branch becomes inactive when it +is merged into the default branch. The <a class="reference external" href="hg.1.html#branches"><tt class="docutils literal">hg branches</tt></a> command +shows inactive branches by default, though they can be hidden with +<a class="reference external" href="hg.1.html#branches"><tt class="docutils literal">hg branches <span class="pre">--active</span></tt></a>.</p> +<p class="last">NOTE: this concept is deprecated because it is too implicit. +Branches should now be explicitly closed using <a class="reference external" href="hg.1.html#commit"><tt class="docutils literal">hg commit +<span class="pre">--close-branch</span></tt></a> when they are no longer needed.</p> +</dd> +<dt>Branch, named</dt> +<dd><p class="first">A collection of changesets which have the same branch name. By +default, children of a changeset in a named branch belong to the +same named branch. A child can be explicitly assigned to a +different branch. See <a class="reference external" href="hg.1.html#branch"><tt class="docutils literal">hg help branch</tt></a>, <a class="reference external" href="hg.1.html#branches"><tt class="docutils literal">hg help branches</tt></a> and +<a class="reference external" href="hg.1.html#commit"><tt class="docutils literal">hg commit <span class="pre">--close-branch</span></tt></a> for more information on managing +branches.</p> +<p class="last">Named branches can be thought of as a kind of namespace, dividing +the collection of changesets that comprise the repository into a +collection of disjoint subsets. A named branch is not necessarily +a topological branch. If a new named branch is created from the +head of another named branch, or the default branch, but no +further changesets are added to that previous branch, then that +previous branch will be a branch in name only.</p> +</dd> +<dt>Branch tip</dt> +<dd>See 'Tip, branch'.</dd> +<dt>Branch, topological</dt> +<dd>Every time a new child changeset is created from a parent that is +not a head, a new topological branch is created. If a topological +branch is named, it becomes a named branch. If a topological +branch is not named, it becomes an anonymous branch of the +current, possibly default, branch.</dd> +<dt>Changelog</dt> +<dd>A record of the changesets in the order in which they were added +to the repository. This includes details such as changeset id, +author, commit message, date, and list of changed files.</dd> +<dt>Changeset</dt> +<dd>A snapshot of the state of the repository used to record a change.</dd> +<dt>Changeset, child</dt> +<dd>The converse of parent changeset: if P is a parent of C, then C is +a child of P. There is no limit to the number of children that a +changeset may have.</dd> +<dt>Changeset id</dt> +<dd>A SHA-1 hash that uniquely identifies a changeset. It may be +represented as either a "long" 40 hexadecimal digit string, or a +"short" 12 hexadecimal digit string.</dd> +<dt>Changeset, merge</dt> +<dd>A changeset with two parents. This occurs when a merge is +committed.</dd> +<dt>Changeset, parent</dt> +<dd>A revision upon which a child changeset is based. Specifically, a +parent changeset of a changeset C is a changeset whose node +immediately precedes C in the DAG. Changesets have at most two +parents.</dd> +<dt>Checkout</dt> +<dd><p class="first">(Noun) The working directory being updated to a specific +revision. This use should probably be avoided where possible, as +changeset is much more appropriate than checkout in this context.</p> +<p>Example: "I'm using checkout X."</p> +<p>(Verb) Updating the working directory to a specific changeset. See +<a class="reference external" href="hg.1.html#update"><tt class="docutils literal">hg help update</tt></a>.</p> +<p class="last">Example: "I'm going to check out changeset X."</p> +</dd> +<dt>Child changeset</dt> +<dd>See 'Changeset, child'.</dd> +<dt>Close changeset</dt> +<dd>See 'Head, closed branch'</dd> +<dt>Closed branch</dt> +<dd>See 'Branch, closed'.</dd> +<dt>Clone</dt> +<dd><p class="first">(Noun) An entire or partial copy of a repository. The partial +clone must be in the form of a revision and its ancestors.</p> +<p>Example: "Is your clone up to date?".</p> +<p>(Verb) The process of creating a clone, using <a class="reference external" href="hg.1.html#clone"><tt class="docutils literal">hg clone</tt></a>.</p> +<p class="last">Example: "I'm going to clone the repository".</p> +</dd> +<dt>Closed branch head</dt> +<dd>See 'Head, closed branch'.</dd> +<dt>Commit</dt> +<dd><p class="first">(Noun) A synonym for changeset.</p> +<p>Example: "Is the bug fixed in your recent commit?"</p> +<p>(Verb) The act of recording changes to a repository. When files +are committed in a working directory, Mercurial finds the +differences between the committed files and their parent +changeset, creating a new changeset in the repository.</p> +<p class="last">Example: "You should commit those changes now."</p> +</dd> +<dt>Cset</dt> +<dd>A common abbreviation of the term changeset.</dd> +<dt>DAG</dt> +<dd>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 graphical tools such as <a class="reference external" href="hg.1.html#glog"><tt class="docutils literal">hg glog</tt></a> +(graphlog). In Mercurial, the DAG is limited by the requirement +for children to have at most two parents.</dd> +<dt>Default branch</dt> +<dd>See 'Branch, default'.</dd> +<dt>Descendant</dt> +<dd>Any changeset that can be reached by a chain of child changesets +from a given changeset. More precisely, the descendants of a +changeset can be defined by two properties: the child of a +changeset is a descendant, and the child of a descendant is a +descendant. See also: 'Ancestor'.</dd> +<dt>Diff</dt> +<dd><p class="first">(Noun) The difference between the contents and attributes of files +in two changesets or a changeset and the current working +directory. The difference is usually represented in a standard +form called a "diff" or "patch". The "git diff" format is used +when the changes include copies, renames, or changes to file +attributes, none of which can be represented/handled by classic +"diff" and "patch".</p> +<p>Example: "Did you see my correction in the diff?"</p> +<p>(Verb) Diffing two changesets is the action of creating a diff or +patch.</p> +<p class="last">Example: "If you diff with changeset X, you will see what I mean."</p> +</dd> +<dt>Directory, working</dt> +<dd>The working directory represents the state of the files tracked by +Mercurial, that will be recorded in the next commit. The working +directory initially corresponds to the snapshot at an existing +changeset, known as the parent of the working directory. See +'Parent, working directory'. The state may be modified by changes +to the files introduced manually or by a merge. The repository +metadata exists in the .hg directory inside the working directory.</dd> +<dt>Draft</dt> +<dd>Changesets in the draft phase have not been shared with publishing +repositories and may thus be safely changed by history-modifying +extensions. See <a class="reference external" href="hg.1.html#phases"><tt class="docutils literal">hg help phases</tt></a>.</dd> +<dt>Graph</dt> +<dd>See DAG and <a class="reference external" href="hg.1.html#graphlog"><tt class="docutils literal">hg help graphlog</tt></a>.</dd> +<dt>Head</dt> +<dd><p class="first">The term 'head' may be used to refer to both a branch head or a +repository head, depending on the context. See 'Head, branch' and +'Head, repository' for specific definitions.</p> +<p class="last">Heads are where development generally takes place and are the +usual targets for update and merge operations.</p> +</dd> +<dt>Head, branch</dt> +<dd>A changeset with no descendants on the same named branch.</dd> +<dt>Head, closed branch</dt> +<dd><p class="first">A changeset that marks a head as no longer interesting. The closed +head is no longer listed by <a class="reference external" href="hg.1.html#heads"><tt class="docutils literal">hg heads</tt></a>. A branch is considered +closed when all its heads are closed and consequently is not +listed by <a class="reference external" href="hg.1.html#branches"><tt class="docutils literal">hg branches</tt></a>.</p> +<p class="last">Closed heads can be re-opened by committing new changeset as the +child of the changeset that marks a head as closed.</p> +</dd> +<dt>Head, repository</dt> +<dd>A topological head which has not been closed.</dd> +<dt>Head, topological</dt> +<dd>A changeset with no children in the repository.</dd> +<dt>History, immutable</dt> +<dd>Once committed, changesets cannot be altered. Extensions which +appear to change history actually create new changesets that +replace existing ones, and then destroy the old changesets. Doing +so in public repositories can result in old changesets being +reintroduced to the repository.</dd> +<dt>History, rewriting</dt> +<dd>The changesets in a repository are immutable. However, extensions +to Mercurial can be used to alter the repository, usually in such +a way as to preserve changeset contents.</dd> +<dt>Immutable history</dt> +<dd>See 'History, immutable'.</dd> +<dt>Merge changeset</dt> +<dd>See 'Changeset, merge'.</dd> +<dt>Manifest</dt> +<dd>Each changeset has a manifest, which is the list of files that are +tracked by the changeset.</dd> +<dt>Merge</dt> +<dd>Used to bring together divergent branches of work. When you update +to a changeset and then merge another changeset, you bring the +history of the latter changeset into your working directory. Once +conflicts are resolved (and marked), this merge may be committed +as a merge changeset, bringing two branches together in the DAG.</dd> +<dt>Named branch</dt> +<dd>See 'Branch, named'.</dd> +<dt>Null changeset</dt> +<dd>The empty changeset. It is the parent state of newly-initialized +repositories and repositories with no checked out revision. It is +thus the parent of root changesets and the effective ancestor when +merging unrelated changesets. Can be specified by the alias 'null' +or by the changeset ID '000000000000'.</dd> +<dt>Parent</dt> +<dd>See 'Changeset, parent'.</dd> +<dt>Parent changeset</dt> +<dd>See 'Changeset, parent'.</dd> +<dt>Parent, working directory</dt> +<dd>The working directory parent reflects a virtual revision which is +the child of the changeset (or two changesets with an uncommitted +merge) shown by <a class="reference external" href="hg.1.html#parents"><tt class="docutils literal">hg parents</tt></a>. This is changed with +<a class="reference external" href="hg.1.html#update"><tt class="docutils literal">hg update</tt></a>. Other commands to see the working directory parent +are <a class="reference external" href="hg.1.html#summary"><tt class="docutils literal">hg summary</tt></a> and <a class="reference external" href="hg.1.html#id"><tt class="docutils literal">hg id</tt></a>. Can be specified by the alias ".".</dd> +<dt>Patch</dt> +<dd><p class="first">(Noun) The product of a diff operation.</p> +<p>Example: "I've sent you my patch."</p> +<p>(Verb) The process of using a patch file to transform one +changeset into another.</p> +<p class="last">Example: "You will need to patch that revision."</p> +</dd> +<dt>Phase</dt> +<dd>A per-changeset state tracking how the changeset has been or +should be shared. See <a class="reference external" href="hg.1.html#phases"><tt class="docutils literal">hg help phases</tt></a>.</dd> +<dt>Public</dt> +<dd>Changesets in the public phase have been shared with publishing +repositories and are therefore considered immutable. See <a class="reference external" href="hg.1.html#phases"><tt class="docutils literal">hg help +phases</tt></a>.</dd> +<dt>Pull</dt> +<dd>An operation in which changesets in a remote repository which are +not in the local repository are brought into the local +repository. Note that this operation without special arguments +only updates the repository, it does not update the files in the +working directory. See <a class="reference external" href="hg.1.html#pull"><tt class="docutils literal">hg help pull</tt></a>.</dd> +<dt>Push</dt> +<dd>An operation in which changesets in a local repository which are +not in a remote repository are sent to the remote repository. Note +that this operation only adds changesets which have been committed +locally to the remote repository. Uncommitted changes are not +sent. See <a class="reference external" href="hg.1.html#push"><tt class="docutils literal">hg help push</tt></a>.</dd> +<dt>Repository</dt> +<dd>The metadata describing all recorded states of a collection of +files. Each recorded state is represented by a changeset. A +repository is usually (but not always) found in the <tt class="docutils literal">.hg</tt> +subdirectory of a working directory. Any recorded state can be +recreated by "updating" a working directory to a specific +changeset.</dd> +<dt>Repository head</dt> +<dd>See 'Head, repository'.</dd> +<dt>Revision</dt> +<dd>A state of the repository at some point in time. Earlier revisions +can be updated to by using <a class="reference external" href="hg.1.html#update"><tt class="docutils literal">hg update</tt></a>. See also 'Revision +number'; See also 'Changeset'.</dd> +<dt>Revision number</dt> +<dd>This integer uniquely identifies a changeset in a specific +repository. It represents the order in which changesets were added +to a repository, starting with revision number 0. Note that the +revision number may be different in each clone of a repository. To +identify changesets uniquely between different clones, see +'Changeset id'.</dd> +<dt>Revlog</dt> +<dd>History storage mechanism used by Mercurial. It is a form of delta +encoding, with occasional full revision of data followed by delta +of each successive revision. It includes data and an index +pointing to the data.</dd> +<dt>Rewriting history</dt> +<dd>See 'History, rewriting'.</dd> +<dt>Root</dt> +<dd>A changeset that has only the null changeset as its parent. Most +repositories have only a single root changeset.</dd> +<dt>Secret</dt> +<dd>Changesets in the secret phase may not be shared via push, pull, +or clone. See <a class="reference external" href="hg.1.html#phases"><tt class="docutils literal">hg help phases</tt></a>.</dd> +<dt>Tag</dt> +<dd>An alternative name given to a changeset. Tags can be used in all +places where Mercurial expects a changeset ID, e.g., with +<a class="reference external" href="hg.1.html#update"><tt class="docutils literal">hg update</tt></a>. The creation of a tag is stored in the history and +will thus automatically be shared with other using push and pull.</dd> +<dt>Tip</dt> +<dd>The changeset with the highest revision number. It is the changeset +most recently added in a repository.</dd> +<dt>Tip, branch</dt> +<dd>The head of a given branch with the highest revision number. When +a branch name is used as a revision identifier, it refers to the +branch tip. See also 'Branch, head'. Note that because revision +numbers may be different in different repository clones, the +branch tip may be different in different cloned repositories.</dd> +<dt>Update</dt> +<dd><p class="first">(Noun) Another synonym of changeset.</p> +<p>Example: "I've pushed an update".</p> +<p>(Verb) This term is usually used to describe updating the state of +the working directory to that of a specific changeset. See +<a class="reference external" href="hg.1.html#update"><tt class="docutils literal">hg help update</tt></a>.</p> +<p class="last">Example: "You should update".</p> +</dd> +<dt>Working directory</dt> +<dd>See 'Directory, working'.</dd> +<dt>Working directory parent</dt> +<dd>See 'Parent, working directory'.</dd> +</dl> +</div> +<div class="section" id="syntax-for-mercurial-ignore-files"> +<span id="ignore"></span><span id="hgignore"></span><h1><a class="toc-backref" href="#contents">Syntax for Mercurial Ignore Files</a></h1> +<div class="section" id="id2"> +<h2>Synopsis</h2> +<p>The Mercurial system uses a file called <tt class="docutils literal">.hgignore</tt> in the root +directory of a repository to control its behavior when it searches +for files that it is not currently tracking.</p> +</div> +<div class="section" id="id3"> +<h2>Description</h2> +<p>The working directory of a Mercurial repository will often contain +files that should not be tracked by Mercurial. These include backup +files created by editors and build products created by compilers. +These files can be ignored by listing them in a <tt class="docutils literal">.hgignore</tt> file in +the root of the working directory. The <tt class="docutils literal">.hgignore</tt> file must be +created manually. It is typically put under version control, so that +the settings will propagate to other repositories with push and pull.</p> +<p>An untracked file is ignored if its path relative to the repository +root directory, or any prefix path of that path, is matched against +any pattern in <tt class="docutils literal">.hgignore</tt>.</p> +<p>For example, say we have an untracked file, <tt class="docutils literal">file.c</tt>, at +<tt class="docutils literal">a/b/file.c</tt> inside our repository. Mercurial will ignore <tt class="docutils literal">file.c</tt> +if any pattern in <tt class="docutils literal">.hgignore</tt> matches <tt class="docutils literal">a/b/file.c</tt>, <tt class="docutils literal">a/b</tt> or <tt class="docutils literal">a</tt>.</p> +<p>In addition, a Mercurial configuration file can reference a set of +per-user or global ignore files. See the <tt class="docutils literal">ignore</tt> configuration +key on the <tt class="docutils literal">[ui]</tt> section of <a class="reference external" href="hg.1.html#config"><tt class="docutils literal">hg help config</tt></a> for details of how to +configure these files.</p> +<p>To control Mercurial's handling of files that it manages, many +commands support the <tt class="docutils literal"><span class="pre">-I</span></tt> and <tt class="docutils literal"><span class="pre">-X</span></tt> options; see +<a class="reference external" href="hg.1.html#<command>"><tt class="docutils literal">hg help <command></tt></a> and <a class="reference external" href="hg.1.html#patterns"><tt class="docutils literal">hg help patterns</tt></a> for details.</p> +<p>Files that are already tracked are not affected by .hgignore, even +if they appear in .hgignore. An untracked file X can be explicitly +added with <a class="reference external" href="hg.1.html#add"><tt class="docutils literal">hg add X</tt></a>, even if X would be excluded by a pattern +in .hgignore.</p> +</div> +<div class="section" id="syntax"> +<h2>Syntax</h2> +<p>An ignore file is a plain text file consisting of a list of patterns, +with one pattern per line. Empty lines are skipped. The <tt class="docutils literal">#</tt> +character is treated as a comment character, and the <tt class="docutils literal">\</tt> character +is treated as an escape character.</p> +<p>Mercurial supports several pattern syntaxes. The default syntax used +is Python/Perl-style regular expressions.</p> +<p>To change the syntax used, use a line of the following form:</p> +<pre class="literal-block"> +syntax: NAME +</pre> +<p>where <tt class="docutils literal">NAME</tt> is one of the following:</p> +<dl class="docutils"> +<dt><tt class="docutils literal">regexp</tt></dt> +<dd>Regular expression, Python/Perl syntax.</dd> +<dt><tt class="docutils literal">glob</tt></dt> +<dd>Shell-style glob.</dd> +</dl> +<p>The chosen syntax stays in effect when parsing all patterns that +follow, until another syntax is selected.</p> +<p>Neither glob nor regexp patterns are rooted. A glob-syntax pattern of +the form <tt class="docutils literal">*.c</tt> will match a file ending in <tt class="docutils literal">.c</tt> in any directory, +and a regexp pattern of the form <tt class="docutils literal">\.c$</tt> will do the same. To root a +regexp pattern, start it with <tt class="docutils literal">^</tt>.</p> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">Patterns specified in other than <tt class="docutils literal">.hgignore</tt> are always rooted. +Please see <a class="reference external" href="hg.1.html#patterns"><tt class="docutils literal">hg help patterns</tt></a> for details.</p> +</div> +</div> +<div class="section" id="example"> +<h2>Example</h2> +<p>Here is an example ignore file.</p> +<pre class="literal-block"> +# use glob syntax. +syntax: glob + +*.elc +*.pyc +*~ + +# switch to regexp syntax. +syntax: regexp +^\.pc/ +</pre> +</div> +</div> +<div class="section" id="configuring-hgweb"> +<span id="hgweb"></span><h1><a class="toc-backref" href="#contents">Configuring hgweb</a></h1> +<p>Mercurial's internal web server, hgweb, can serve either a single +repository, or a tree of repositories. In the second case, repository +paths and global options can be defined using a dedicated +configuration file common to <a class="reference external" href="hg.1.html#serve"><tt class="docutils literal">hg serve</tt></a>, <tt class="docutils literal">hgweb.wsgi</tt>, +<tt class="docutils literal">hgweb.cgi</tt> and <tt class="docutils literal">hgweb.fcgi</tt>.</p> +<p>This file uses the same syntax as other Mercurial configuration files +but recognizes only the following sections:</p> +<blockquote> +<ul class="simple"> +<li>web</li> +<li>paths</li> +<li>collections</li> +</ul> +</blockquote> +<p>The <tt class="docutils literal">web</tt> options are thorougly described in <a class="reference external" href="hg.1.html#config"><tt class="docutils literal">hg help config</tt></a>.</p> +<p>The <tt class="docutils literal">paths</tt> section maps URL paths to paths of repositories in the +filesystem. hgweb will not expose the filesystem directly - only +Mercurial repositories can be published and only according to the +configuration.</p> +<p>The left hand side is the path in the URL. Note that hgweb reserves +subpaths like <tt class="docutils literal">rev</tt> or <tt class="docutils literal">file</tt>, try using different names for +nested repositories to avoid confusing effects.</p> +<p>The right hand side is the path in the filesystem. If the specified +path ends with <tt class="docutils literal">*</tt> or <tt class="docutils literal">**</tt> the filesystem will be searched +recursively for repositories below that point. +With <tt class="docutils literal">*</tt> it will not recurse into the repositories it finds (except for +<tt class="docutils literal">.hg/patches</tt>). +With <tt class="docutils literal">**</tt> it will also search inside repository working directories +and possibly find subrepositories.</p> +<p>In this example:</p> +<pre class="literal-block"> +[paths] +/projects/a = /srv/tmprepos/a +/projects/b = c:/repos/b +/ = /srv/repos/* +/user/bob = /home/bob/repos/** +</pre> +<ul class="simple"> +<li>The first two entries make two repositories in different directories +appear under the same directory in the web interface</li> +<li>The third entry will publish every Mercurial repository found in +<tt class="docutils literal">/srv/repos/</tt>, for instance the repository <tt class="docutils literal">/srv/repos/quux/</tt> +will appear as <tt class="docutils literal"><span class="pre">http://server/quux/</span></tt></li> +<li>The fourth entry will publish both <tt class="docutils literal"><span class="pre">http://server/user/bob/quux/</span></tt> +and <tt class="docutils literal"><span class="pre">http://server/user/bob/quux/testsubrepo/</span></tt></li> +</ul> +<p>The <tt class="docutils literal">collections</tt> section is deprecated and has been superseeded by +<tt class="docutils literal">paths</tt>.</p> +</div> +<div class="section" id="id4"> +<span id="mergetools"></span><span id="merge-tools"></span><h1><a class="toc-backref" href="#contents">Merge Tools</a></h1> +<p>To merge files Mercurial uses merge tools.</p> +<p>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.</p> +<p>Merge tools are used both for <a class="reference external" href="hg.1.html#resolve"><tt class="docutils literal">hg resolve</tt></a>, <a class="reference external" href="hg.1.html#merge"><tt class="docutils literal">hg merge</tt></a>, <a class="reference external" href="hg.1.html#update"><tt class="docutils literal">hg update</tt></a>, +<a class="reference external" href="hg.1.html#backout"><tt class="docutils literal">hg backout</tt></a> and in several extensions.</p> +<p>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.</p> +<div class="section" id="available-merge-tools"> +<h2>Available merge tools</h2> +<p>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.</p> +<p>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.</p> +<p>There are some internal merge tools which can be used. The internal +merge tools are:</p> +<dl class="docutils"> +<dt><tt class="docutils literal">internal:dump</tt></dt> +<dd>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 +<tt class="docutils literal">a.txt</tt>, these files will accordingly be named <tt class="docutils literal">a.txt.local</tt>, +<tt class="docutils literal">a.txt.other</tt> and <tt class="docutils literal">a.txt.base</tt> and they will be placed in the +same directory as <tt class="docutils literal">a.txt</tt>.</dd> +<dt><tt class="docutils literal">internal:fail</tt></dt> +<dd>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.</dd> +<dt><tt class="docutils literal">internal:local</tt></dt> +<dd>Uses the local version of files as the merged version.</dd> +<dt><tt class="docutils literal">internal:merge</tt></dt> +<dd>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.</dd> +<dt><tt class="docutils literal">internal:other</tt></dt> +<dd>Uses the other version of files as the merged version.</dd> +<dt><tt class="docutils literal">internal:prompt</tt></dt> +<dd>Asks the user which of the local or the other version to keep as +the merged version.</dd> +</dl> +<p>Internal tools are always available and do not require a GUI but will by default +not handle symlinks or binary files.</p> +</div> +<div class="section" id="choosing-a-merge-tool"> +<h2>Choosing a merge tool</h2> +<p>Mercurial uses these rules when deciding which merge tool to use:</p> +<ol class="arabic simple"> +<li>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.</li> +<li>If the <tt class="docutils literal">HGMERGE</tt> environment variable is present, its value is used and +must be executable by the shell.</li> +<li>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 +corresponding to a matching pattern is used. Here, binary capabilities of the +merge tool are not considered.</li> +<li>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.</li> +<li>If any usable merge tools are present in the merge-tools configuration +section, the one with the highest priority is used.</li> +<li>If a program named <tt class="docutils literal">hgmerge</tt> can be found on the system, it is used - but +it will by default not be used for symlinks and binary files.</li> +<li>If the file to be merged is not binary and is not a symlink, then +<tt class="docutils literal">internal:merge</tt> is used.</li> +<li>The merge of the file fails and must be resolved before commit.</li> +</ol> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">After selecting a merge program, Mercurial will by default attempt +to merge the files using a simple merge algorithm first. Only if it doesn't +succeed because of conflicting changes Mercurial will actually 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.</p> +</div> +<p>See the merge-tools and ui sections of hgrc(5) for details on the +configuration of merge tools.</p> +</div> +</div> +<div class="section" id="specifying-multiple-revisions"> +<span id="mrevs"></span><span id="multirevs"></span><h1><a class="toc-backref" href="#contents">Specifying Multiple Revisions</a></h1> +<p>When Mercurial accepts more than one revision, they may be specified +individually, or provided as a topologically continuous range, +separated by the ":" character.</p> +<p>The syntax of range notation is [BEGIN]:[END], where BEGIN and END are +revision identifiers. Both BEGIN and END are optional. If BEGIN is not +specified, it defaults to revision number 0. If END is not specified, +it defaults to the tip. The range ":" thus means "all revisions".</p> +<p>If BEGIN is greater than END, revisions are treated in reverse order.</p> +<p>A range acts as a closed interval. This means that a range of 3:5 +gives 3, 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6.</p> +</div> +<div class="section" id="file-name-patterns"> +<span id="patterns"></span><h1><a class="toc-backref" href="#contents">File Name Patterns</a></h1> +<p>Mercurial accepts several notations for identifying one or more files +at a time.</p> +<p>By default, Mercurial treats filenames as shell-style extended glob +patterns.</p> +<p>Alternate pattern notations must be specified explicitly.</p> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">Patterns specified in <tt class="docutils literal">.hgignore</tt> are not rooted. +Please see <a class="reference external" href="hg.1.html#hgignore"><tt class="docutils literal">hg help hgignore</tt></a> for details.</p> +</div> +<p>To use a plain path name without any pattern matching, start it with +<tt class="docutils literal">path:</tt>. These path names must completely match starting at the +current repository root.</p> +<p>To use an extended glob, start a name with <tt class="docutils literal">glob:</tt>. Globs are rooted +at the current directory; a glob such as <tt class="docutils literal">*.c</tt> will only match files +in the current directory ending with <tt class="docutils literal">.c</tt>.</p> +<p>The supported glob syntax extensions are <tt class="docutils literal">**</tt> to match any string +across path separators and <tt class="docutils literal">{a,b}</tt> to mean "a or b".</p> +<p>To use a Perl/Python regular expression, start a name with <tt class="docutils literal">re:</tt>. +Regexp pattern matching is anchored at the root of the repository.</p> +<p>To read name patterns from a file, use <tt class="docutils literal">listfile:</tt> or <tt class="docutils literal">listfile0:</tt>. +The latter expects null delimited patterns while the former expects line +feeds. Each string read from the file is itself treated as a file +pattern.</p> +<p>Plain examples:</p> +<pre class="literal-block"> +path:foo/bar a name bar in a directory named foo in the root + of the repository +path:path:name a file or directory named "path:name" +</pre> +<p>Glob examples:</p> +<pre class="literal-block"> +glob:*.c any name ending in ".c" in the current directory +*.c any name ending in ".c" in the current directory +**.c any name ending in ".c" in any subdirectory of the + current directory including itself. +foo/*.c any name ending in ".c" in the directory foo +foo/**.c any name ending in ".c" in any subdirectory of foo + including itself. +</pre> +<p>Regexp examples:</p> +<pre class="literal-block"> +re:.*\.c$ any name ending in ".c", anywhere in the repository +</pre> +<p>File examples:</p> +<pre class="literal-block"> +listfile:list.txt read list from list.txt with one file pattern per line +listfile0:list.txt read list from list.txt with null byte delimiters +</pre> +<p>See also <a class="reference external" href="hg.1.html#filesets"><tt class="docutils literal">hg help filesets</tt></a>.</p> +</div> +<div class="section" id="working-with-phases"> +<span id="phases"></span><h1><a class="toc-backref" href="#contents">Working with Phases</a></h1> +<div class="section" id="what-are-phases"> +<h2>What are phases?</h2> +<p>Phases are a system for tracking which changesets have been or should +be shared. This helps prevent common mistakes when modifying history +(for instance, with the mq or rebase extensions).</p> +<p>Each changeset in a repository is in one of the following phases:</p> +<blockquote> +<ul class="simple"> +<li>public : changeset is visible on a public server</li> +<li>draft : changeset is not yet published</li> +<li>secret : changeset should not be pushed, pulled, or cloned</li> +</ul> +</blockquote> +<p>These phases are ordered (public < draft < secret) and no changeset +can be in a lower phase than its ancestors. For instance, if a +changeset is public, all its ancestors are also public. Lastly, +changeset phases should only be changed towards the public phase.</p> +</div> +<div class="section" id="how-are-phases-managed"> +<h2>How are phases managed?</h2> +<p>For the most part, phases should work transparently. By default, a +changeset is created in the draft phase and is moved into the public +phase when it is pushed to another repository.</p> +<p>Once changesets become public, extensions like mq and rebase will +refuse to operate on them to prevent creating duplicate changesets. +Phases can also be manually manipulated with the <a class="reference external" href="hg.1.html#phase"><tt class="docutils literal">hg phase</tt></a> command +if needed. See <a class="reference external" href="hg.1.html#-v"><tt class="docutils literal">hg help <span class="pre">-v</span> phase</tt></a> for examples.</p> +</div> +<div class="section" id="phases-and-servers"> +<h2>Phases and servers</h2> +<p>Normally, all servers are <tt class="docutils literal">publishing</tt> by default. This means:</p> +<pre class="literal-block"> +- all draft changesets that are pulled or cloned appear in phase +public on the client + +- all draft changesets that are pushed appear as public on both +client and server + +- secret changesets are neither pushed, pulled, or cloned +</pre> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">Pulling a draft changeset from a publishing server does not mark it +as public on the server side due to the read-only nature of pull.</p> +</div> +<p>Sometimes it may be desirable to push and pull changesets in the draft +phase to share unfinished work. This can be done by setting a +repository to disable publishing in its configuration file:</p> +<pre class="literal-block"> +[phases] +publish = False +</pre> +<p>See <a class="reference external" href="hg.1.html#config"><tt class="docutils literal">hg help config</tt></a> for more information on config files.</p> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">Servers running older versions of Mercurial are treated as +publishing.</p> +</div> +</div> +<div class="section" id="examples"> +<h2>Examples</h2> +<blockquote> +<ul> +<li><p class="first">list changesets in draft or secret phase:</p> +<pre class="literal-block"> +hg log -r "not public()" +</pre> +</li> +<li><p class="first">change all secret changesets to draft:</p> +<pre class="literal-block"> +hg phase --draft "secret()" +</pre> +</li> +<li><p class="first">forcibly move the current changeset and descendants from public to draft:</p> +<pre class="literal-block"> +hg phase --force --draft . +</pre> +</li> +<li><p class="first">show a list of changeset revision and phase:</p> +<pre class="literal-block"> +hg log --template "{rev} {phase}\n" +</pre> +</li> +<li><p class="first">resynchronize draft changesets relative to a remote repository:</p> +<pre class="literal-block"> +hg phase -fd 'outgoing(URL)' +</pre> +</li> +</ul> +</blockquote> +<p>See <a class="reference external" href="hg.1.html#phase"><tt class="docutils literal">hg help phase</tt></a> for more information on manually manipulating phases.</p> +</div> +</div> +<div class="section" id="specifying-single-revisions"> +<span id="revs"></span><span id="revisions"></span><h1><a class="toc-backref" href="#contents">Specifying Single Revisions</a></h1> +<p>Mercurial supports several ways to specify individual revisions.</p> +<p>A plain integer is treated as a revision number. Negative integers are +treated as sequential offsets from the tip, with -1 denoting the tip, +-2 denoting the revision prior to the tip, and so forth.</p> +<p>A 40-digit hexadecimal string is treated as a unique revision +identifier.</p> +<p>A hexadecimal string less than 40 characters long is treated as a +unique revision identifier and is referred to as a short-form +identifier. A short-form identifier is only valid if it is the prefix +of exactly one full-length identifier.</p> +<p>Any other string is treated as a bookmark, tag, or branch name. A +bookmark is a movable pointer to a revision. A tag is a permanent name +associated with a revision. A branch name denotes the tipmost revision +of that branch. Bookmark, tag, and branch names must not contain the ":" +character.</p> +<p>The reserved name "tip" always identifies the most recent revision.</p> +<p>The reserved name "null" indicates the null revision. This is the +revision of an empty repository, and the parent of revision 0.</p> +<p>The reserved name "." indicates the working directory parent. If no +working directory is checked out, it is equivalent to null. If an +uncommitted merge is in progress, "." is the revision of the first +parent.</p> +</div> +<div class="section" id="specifying-revision-sets"> +<span id="revset"></span><span id="revsets"></span><h1><a class="toc-backref" href="#contents">Specifying Revision Sets</a></h1> +<p>Mercurial supports a functional language for selecting a set of +revisions.</p> +<p>The language supports a number of predicates which are joined by infix +operators. Parenthesis can be used for grouping.</p> +<p>Identifiers such as branch names may need quoting with single or +double quotes if they contain characters like <tt class="docutils literal">-</tt> or if they match +one of the predefined predicates.</p> +<p>Special characters can be used in quoted identifiers by escaping them, +e.g., <tt class="docutils literal">\n</tt> is interpreted as a newline. To prevent them from being +interpreted, strings can be prefixed with <tt class="docutils literal">r</tt>, e.g. <tt class="docutils literal"><span class="pre">r'...'</span></tt>.</p> +<p>There is a single prefix operator:</p> +<dl class="docutils"> +<dt><tt class="docutils literal">not x</tt></dt> +<dd>Changesets not in x. Short form is <tt class="docutils literal">! x</tt>.</dd> +</dl> +<p>These are the supported infix operators:</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">x::y</span></tt></dt> +<dd><p class="first">A DAG range, meaning all changesets that are descendants of x and +ancestors of y, including x and y themselves. If the first endpoint +is left out, this is equivalent to <tt class="docutils literal">ancestors(y)</tt>, if the second +is left out it is equivalent to <tt class="docutils literal">descendants(x)</tt>.</p> +<p class="last">An alternative syntax is <tt class="docutils literal"><span class="pre">x..y</span></tt>.</p> +</dd> +<dt><tt class="docutils literal">x:y</tt></dt> +<dd>All changesets with revision numbers between x and y, both +inclusive. Either endpoint can be left out, they default to 0 and +tip.</dd> +<dt><tt class="docutils literal">x and y</tt></dt> +<dd>The intersection of changesets in x and y. Short form is <tt class="docutils literal">x & y</tt>.</dd> +<dt><tt class="docutils literal">x or y</tt></dt> +<dd>The union of changesets in x and y. There are two alternative short +forms: <tt class="docutils literal">x | y</tt> and <tt class="docutils literal">x + y</tt>.</dd> +<dt><tt class="docutils literal">x - y</tt></dt> +<dd>Changesets in x but not in y.</dd> +<dt><tt class="docutils literal">x^n</tt></dt> +<dd>The nth parent of x, n == 0, 1, or 2. +For n == 0, x; for n == 1, the first parent of each changeset in x; +for n == 2, the second parent of changeset in x.</dd> +<dt><tt class="docutils literal">x~n</tt></dt> +<dd>The nth first ancestor of x; <tt class="docutils literal">x~0</tt> is x; <tt class="docutils literal">x~3</tt> is <tt class="docutils literal"><span class="pre">x^^^</span></tt>.</dd> +</dl> +<p>There is a single postfix operator:</p> +<dl class="docutils"> +<dt><tt class="docutils literal">x^</tt></dt> +<dd>Equivalent to <tt class="docutils literal">x^1</tt>, the first parent of each changeset in x.</dd> +</dl> +<p>The following predicates are supported:</p> +<dl class="docutils"> +<dt><tt class="docutils literal">adds(pattern)</tt></dt> +<dd>Changesets that add a file matching pattern.</dd> +<dt><tt class="docutils literal">all()</tt></dt> +<dd>All changesets, the same as <tt class="docutils literal">0:tip</tt>.</dd> +<dt><tt class="docutils literal">ancestor(single, single)</tt></dt> +<dd>Greatest common ancestor of the two changesets.</dd> +<dt><tt class="docutils literal">ancestors(set)</tt></dt> +<dd>Changesets that are ancestors of a changeset in set.</dd> +<dt><tt class="docutils literal">author(string)</tt></dt> +<dd>Alias for <tt class="docutils literal">user(string)</tt>.</dd> +<dt><tt class="docutils literal">bisect(string)</tt></dt> +<dd><p class="first">Changesets marked in the specified bisect status:</p> +<ul class="last simple"> +<li><tt class="docutils literal">good</tt>, <tt class="docutils literal">bad</tt>, <tt class="docutils literal">skip</tt>: csets explicitly marked as good/bad/skip</li> +<li><tt class="docutils literal">goods</tt>, <tt class="docutils literal">bads</tt> : csets topologicaly good/bad</li> +<li><tt class="docutils literal">range</tt> : csets taking part in the bisection</li> +<li><tt class="docutils literal">pruned</tt> : csets that are goods, bads or skipped</li> +<li><tt class="docutils literal">untested</tt> : csets whose fate is yet unknown</li> +<li><tt class="docutils literal">ignored</tt> : csets ignored due to DAG topology</li> +<li><tt class="docutils literal">current</tt> : the cset currently being bisected</li> +</ul> +</dd> +<dt><tt class="docutils literal"><span class="pre">bookmark([name])</span></tt></dt> +<dd><p class="first">The named bookmark or all bookmarks.</p> +<p class="last">If <cite>name</cite> starts with <cite>re:</cite>, the remainder of the name is treated as +a regular expression. To match a bookmark that actually starts with <cite>re:</cite>, +use the prefix <cite>literal:</cite>.</p> +</dd> +<dt><tt class="docutils literal">branch(string or set)</tt></dt> +<dd><p class="first">All changesets belonging to the given branch or the branches of the given +changesets.</p> +<p class="last">If <cite>string</cite> starts with <cite>re:</cite>, the remainder of the name is treated as +a regular expression. To match a branch that actually starts with <cite>re:</cite>, +use the prefix <cite>literal:</cite>.</p> +</dd> +<dt><tt class="docutils literal">children(set)</tt></dt> +<dd>Child changesets of changesets in set.</dd> +<dt><tt class="docutils literal">closed()</tt></dt> +<dd>Changeset is closed.</dd> +<dt><tt class="docutils literal">contains(pattern)</tt></dt> +<dd>Revision contains a file matching pattern. See <a class="reference external" href="hg.1.html#patterns"><tt class="docutils literal">hg help patterns</tt></a> +for information about file patterns.</dd> +<dt><tt class="docutils literal"><span class="pre">converted([id])</span></tt></dt> +<dd>Changesets converted from the given identifier in the old repository if +present, or all converted changesets if no identifier is specified.</dd> +<dt><tt class="docutils literal">date(interval)</tt></dt> +<dd>Changesets within the interval, see <a class="reference external" href="hg.1.html#dates"><tt class="docutils literal">hg help dates</tt></a>.</dd> +<dt><tt class="docutils literal">desc(string)</tt></dt> +<dd>Search commit message for string. The match is case-insensitive.</dd> +<dt><tt class="docutils literal">descendants(set)</tt></dt> +<dd>Changesets which are descendants of changesets in set.</dd> +<dt><tt class="docutils literal"><span class="pre">destination([set])</span></tt></dt> +<dd>Changesets that were created by a graft, transplant or rebase operation, +with the given revisions specified as the source. Omitting the optional set +is the same as passing all().</dd> +<dt><tt class="docutils literal">draft()</tt></dt> +<dd>Changeset in draft phase.</dd> +<dt><tt class="docutils literal">extinct()</tt></dt> +<dd>Obsolete changesets with obsolete descendants only.</dd> +<dt><tt class="docutils literal">extra(label, [value])</tt></dt> +<dd><p class="first">Changesets with the given label in the extra metadata, with the given +optional value.</p> +<p class="last">If <cite>value</cite> starts with <cite>re:</cite>, the remainder of the value is treated as +a regular expression. To match a value that actually starts with <cite>re:</cite>, +use the prefix <cite>literal:</cite>.</p> +</dd> +<dt><tt class="docutils literal">file(pattern)</tt></dt> +<dd><p class="first">Changesets affecting files matched by pattern.</p> +<p class="last">For a faster but less accurate result, consider using <tt class="docutils literal">filelog()</tt> +instead.</p> +</dd> +<dt><tt class="docutils literal">filelog(pattern)</tt></dt> +<dd><p class="first">Changesets connected to the specified filelog.</p> +<p class="last">For performance reasons, <tt class="docutils literal">filelog()</tt> does not show every changeset +that affects the requested file(s). See <a class="reference external" href="hg.1.html#log"><tt class="docutils literal">hg help log</tt></a> for details. For +a slower, more accurate result, use <tt class="docutils literal">file()</tt>.</p> +</dd> +<dt><tt class="docutils literal">first(set, [n])</tt></dt> +<dd>An alias for limit().</dd> +<dt><tt class="docutils literal"><span class="pre">follow([file])</span></tt></dt> +<dd>An alias for <tt class="docutils literal">::.</tt> (ancestors of the working copy's first parent). +If a filename is specified, the history of the given file is followed, +including copies.</dd> +<dt><tt class="docutils literal">grep(regex)</tt></dt> +<dd>Like <tt class="docutils literal">keyword(string)</tt> but accepts a regex. Use <tt class="docutils literal"><span class="pre">grep(r'...')</span></tt> +to ensure special escape characters are handled correctly. Unlike +<tt class="docutils literal">keyword(string)</tt>, the match is case-sensitive.</dd> +<dt><tt class="docutils literal">head()</tt></dt> +<dd>Changeset is a named branch head.</dd> +<dt><tt class="docutils literal">heads(set)</tt></dt> +<dd>Members of set with no children in set.</dd> +<dt><tt class="docutils literal">id(string)</tt></dt> +<dd>Revision non-ambiguously specified by the given hex string prefix.</dd> +<dt><tt class="docutils literal">keyword(string)</tt></dt> +<dd>Search commit message, user name, and names of changed files for +string. The match is case-insensitive.</dd> +<dt><tt class="docutils literal">last(set, [n])</tt></dt> +<dd>Last n members of set, defaulting to 1.</dd> +<dt><tt class="docutils literal">limit(set, [n])</tt></dt> +<dd>First n members of set, defaulting to 1.</dd> +<dt><tt class="docutils literal">matching(revision [, field])</tt></dt> +<dd><p class="first">Changesets in which a given set of fields match the set of fields in the +selected revision or set.</p> +<p>To match more than one field pass the list of fields to match separated +by spaces (e.g. <tt class="docutils literal">author description</tt>).</p> +<p>Valid fields are most regular revision fields and some special fields.</p> +<p>Regular revision fields are <tt class="docutils literal">description</tt>, <tt class="docutils literal">author</tt>, <tt class="docutils literal">branch</tt>, +<tt class="docutils literal">date</tt>, <tt class="docutils literal">files</tt>, <tt class="docutils literal">phase</tt>, <tt class="docutils literal">parents</tt>, <tt class="docutils literal">substate</tt>, <tt class="docutils literal">user</tt> +and <tt class="docutils literal">diff</tt>. +Note that <tt class="docutils literal">author</tt> and <tt class="docutils literal">user</tt> are synonyms. <tt class="docutils literal">diff</tt> refers to the +contents of the revision. Two revisions matching their <tt class="docutils literal">diff</tt> will +also match their <tt class="docutils literal">files</tt>.</p> +<p>Special fields are <tt class="docutils literal">summary</tt> and <tt class="docutils literal">metadata</tt>: +<tt class="docutils literal">summary</tt> matches the first line of the description. +<tt class="docutils literal">metadata</tt> is equivalent to matching <tt class="docutils literal">description user date</tt> +(i.e. it matches the main metadata fields).</p> +<p class="last"><tt class="docutils literal">metadata</tt> is the default field which is used when no fields are +specified. You can match more than one field at a time.</p> +</dd> +<dt><tt class="docutils literal">max(set)</tt></dt> +<dd>Changeset with highest revision number in set.</dd> +<dt><tt class="docutils literal">merge()</tt></dt> +<dd>Changeset is a merge changeset.</dd> +<dt><tt class="docutils literal">min(set)</tt></dt> +<dd>Changeset with lowest revision number in set.</dd> +<dt><tt class="docutils literal">modifies(pattern)</tt></dt> +<dd>Changesets modifying files matched by pattern.</dd> +<dt><tt class="docutils literal">obsolete()</tt></dt> +<dd>Mutable changeset with a newer version.</dd> +<dt><tt class="docutils literal"><span class="pre">origin([set])</span></tt></dt> +<dd>Changesets that were specified as a source for the grafts, transplants or +rebases that created the given revisions. Omitting the optional set is the +same as passing all(). If a changeset created by these operations is itself +specified as a source for one of these operations, only the source changeset +for the first operation is selected.</dd> +<dt><tt class="docutils literal"><span class="pre">outgoing([path])</span></tt></dt> +<dd>Changesets not found in the specified destination repository, or the +default push location.</dd> +<dt><tt class="docutils literal"><span class="pre">p1([set])</span></tt></dt> +<dd>First parent of changesets in set, or the working directory.</dd> +<dt><tt class="docutils literal"><span class="pre">p2([set])</span></tt></dt> +<dd>Second parent of changesets in set, or the working directory.</dd> +<dt><tt class="docutils literal"><span class="pre">parents([set])</span></tt></dt> +<dd>The set of all parents for all changesets in set, or the working directory.</dd> +<dt><tt class="docutils literal">present(set)</tt></dt> +<dd><p class="first">An empty set, if any revision in set isn't found; otherwise, +all revisions in set.</p> +<p class="last">If any of specified revisions is not present in the local repository, +the query is normally aborted. But this predicate allows the query +to continue even in such cases.</p> +</dd> +<dt><tt class="docutils literal">public()</tt></dt> +<dd>Changeset in public phase.</dd> +<dt><tt class="docutils literal"><span class="pre">remote([id</span> <span class="pre">[,path]])</span></tt></dt> +<dd>Local revision that corresponds to the given identifier in a +remote repository, if present. Here, the '.' identifier is a +synonym for the current local branch.</dd> +<dt><tt class="docutils literal">removes(pattern)</tt></dt> +<dd>Changesets which remove files matching pattern.</dd> +<dt><tt class="docutils literal">rev(number)</tt></dt> +<dd>Revision with the given numeric identifier.</dd> +<dt><tt class="docutils literal">reverse(set)</tt></dt> +<dd>Reverse order of set.</dd> +<dt><tt class="docutils literal">roots(set)</tt></dt> +<dd>Changesets in set with no parent changeset in set.</dd> +<dt><tt class="docutils literal">secret()</tt></dt> +<dd>Changeset in secret phase.</dd> +<dt><tt class="docutils literal">sort(set[, <span class="pre">[-]key...])</span></tt></dt> +<dd><p class="first">Sort set by keys. The default sort order is ascending, specify a key +as <tt class="docutils literal"><span class="pre">-key</span></tt> to sort in descending order.</p> +<p>The keys can be:</p> +<ul class="last simple"> +<li><tt class="docutils literal">rev</tt> for the revision number,</li> +<li><tt class="docutils literal">branch</tt> for the branch name,</li> +<li><tt class="docutils literal">desc</tt> for the commit message (description),</li> +<li><tt class="docutils literal">user</tt> for user name (<tt class="docutils literal">author</tt> can be used as an alias),</li> +<li><tt class="docutils literal">date</tt> for the commit date</li> +</ul> +</dd> +<dt><tt class="docutils literal"><span class="pre">tag([name])</span></tt></dt> +<dd>The specified tag by name, or all tagged revisions if no name is given.</dd> +<dt><tt class="docutils literal">unstable()</tt></dt> +<dd>Non-obsolete changesets with obsolete ancestors.</dd> +<dt><tt class="docutils literal">user(string)</tt></dt> +<dd><p class="first">User name contains string. The match is case-insensitive.</p> +<p class="last">If <cite>string</cite> starts with <cite>re:</cite>, the remainder of the string is treated as +a regular expression. To match a user that actually contains <cite>re:</cite>, use +the prefix <cite>literal:</cite>.</p> +</dd> +</dl> +<p>New predicates (known as "aliases") can be defined, using any combination of +existing predicates or other aliases. An alias definition looks like:</p> +<pre class="literal-block"> +<alias> = <definition> +</pre> +<p>in the <tt class="docutils literal">revsetalias</tt> section of a Mercurial configuration file. Arguments +of the form <cite>$1</cite>, <cite>$2</cite>, etc. are substituted from the alias into the +definition.</p> +<p>For example,</p> +<pre class="literal-block"> +[revsetalias] +h = heads() +d($1) = sort($1, date) +rs($1, $2) = reverse(sort($1, $2)) +</pre> +<p>defines three aliases, <tt class="docutils literal">h</tt>, <tt class="docutils literal">d</tt>, and <tt class="docutils literal">rs</tt>. <tt class="docutils literal">rs(0:tip, author)</tt> is +exactly equivalent to <tt class="docutils literal">reverse(sort(0:tip, author))</tt>.</p> +<p>Command line equivalents for <a class="reference external" href="hg.1.html#log"><tt class="docutils literal">hg log</tt></a>:</p> +<pre class="literal-block"> +-f -> ::. +-d x -> date(x) +-k x -> keyword(x) +-m -> merge() +-u x -> user(x) +-b x -> branch(x) +-P x -> !::x +-l x -> limit(expr, x) +</pre> +<p>Some sample queries:</p> +<ul> +<li><p class="first">Changesets on the default branch:</p> +<pre class="literal-block"> +hg log -r "branch(default)" +</pre> +</li> +<li><p class="first">Changesets on the default branch since tag 1.5 (excluding merges):</p> +<pre class="literal-block"> +hg log -r "branch(default) and 1.5:: and not merge()" +</pre> +</li> +<li><p class="first">Open branch heads:</p> +<pre class="literal-block"> +hg log -r "head() and not closed()" +</pre> +</li> +<li><p class="first">Changesets between tags 1.3 and 1.5 mentioning "bug" that affect +<tt class="docutils literal">hgext/*</tt>:</p> +<pre class="literal-block"> +hg log -r "1.3::1.5 and keyword(bug) and file('hgext/*')" +</pre> +</li> +<li><p class="first">Changesets committed in May 2008, sorted by user:</p> +<pre class="literal-block"> +hg log -r "sort(date('May 2008'), user)" +</pre> +</li> +<li><p class="first">Changesets mentioning "bug" or "issue" that are not in a tagged +release:</p> +<pre class="literal-block"> +hg log -r "(keyword(bug) or keyword(issue)) and not ancestors(tagged())" +</pre> +</li> +</ul> +</div> +<div class="section" id="subrepositories"> +<span id="subrepo"></span><span id="subrepos"></span><h1><a class="toc-backref" href="#contents">Subrepositories</a></h1> +<p>Subrepositories let you nest external repositories or projects into a +parent Mercurial repository, and make commands operate on them as a +group.</p> +<p>Mercurial currently supports Mercurial, Git, and Subversion +subrepositories.</p> +<p>Subrepositories are made of three components:</p> +<ol class="arabic"> +<li><p class="first">Nested repository checkouts. They can appear anywhere in the +parent working directory.</p> +</li> +<li><p class="first">Nested repository references. They are defined in <tt class="docutils literal">.hgsub</tt>, which +should be placed in the root of working directory, and +tell where the subrepository checkouts come from. Mercurial +subrepositories are referenced like:</p> +<blockquote> +<p>path/to/nested = <a class="reference external" href="https://example.com/nested/repo/path">https://example.com/nested/repo/path</a></p> +</blockquote> +<p>Git and Subversion subrepos are also supported:</p> +<blockquote> +<p>path/to/nested = [git]git://example.com/nested/repo/path +path/to/nested = [svn]https://example.com/nested/trunk/path</p> +</blockquote> +<p>where <tt class="docutils literal">path/to/nested</tt> is the checkout location relatively to the +parent Mercurial root, and <tt class="docutils literal"><span class="pre">https://example.com/nested/repo/path</span></tt> +is the source repository path. The source can also reference a +filesystem path.</p> +<p>Note that <tt class="docutils literal">.hgsub</tt> does not exist by default in Mercurial +repositories, you have to create and add it to the parent +repository before using subrepositories.</p> +</li> +<li><p class="first">Nested repository states. They are defined in <tt class="docutils literal">.hgsubstate</tt>, which +is placed in the root of working directory, and +capture whatever information is required to restore the +subrepositories to the state they were committed in a parent +repository changeset. Mercurial automatically record the nested +repositories states when committing in the parent repository.</p> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">The <tt class="docutils literal">.hgsubstate</tt> file should not be edited manually.</p> +</div> +</li> +</ol> +<div class="section" id="adding-a-subrepository"> +<h2>Adding a Subrepository</h2> +<p>If <tt class="docutils literal">.hgsub</tt> does not exist, create it and add it to the parent +repository. Clone or checkout the external projects where you want it +to live in the parent repository. Edit <tt class="docutils literal">.hgsub</tt> and add the +subrepository entry as described above. At this point, the +subrepository is tracked and the next commit will record its state in +<tt class="docutils literal">.hgsubstate</tt> and bind it to the committed changeset.</p> +</div> +<div class="section" id="synchronizing-a-subrepository"> +<h2>Synchronizing a Subrepository</h2> +<p>Subrepos do not automatically track the latest changeset of their +sources. Instead, they are updated to the changeset that corresponds +with the changeset checked out in the top-level changeset. This is so +developers always get a consistent set of compatible code and +libraries when they update.</p> +<p>Thus, updating subrepos is a manual process. Simply check out target +subrepo at the desired revision, test in the top-level repo, then +commit in the parent repository to record the new combination.</p> +</div> +<div class="section" id="deleting-a-subrepository"> +<h2>Deleting a Subrepository</h2> +<p>To remove a subrepository from the parent repository, delete its +reference from <tt class="docutils literal">.hgsub</tt>, then remove its files.</p> +</div> +<div class="section" id="interaction-with-mercurial-commands"> +<h2>Interaction with Mercurial Commands</h2> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">add:</th><td class="field-body">add does not recurse in subrepos unless -S/--subrepos is +specified. However, if you specify the full path of a file in a +subrepo, it will be added even without -S/--subrepos specified. +Git and Subversion subrepositories are currently silently +ignored.</td> +</tr> +<tr class="field"><th class="field-name">archive:</th><td class="field-body">archive does not recurse in subrepositories unless +-S/--subrepos is specified.</td> +</tr> +<tr class="field"><th class="field-name">commit:</th><td class="field-body">commit creates a consistent snapshot of the state of the +entire project and its subrepositories. If any subrepositories +have been modified, Mercurial will abort. Mercurial can be made +to instead commit all modified subrepositories by specifying +-S/--subrepos, or setting "ui.commitsubrepos=True" in a +configuration file (see <a class="reference external" href="hg.1.html#config"><tt class="docutils literal">hg help config</tt></a>). After there are no +longer any modified subrepositories, it records their state and +finally commits it in the parent repository.</td> +</tr> +<tr class="field"><th class="field-name">diff:</th><td class="field-body">diff does not recurse in subrepos unless -S/--subrepos is +specified. Changes are displayed as usual, on the subrepositories +elements. Git and Subversion subrepositories are currently +silently ignored.</td> +</tr> +<tr class="field"><th class="field-name">forget:</th><td class="field-body">forget currently only handles exact file matches in subrepos. +Git and Subversion subrepositories are currently silently ignored.</td> +</tr> +<tr class="field"><th class="field-name">incoming:</th><td class="field-body">incoming does not recurse in subrepos unless -S/--subrepos +is specified. Git and Subversion subrepositories are currently +silently ignored.</td> +</tr> +<tr class="field"><th class="field-name">outgoing:</th><td class="field-body">outgoing does not recurse in subrepos unless -S/--subrepos +is specified. Git and Subversion subrepositories are currently +silently ignored.</td> +</tr> +<tr class="field"><th class="field-name">pull:</th><td class="field-body">pull is not recursive since it is not clear what to pull prior +to running <a class="reference external" href="hg.1.html#update"><tt class="docutils literal">hg update</tt></a>. Listing and retrieving all +subrepositories changes referenced by the parent repository pulled +changesets is expensive at best, impossible in the Subversion +case.</td> +</tr> +<tr class="field"><th class="field-name">push:</th><td class="field-body">Mercurial will automatically push all subrepositories first +when the parent repository is being pushed. This ensures new +subrepository changes are available when referenced by top-level +repositories. Push is a no-op for Subversion subrepositories.</td> +</tr> +<tr class="field"><th class="field-name">status:</th><td class="field-body">status does not recurse into subrepositories unless +-S/--subrepos is specified. Subrepository changes are displayed as +regular Mercurial changes on the subrepository +elements. Subversion subrepositories are currently silently +ignored.</td> +</tr> +<tr class="field"><th class="field-name">update:</th><td class="field-body">update restores the subrepos in the state they were +originally committed in target changeset. If the recorded +changeset is not available in the current subrepository, Mercurial +will pull it in first before updating. This means that updating +can require network access when using subrepositories.</td> +</tr> +</tbody> +</table> +</div> +<div class="section" id="remapping-subrepositories-sources"> +<h2>Remapping Subrepositories Sources</h2> +<p>A subrepository source location may change during a project life, +invalidating references stored in the parent repository history. To +fix this, rewriting rules can be defined in parent repository <tt class="docutils literal">hgrc</tt> +file or in Mercurial configuration. See the <tt class="docutils literal">[subpaths]</tt> section in +hgrc(5) for more details.</p> +</div> +</div> +<div class="section" id="template-usage"> +<span id="style"></span><span id="template"></span><span id="templates"></span><span id="templating"></span><h1><a class="toc-backref" href="#contents">Template Usage</a></h1> +<p>Mercurial allows you to customize output of commands through +templates. You can either pass in a template from the command +line, via the --template option, or select an existing +template-style (--style).</p> +<p>You can customize output for any "log-like" command: log, +outgoing, incoming, tip, parents, heads and glog.</p> +<p>Four styles are packaged with Mercurial: default (the style used +when no explicit preference is passed), compact, changelog, +and xml. +Usage:</p> +<pre class="literal-block"> +$ hg log -r1 --style changelog +</pre> +<p>A template is a piece of text, with markup to invoke variable +expansion:</p> +<pre class="literal-block"> +$ hg log -r1 --template "{node}\n" +b56ce7b07c52de7d5fd79fb89701ea538af65746 +</pre> +<p>Strings in curly braces are called keywords. The availability of +keywords depends on the exact context of the templater. These +keywords are usually available for templating a log-like command:</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">author:</th><td class="field-body">String. The unmodified author of the changeset.</td> +</tr> +<tr class="field"><th class="field-name">bisect:</th><td class="field-body">String. The changeset bisection status.</td> +</tr> +<tr class="field"><th class="field-name">bookmarks:</th><td class="field-body">List of strings. Any bookmarks associated with the +changeset.</td> +</tr> +<tr class="field"><th class="field-name">branch:</th><td class="field-body">String. The name of the branch on which the changeset was +committed.</td> +</tr> +<tr class="field"><th class="field-name">branches:</th><td class="field-body">List of strings. The name of the branch on which the +changeset was committed. Will be empty if the branch name was +default.</td> +</tr> +<tr class="field"><th class="field-name">children:</th><td class="field-body">List of strings. The children of the changeset.</td> +</tr> +<tr class="field"><th class="field-name">date:</th><td class="field-body">Date information. The date when the changeset was committed.</td> +</tr> +<tr class="field"><th class="field-name">desc:</th><td class="field-body">String. The text of the changeset description.</td> +</tr> +<tr class="field"><th class="field-name">diffstat:</th><td class="field-body">String. Statistics of changes with the following format: +"modified files: +added/-removed lines"</td> +</tr> +<tr class="field"><th class="field-name">file_adds:</th><td class="field-body">List of strings. Files added by this changeset.</td> +</tr> +<tr class="field"><th class="field-name">file_copies:</th><td class="field-body">List of strings. Files copied in this changeset with +their sources.</td> +</tr> +<tr class="field"><th class="field-name" colspan="2">file_copies_switch:</th></tr> +<tr class="field"><td> </td><td class="field-body">List of strings. Like "file_copies" but displayed +only if the --copied switch is set.</td> +</tr> +<tr class="field"><th class="field-name">file_dels:</th><td class="field-body">List of strings. Files removed by this changeset.</td> +</tr> +<tr class="field"><th class="field-name">file_mods:</th><td class="field-body">List of strings. Files modified by this changeset.</td> +</tr> +<tr class="field"><th class="field-name">files:</th><td class="field-body">List of strings. All files modified, added, or removed by this +changeset.</td> +</tr> +<tr class="field"><th class="field-name">latesttag:</th><td class="field-body">String. Most recent global tag in the ancestors of this +changeset.</td> +</tr> +<tr class="field"><th class="field-name" colspan="2">latesttagdistance:</th></tr> +<tr class="field"><td> </td><td class="field-body">Integer. Longest path to the latest tag.</td> +</tr> +<tr class="field"><th class="field-name">node:</th><td class="field-body">String. The changeset identification hash, as a 40 hexadecimal +digit string.</td> +</tr> +<tr class="field"><th class="field-name">parents:</th><td class="field-body">List of strings. The parents of the changeset in "rev:node" +format. If the changeset has only one "natural" parent (the predecessor +revision) nothing is shown.</td> +</tr> +<tr class="field"><th class="field-name">phase:</th><td class="field-body">String. The changeset phase name.</td> +</tr> +<tr class="field"><th class="field-name">phaseidx:</th><td class="field-body">Integer. The changeset phase index.</td> +</tr> +<tr class="field"><th class="field-name">rev:</th><td class="field-body">Integer. The repository-local changeset revision number.</td> +</tr> +<tr class="field"><th class="field-name">tags:</th><td class="field-body">List of strings. Any tags associated with the changeset.</td> +</tr> +</tbody> +</table> +<p>The "date" keyword does not produce human-readable output. If you +want to use a date in your output, you can use a filter to process +it. Filters are functions which return a string based on the input +variable. Be sure to use the stringify filter first when you're +applying a string-input filter to a list-like input variable. +You can also use a chain of filters to get the desired output:</p> +<pre class="literal-block"> +$ hg tip --template "{date|isodate}\n" +2008-08-21 18:22 +0000 +</pre> +<p>List of filters:</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">addbreaks:</th><td class="field-body">Any text. Add an XHTML "<br />" tag before the end of +every line except the last.</td> +</tr> +<tr class="field"><th class="field-name">age:</th><td class="field-body">Date. Returns a human-readable date/time difference between the +given date/time and the current date/time.</td> +</tr> +<tr class="field"><th class="field-name">basename:</th><td class="field-body">Any text. Treats the text as a path, and returns the last +component of the path after splitting by the path separator +(ignoring trailing separators). For example, "foo/bar/baz" becomes +"baz" and "foo/bar//" becomes "bar".</td> +</tr> +<tr class="field"><th class="field-name">date:</th><td class="field-body">Date. Returns a date in a Unix date format, including the +timezone: "Mon Sep 04 15:13:13 2006 0700".</td> +</tr> +<tr class="field"><th class="field-name">domain:</th><td class="field-body">Any text. Finds the first string that looks like an email +address, and extracts just the domain component. Example: <tt class="docutils literal">User +<user@example.com></tt> becomes <tt class="docutils literal">example.com</tt>.</td> +</tr> +<tr class="field"><th class="field-name">email:</th><td class="field-body">Any text. Extracts the first string that looks like an email +address. Example: <tt class="docutils literal">User <user@example.com></tt> becomes +<tt class="docutils literal">user@example.com</tt>.</td> +</tr> +<tr class="field"><th class="field-name">emailuser:</th><td class="field-body">Any text. Returns the user portion of an email address.</td> +</tr> +<tr class="field"><th class="field-name">escape:</th><td class="field-body">Any text. Replaces the special XML/XHTML characters "&", "<" +and ">" with XML entities.</td> +</tr> +<tr class="field"><th class="field-name">fill68:</th><td class="field-body">Any text. Wraps the text to fit in 68 columns.</td> +</tr> +<tr class="field"><th class="field-name">fill76:</th><td class="field-body">Any text. Wraps the text to fit in 76 columns.</td> +</tr> +<tr class="field"><th class="field-name">firstline:</th><td class="field-body">Any text. Returns the first line of text.</td> +</tr> +<tr class="field"><th class="field-name">hex:</th><td class="field-body">Any text. Convert a binary Mercurial node identifier into +its long hexadecimal representation.</td> +</tr> +<tr class="field"><th class="field-name">hgdate:</th><td class="field-body">Date. Returns the date as a pair of numbers: "1157407993 +25200" (Unix timestamp, timezone offset).</td> +</tr> +<tr class="field"><th class="field-name">isodate:</th><td class="field-body">Date. Returns the date in ISO 8601 format: "2009-08-18 13:00 ++0200".</td> +</tr> +<tr class="field"><th class="field-name">isodatesec:</th><td class="field-body">Date. Returns the date in ISO 8601 format, including +seconds: "2009-08-18 13:00:13 +0200". See also the rfc3339date +filter.</td> +</tr> +<tr class="field"><th class="field-name">localdate:</th><td class="field-body">Date. Converts a date to local date.</td> +</tr> +<tr class="field"><th class="field-name">nonempty:</th><td class="field-body">Any text. Returns '(none)' if the string is empty.</td> +</tr> +<tr class="field"><th class="field-name">obfuscate:</th><td class="field-body">Any text. Returns the input text rendered as a sequence of +XML entities.</td> +</tr> +<tr class="field"><th class="field-name">person:</th><td class="field-body">Any text. Returns the name before an email address, +interpreting it as per RFC 5322.</td> +</tr> +<tr class="field"><th class="field-name">rfc3339date:</th><td class="field-body">Date. Returns a date using the Internet date format +specified in RFC 3339: "2009-08-18T13:00:13+02:00".</td> +</tr> +<tr class="field"><th class="field-name">rfc822date:</th><td class="field-body">Date. Returns a date using the same format used in email +headers: "Tue, 18 Aug 2009 13:00:13 +0200".</td> +</tr> +<tr class="field"><th class="field-name">short:</th><td class="field-body">Changeset hash. Returns the short form of a changeset hash, +i.e. a 12 hexadecimal digit string.</td> +</tr> +<tr class="field"><th class="field-name">shortbisect:</th><td class="field-body">Any text. Treats <cite>text</cite> as a bisection status, and +returns a single-character representing the status (G: good, B: bad, +S: skipped, U: untested, I: ignored). Returns single space if <cite>text</cite> +is not a valid bisection status.</td> +</tr> +<tr class="field"><th class="field-name">shortdate:</th><td class="field-body">Date. Returns a date like "2006-09-18".</td> +</tr> +<tr class="field"><th class="field-name">stringify:</th><td class="field-body">Any type. Turns the value into text by converting values into +text and concatenating them.</td> +</tr> +<tr class="field"><th class="field-name">strip:</th><td class="field-body">Any text. Strips all leading and trailing whitespace.</td> +</tr> +<tr class="field"><th class="field-name">stripdir:</th><td class="field-body">Treat the text as path and strip a directory level, if +possible. For example, "foo" and "foo/bar" becomes "foo".</td> +</tr> +<tr class="field"><th class="field-name">tabindent:</th><td class="field-body">Any text. Returns the text, with every line except the +first starting with a tab character.</td> +</tr> +<tr class="field"><th class="field-name">urlescape:</th><td class="field-body">Any text. Escapes all "special" characters. For example, +"foo bar" becomes "foo%20bar".</td> +</tr> +<tr class="field"><th class="field-name">user:</th><td class="field-body">Any text. Returns a short representation of a user name or email +address.</td> +</tr> +</tbody> +</table> +</div> +<div class="section" id="url-paths"> +<span id="urls"></span><h1><a class="toc-backref" href="#contents">URL Paths</a></h1> +<p>Valid URLs are of the form:</p> +<pre class="literal-block"> +local/filesystem/path[#revision] +file://local/filesystem/path[#revision] +http://[user[:pass]@]host[:port]/[path][#revision] +https://[user[:pass]@]host[:port]/[path][#revision] +ssh://[user@]host[:port]/[path][#revision] +</pre> +<p>Paths in the local filesystem can either point to Mercurial +repositories or to bundle files (as created by <a class="reference external" href="hg.1.html#bundle"><tt class="docutils literal">hg bundle</tt></a> or :hg:` +incoming --bundle`). See also <a class="reference external" href="hg.1.html#paths"><tt class="docutils literal">hg help paths</tt></a>.</p> +<p>An optional identifier after # indicates a particular branch, tag, or +changeset to use from the remote repository. See also <a class="reference external" href="hg.1.html#revisions"><tt class="docutils literal">hg help +revisions</tt></a>.</p> +<p>Some features, such as pushing to <a class="reference external" href="http://">http://</a> and <a class="reference external" href="https://">https://</a> URLs are only +possible if the feature is explicitly enabled on the remote Mercurial +server.</p> +<p>Note that the security of HTTPS URLs depends on proper configuration of +web.cacerts.</p> +<p>Some notes about using SSH with Mercurial:</p> +<ul> +<li><p class="first">SSH requires an accessible shell account on the destination machine +and a copy of hg in the remote path or specified with as remotecmd.</p> +</li> +<li><p class="first">path is relative to the remote user's home directory by default. Use +an extra slash at the start of a path to specify an absolute path:</p> +<pre class="literal-block"> +ssh://example.com//tmp/repository +</pre> +</li> +<li><p class="first">Mercurial doesn't use its own compression via SSH; the right thing +to do is to configure it in your ~/.ssh/config, e.g.:</p> +<pre class="literal-block"> +Host *.mylocalnetwork.example.com + Compression no +Host * + Compression yes +</pre> +<p>Alternatively specify "ssh -C" as your ssh command in your +configuration file or with the --ssh command line option.</p> +</li> +</ul> +<p>These URLs can all be stored in your configuration file with path +aliases under the [paths] section like so:</p> +<pre class="literal-block"> +[paths] +alias1 = URL1 +alias2 = URL2 +... +</pre> +<p>You can then use the alias for any command that uses a URL (for +example <a class="reference external" href="hg.1.html#pull"><tt class="docutils literal">hg pull alias1</tt></a> will be treated as <a class="reference external" href="hg.1.html#pull"><tt class="docutils literal">hg pull URL1</tt></a>).</p> +<p>Two path aliases are special because they are used as defaults when +you do not provide the URL to a command:</p> +<dl class="docutils"> +<dt>default:</dt> +<dd>When you create a repository with hg clone, the clone command saves +the location of the source repository as the new repository's +'default' path. This is then used when you omit path from push- and +pull-like commands (including incoming and outgoing).</dd> +<dt>default-push:</dt> +<dd>The push command will look for a path named 'default-push', and +prefer it over 'default' if both are defined.</dd> +</dl> +</div> +<div class="section" id="id5"> +<h1><a class="toc-backref" href="#contents">Extensions</a></h1> +<p>This section contains help for extensions that are distributed together with Mercurial. Help for other extensions is available in the help system.</p> +<div class="contents htmlonly local topic" id="id6"> +<ul class="simple"> +<li><a class="reference internal" href="#acl" id="id68">acl</a></li> +<li><a class="reference internal" href="#bugzilla" id="id69">bugzilla</a></li> +<li><a class="reference internal" href="#children" id="id70">children</a></li> +<li><a class="reference internal" href="#churn" id="id71">churn</a></li> +<li><a class="reference internal" href="#color" id="id72">color</a></li> +<li><a class="reference internal" href="#convert" id="id73">convert</a></li> +<li><a class="reference internal" href="#eol" id="id74">eol</a></li> +<li><a class="reference internal" href="#extdiff" id="id75">extdiff</a></li> +<li><a class="reference internal" href="#factotum" id="id76">factotum</a></li> +<li><a class="reference internal" href="#fetch" id="id77">fetch</a></li> +<li><a class="reference internal" href="#gpg" id="id78">gpg</a></li> +<li><a class="reference internal" href="#graphlog" id="id79">graphlog</a></li> +<li><a class="reference internal" href="#hgcia" id="id80">hgcia</a></li> +<li><a class="reference internal" href="#hgk" id="id81">hgk</a></li> +<li><a class="reference internal" href="#highlight" id="id82">highlight</a></li> +<li><a class="reference internal" href="#histedit" id="id83">histedit</a></li> +<li><a class="reference internal" href="#inotify" id="id84">inotify</a></li> +<li><a class="reference internal" href="#interhg" id="id85">interhg</a></li> +<li><a class="reference internal" href="#keyword" id="id86">keyword</a></li> +<li><a class="reference internal" href="#largefiles" id="id87">largefiles</a></li> +<li><a class="reference internal" href="#mq" id="id88">mq</a></li> +<li><a class="reference internal" href="#notify" id="id89">notify</a></li> +<li><a class="reference internal" href="#pager" id="id90">pager</a></li> +<li><a class="reference internal" href="#patchbomb" id="id91">patchbomb</a></li> +<li><a class="reference internal" href="#progress" id="id92">progress</a></li> +<li><a class="reference internal" href="#purge" id="id93">purge</a></li> +<li><a class="reference internal" href="#rebase" id="id94">rebase</a></li> +<li><a class="reference internal" href="#record" id="id95">record</a></li> +<li><a class="reference internal" href="#relink" id="id96">relink</a></li> +<li><a class="reference internal" href="#schemes" id="id97">schemes</a></li> +<li><a class="reference internal" href="#share" id="id98">share</a></li> +<li><a class="reference internal" href="#transplant" id="id99">transplant</a></li> +<li><a class="reference internal" href="#win32mbcs" id="id100">win32mbcs</a></li> +<li><a class="reference internal" href="#win32text" id="id101">win32text</a></li> +<li><a class="reference internal" href="#zeroconf" id="id102">zeroconf</a></li> +</ul> +</div> +<div class="section" id="acl"> +<h2><a class="toc-backref" href="#id68">acl</a></h2> +<p>hooks for controlling repository access</p> +<p>This hook makes it possible to allow or deny write access to given +branches and paths of a repository when receiving incoming changesets +via pretxnchangegroup and pretxncommit.</p> +<p>The authorization is matched based on the local user name on the +system where the hook runs, and not the committer of the original +changeset (since the latter is merely informative).</p> +<p>The acl hook is best used along with a restricted shell like hgsh, +preventing authenticating users from doing anything other than pushing +or pulling. The hook is not safe to use if users have interactive +shell access, as they can then disable the hook. Nor is it safe if +remote users share an account, because then there is no way to +distinguish them.</p> +<p>The order in which access checks are performed is:</p> +<ol class="arabic simple"> +<li>Deny list for branches (section <tt class="docutils literal">acl.deny.branches</tt>)</li> +<li>Allow list for branches (section <tt class="docutils literal">acl.allow.branches</tt>)</li> +<li>Deny list for paths (section <tt class="docutils literal">acl.deny</tt>)</li> +<li>Allow list for paths (section <tt class="docutils literal">acl.allow</tt>)</li> +</ol> +<p>The allow and deny sections take key-value pairs.</p> +<div class="section" id="branch-based-access-control"> +<h3>Branch-based Access Control</h3> +<p>Use the <tt class="docutils literal">acl.deny.branches</tt> and <tt class="docutils literal">acl.allow.branches</tt> sections to +have branch-based access control. Keys in these sections can be +either:</p> +<ul class="simple"> +<li>a branch name, or</li> +<li>an asterisk, to match any branch;</li> +</ul> +<p>The corresponding values can be either:</p> +<ul class="simple"> +<li>a comma-separated list containing users and groups, or</li> +<li>an asterisk, to match anyone;</li> +</ul> +<p>You can add the "!" prefix to a user or group name to invert the sense +of the match.</p> +</div> +<div class="section" id="path-based-access-control"> +<h3>Path-based Access Control</h3> +<p>Use the <tt class="docutils literal">acl.deny</tt> and <tt class="docutils literal">acl.allow</tt> sections to have path-based +access control. Keys in these sections accept a subtree pattern (with +a glob syntax by default). The corresponding values follow the same +syntax as the other sections above.</p> +</div> +<div class="section" id="groups"> +<h3>Groups</h3> +<p>Group names must be prefixed with an <tt class="docutils literal">@</tt> symbol. Specifying a group +name has the same effect as specifying all the users in that group.</p> +<p>You can define group members in the <tt class="docutils literal">acl.groups</tt> section. +If a group name is not defined there, and Mercurial is running under +a Unix-like system, the list of users will be taken from the OS. +Otherwise, an exception will be raised.</p> +</div> +<div class="section" id="example-configuration"> +<h3>Example Configuration</h3> +<pre class="literal-block"> +[hooks] + +# Use this if you want to check access restrictions at commit time +pretxncommit.acl = python:hgext.acl.hook + +# Use this if you want to check access restrictions for pull, push, +# bundle and serve. +pretxnchangegroup.acl = python:hgext.acl.hook + +[acl] +# Allow or deny access for incoming changes only if their source is +# listed here, let them pass otherwise. Source is "serve" for all +# remote access (http or ssh), "push", "pull" or "bundle" when the +# related commands are run locally. +# Default: serve +sources = serve + +[acl.deny.branches] + +# Everyone is denied to the frozen branch: +frozen-branch = * + +# A bad user is denied on all branches: +* = bad-user + +[acl.allow.branches] + +# A few users are allowed on branch-a: +branch-a = user-1, user-2, user-3 + +# Only one user is allowed on branch-b: +branch-b = user-1 + +# The super user is allowed on any branch: +* = super-user + +# Everyone is allowed on branch-for-tests: +branch-for-tests = * + +[acl.deny] +# This list is checked first. If a match is found, acl.allow is not +# checked. All users are granted access if acl.deny is not present. +# Format for both lists: glob pattern = user, ..., @group, ... + +# To match everyone, use an asterisk for the user: +# my/glob/pattern = * + +# user6 will not have write access to any file: +** = user6 + +# Group "hg-denied" will not have write access to any file: +** = @hg-denied + +# Nobody will be able to change "DONT-TOUCH-THIS.txt", despite +# everyone being able to change all other files. See below. +src/main/resources/DONT-TOUCH-THIS.txt = * + +[acl.allow] +# if acl.allow is not present, all users are allowed by default +# empty acl.allow = no users allowed + +# User "doc_writer" has write access to any file under the "docs" +# folder: +docs/** = doc_writer + +# User "jack" and group "designers" have write access to any file +# under the "images" folder: +images/** = jack, @designers + +# Everyone (except for "user6" and "@hg-denied" - see acl.deny above) +# will have write access to any file under the "resources" folder +# (except for 1 file. See acl.deny): +src/main/resources/** = * + +.hgtags = release_engineer +</pre> +<div class="section" id="examples-using-the-prefix"> +<h4>Examples using the "!" prefix</h4> +<p>Suppose there's a branch that only a given user (or group) should be able to +push to, and you don't want to restrict access to any other branch that may +be created.</p> +<p>The "!" prefix allows you to prevent anyone except a given user or group to +push changesets in a given branch or path.</p> +<p>In the examples below, we will: +1) Deny access to branch "ring" to anyone but user "gollum" +2) Deny access to branch "lake" to anyone but members of the group "hobbit" +3) Deny access to a file to anyone but user "gollum"</p> +<pre class="literal-block"> +[acl.allow.branches] +# Empty + +[acl.deny.branches] + +# 1) only 'gollum' can commit to branch 'ring'; +# 'gollum' and anyone else can still commit to any other branch. +ring = !gollum + +# 2) only members of the group 'hobbit' can commit to branch 'lake'; +# 'hobbit' members and anyone else can still commit to any other branch. +lake = !@hobbit + +# You can also deny access based on file paths: + +[acl.allow] +# Empty + +[acl.deny] +# 3) only 'gollum' can change the file below; +# 'gollum' and anyone else can still change any other file. +/misty/mountains/cave/ring = !gollum +</pre> +</div> +</div> +</div> +<div class="section" id="bugzilla"> +<h2><a class="toc-backref" href="#id69">bugzilla</a></h2> +<p>hooks for integrating with the Bugzilla bug tracker</p> +<p>This hook extension adds comments on bugs in Bugzilla when changesets +that refer to bugs by Bugzilla ID are seen. The comment is formatted using +the Mercurial template mechanism.</p> +<p>The bug references can optionally include an update for Bugzilla of the +hours spent working on the bug. Bugs can also be marked fixed.</p> +<p>Three basic modes of access to Bugzilla are provided:</p> +<ol class="arabic simple"> +<li>Access via the Bugzilla XMLRPC interface. Requires Bugzilla 3.4 or later.</li> +<li>Check data via the Bugzilla XMLRPC interface and submit bug change +via email to Bugzilla email interface. Requires Bugzilla 3.4 or later.</li> +<li>Writing directly to the Bugzilla database. Only Bugzilla installations +using MySQL are supported. Requires Python MySQLdb.</li> +</ol> +<p>Writing directly to the database is susceptible to schema changes, and +relies on a Bugzilla contrib script to send out bug change +notification emails. This script runs as the user running Mercurial, +must be run on the host with the Bugzilla install, and requires +permission to read Bugzilla configuration details and the necessary +MySQL user and password to have full access rights to the Bugzilla +database. For these reasons this access mode is now considered +deprecated, and will not be updated for new Bugzilla versions going +forward. Only adding comments is supported in this access mode.</p> +<p>Access via XMLRPC needs a Bugzilla username and password to be specified +in the configuration. Comments are added under that username. Since the +configuration must be readable by all Mercurial users, it is recommended +that the rights of that user are restricted in Bugzilla to the minimum +necessary to add comments. Marking bugs fixed requires Bugzilla 4.0 and later.</p> +<p>Access via XMLRPC/email uses XMLRPC to query Bugzilla, but sends +email to the Bugzilla email interface to submit comments to bugs. +The From: address in the email is set to the email address of the Mercurial +user, so the comment appears to come from the Mercurial user. In the event +that the Mercurial user email is not recognised by Bugzilla as a Bugzilla +user, the email associated with the Bugzilla username used to log into +Bugzilla is used instead as the source of the comment. Marking bugs fixed +works on all supported Bugzilla versions.</p> +<p>Configuration items common to all access modes:</p> +<dl class="docutils"> +<dt>bugzilla.version</dt> +<dd><p class="first">This access type to use. Values recognised are:</p> +<table class="last docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name"><tt class="docutils literal">xmlrpc</tt>:</th><td class="field-body">Bugzilla XMLRPC interface.</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">xmlrpc+email</tt>:</th><td class="field-body">Bugzilla XMLRPC and email interfaces.</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">3.0</tt>:</th><td class="field-body">MySQL access, Bugzilla 3.0 and later.</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">2.18</tt>:</th><td class="field-body">MySQL access, Bugzilla 2.18 and up to but not +including 3.0.</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">2.16</tt>:</th><td class="field-body">MySQL access, Bugzilla 2.16 and up to but not +including 2.18.</td> +</tr> +</tbody> +</table> +</dd> +<dt>bugzilla.regexp</dt> +<dd>Regular expression to match bug IDs for update in changeset commit message. +It must contain one "()" named group <tt class="docutils literal"><ids></tt> containing the bug +IDs separated by non-digit characters. It may also contain +a named group <tt class="docutils literal"><hours></tt> with a floating-point number giving the +hours worked on the bug. If no named groups are present, the first +"()" group is assumed to contain the bug IDs, and work time is not +updated. The default expression matches <tt class="docutils literal">Bug 1234</tt>, <tt class="docutils literal">Bug no. 1234</tt>, +<tt class="docutils literal">Bug number 1234</tt>, <tt class="docutils literal">Bugs 1234,5678</tt>, <tt class="docutils literal">Bug 1234 and 5678</tt> and +variations thereof, followed by an hours number prefixed by <tt class="docutils literal">h</tt> or +<tt class="docutils literal">hours</tt>, e.g. <tt class="docutils literal">hours 1.5</tt>. Matching is case insensitive.</dd> +<dt>bugzilla.fixregexp</dt> +<dd>Regular expression to match bug IDs for marking fixed in changeset +commit message. This must contain a "()" named group <tt class="docutils literal"><ids>` containing +the bug IDs separated by <span class="pre">non-digit</span> characters. It may also contain +a named group <span class="pre">``<hours></span></tt> with a floating-point number giving the +hours worked on the bug. If no named groups are present, the first +"()" group is assumed to contain the bug IDs, and work time is not +updated. The default expression matches <tt class="docutils literal">Fixes 1234</tt>, <tt class="docutils literal">Fixes bug 1234</tt>, +<tt class="docutils literal">Fixes bugs 1234,5678</tt>, <tt class="docutils literal">Fixes 1234 and 5678</tt> and +variations thereof, followed by an hours number prefixed by <tt class="docutils literal">h</tt> or +<tt class="docutils literal">hours</tt>, e.g. <tt class="docutils literal">hours 1.5</tt>. Matching is case insensitive.</dd> +<dt>bugzilla.fixstatus</dt> +<dd>The status to set a bug to when marking fixed. Default <tt class="docutils literal">RESOLVED</tt>.</dd> +<dt>bugzilla.fixresolution</dt> +<dd>The resolution to set a bug to when marking fixed. Default <tt class="docutils literal">FIXED</tt>.</dd> +<dt>bugzilla.style</dt> +<dd>The style file to use when formatting comments.</dd> +<dt>bugzilla.template</dt> +<dd><p class="first">Template to use when formatting comments. Overrides style if +specified. In addition to the usual Mercurial keywords, the +extension specifies:</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name"><tt class="docutils literal">{bug}</tt>:</th><td class="field-body">The Bugzilla bug ID.</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">{root}</tt>:</th><td class="field-body">The full pathname of the Mercurial repository.</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">{webroot}</tt>:</th><td class="field-body">Stripped pathname of the Mercurial repository.</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">{hgweb}</tt>:</th><td class="field-body">Base URL for browsing Mercurial repositories.</td> +</tr> +</tbody> +</table> +<p class="last">Default <tt class="docutils literal">changeset {node|short} in repo {root} refers to bug +<span class="pre">{bug}.\ndetails:\n\t{desc|tabindent}</span></tt></p> +</dd> +<dt>bugzilla.strip</dt> +<dd>The number of path separator characters to strip from the front of +the Mercurial repository path (<tt class="docutils literal">{root}</tt> in templates) to produce +<tt class="docutils literal">{webroot}</tt>. For example, a repository with <tt class="docutils literal">{root}</tt> +<tt class="docutils literal"><span class="pre">/var/local/my-project</span></tt> with a strip of 2 gives a value for +<tt class="docutils literal">{webroot}</tt> of <tt class="docutils literal"><span class="pre">my-project</span></tt>. Default 0.</dd> +<dt>web.baseurl</dt> +<dd>Base URL for browsing Mercurial repositories. Referenced from +templates as <tt class="docutils literal">{hgweb}</tt>.</dd> +</dl> +<p>Configuration items common to XMLRPC+email and MySQL access modes:</p> +<dl class="docutils"> +<dt>bugzilla.usermap</dt> +<dd><p class="first">Path of file containing Mercurial committer email to Bugzilla user email +mappings. If specified, the file should contain one mapping per +line:</p> +<pre class="literal-block"> +committer = Bugzilla user +</pre> +<p class="last">See also the <tt class="docutils literal">[usermap]</tt> section.</p> +</dd> +</dl> +<p>The <tt class="docutils literal">[usermap]</tt> section is used to specify mappings of Mercurial +committer email to Bugzilla user email. See also <tt class="docutils literal">bugzilla.usermap</tt>. +Contains entries of the form <tt class="docutils literal">committer = Bugzilla user</tt>.</p> +<p>XMLRPC access mode configuration:</p> +<dl class="docutils"> +<dt>bugzilla.bzurl</dt> +<dd>The base URL for the Bugzilla installation. +Default <tt class="docutils literal"><span class="pre">http://localhost/bugzilla</span></tt>.</dd> +<dt>bugzilla.user</dt> +<dd>The username to use to log into Bugzilla via XMLRPC. Default +<tt class="docutils literal">bugs</tt>.</dd> +<dt>bugzilla.password</dt> +<dd>The password for Bugzilla login.</dd> +</dl> +<p>XMLRPC+email access mode uses the XMLRPC access mode configuration items, +and also:</p> +<dl class="docutils"> +<dt>bugzilla.bzemail</dt> +<dd>The Bugzilla email address.</dd> +</dl> +<p>In addition, the Mercurial email settings must be configured. See the +documentation in hgrc(5), sections <tt class="docutils literal">[email]</tt> and <tt class="docutils literal">[smtp]</tt>.</p> +<p>MySQL access mode configuration:</p> +<dl class="docutils"> +<dt>bugzilla.host</dt> +<dd>Hostname of the MySQL server holding the Bugzilla database. +Default <tt class="docutils literal">localhost</tt>.</dd> +<dt>bugzilla.db</dt> +<dd>Name of the Bugzilla database in MySQL. Default <tt class="docutils literal">bugs</tt>.</dd> +<dt>bugzilla.user</dt> +<dd>Username to use to access MySQL server. Default <tt class="docutils literal">bugs</tt>.</dd> +<dt>bugzilla.password</dt> +<dd>Password to use to access MySQL server.</dd> +<dt>bugzilla.timeout</dt> +<dd>Database connection timeout (seconds). Default 5.</dd> +<dt>bugzilla.bzuser</dt> +<dd>Fallback Bugzilla user name to record comments with, if changeset +committer cannot be found as a Bugzilla user.</dd> +<dt>bugzilla.bzdir</dt> +<dd>Bugzilla install directory. Used by default notify. Default +<tt class="docutils literal">/var/www/html/bugzilla</tt>.</dd> +<dt>bugzilla.notify</dt> +<dd>The command to run to get Bugzilla to send bug change notification +emails. Substitutes from a map with 3 keys, <tt class="docutils literal">bzdir</tt>, <tt class="docutils literal">id</tt> (bug +id) and <tt class="docutils literal">user</tt> (committer bugzilla email). Default depends on +version; from 2.18 it is "cd %(bzdir)s && perl -T +contrib/sendbugmail.pl %(id)s %(user)s".</dd> +</dl> +<p>Activating the extension:</p> +<pre class="literal-block"> +[extensions] +bugzilla = + +[hooks] +# run bugzilla hook on every change pulled or pushed in here +incoming.bugzilla = python:hgext.bugzilla.hook +</pre> +<p>Example configurations:</p> +<p>XMLRPC example configuration. This uses the Bugzilla at +<tt class="docutils literal"><span class="pre">http://my-project.org/bugzilla</span></tt>, logging in as user +<tt class="docutils literal"><span class="pre">bugmail@my-project.org</span></tt> with password <tt class="docutils literal">plugh</tt>. It is used with a +collection of Mercurial repositories in <tt class="docutils literal">/var/local/hg/repos/</tt>, +with a web interface at <tt class="docutils literal"><span class="pre">http://my-project.org/hg</span></tt>.</p> +<pre class="literal-block"> +[bugzilla] +bzurl=http://my-project.org/bugzilla +user=bugmail@my-project.org +password=plugh +version=xmlrpc +template=Changeset {node|short} in {root|basename}. + {hgweb}/{webroot}/rev/{node|short}\n + {desc}\n +strip=5 + +[web] +baseurl=http://my-project.org/hg +</pre> +<p>XMLRPC+email example configuration. This uses the Bugzilla at +<tt class="docutils literal"><span class="pre">http://my-project.org/bugzilla</span></tt>, logging in as user +<tt class="docutils literal"><span class="pre">bugmail@my-project.org</span></tt> with password <tt class="docutils literal">plugh</tt>. It is used with a +collection of Mercurial repositories in <tt class="docutils literal">/var/local/hg/repos/</tt>, +with a web interface at <tt class="docutils literal"><span class="pre">http://my-project.org/hg</span></tt>. Bug comments +are sent to the Bugzilla email address +<tt class="docutils literal"><span class="pre">bugzilla@my-project.org</span></tt>.</p> +<pre class="literal-block"> +[bugzilla] +bzurl=http://my-project.org/bugzilla +user=bugmail@my-project.org +password=plugh +version=xmlrpc +bzemail=bugzilla@my-project.org +template=Changeset {node|short} in {root|basename}. + {hgweb}/{webroot}/rev/{node|short}\n + {desc}\n +strip=5 + +[web] +baseurl=http://my-project.org/hg + +[usermap] +user@emaildomain.com=user.name@bugzilladomain.com +</pre> +<p>MySQL example configuration. This has a local Bugzilla 3.2 installation +in <tt class="docutils literal"><span class="pre">/opt/bugzilla-3.2</span></tt>. The MySQL database is on <tt class="docutils literal">localhost</tt>, +the Bugzilla database name is <tt class="docutils literal">bugs</tt> and MySQL is +accessed with MySQL username <tt class="docutils literal">bugs</tt> password <tt class="docutils literal">XYZZY</tt>. It is used +with a collection of Mercurial repositories in <tt class="docutils literal">/var/local/hg/repos/</tt>, +with a web interface at <tt class="docutils literal"><span class="pre">http://my-project.org/hg</span></tt>.</p> +<pre class="literal-block"> +[bugzilla] +host=localhost +password=XYZZY +version=3.0 +bzuser=unknown@domain.com +bzdir=/opt/bugzilla-3.2 +template=Changeset {node|short} in {root|basename}. + {hgweb}/{webroot}/rev/{node|short}\n + {desc}\n +strip=5 + +[web] +baseurl=http://my-project.org/hg + +[usermap] +user@emaildomain.com=user.name@bugzilladomain.com +</pre> +<p>All the above add a comment to the Bugzilla bug record of the form:</p> +<pre class="literal-block"> +Changeset 3b16791d6642 in repository-name. +http://my-project.org/hg/repository-name/rev/3b16791d6642 + +Changeset commit comment. Bug 1234. +</pre> +</div> +<div class="section" id="children"> +<h2><a class="toc-backref" href="#id70">children</a></h2> +<p>command to display child changesets (DEPRECATED)</p> +<p>This extension is deprecated. You should use <a class="reference external" href="hg.1.html#log"><tt class="docutils literal">hg log <span class="pre">-r</span> +"children(REV)"</tt></a> instead.</p> +<div class="section" id="id7"> +<h3>Commands</h3> +<div class="section" id="id8"> +<h4>children</h4> +<pre class="literal-block"> +hg children [-r REV] [FILE] +</pre> +<p>Print the children of the working directory's revisions. If a +revision is given via -r/--rev, the children of that revision will +be printed. If a file argument is given, revision in which the +file was last changed (after the working directory revision or the +argument to --rev if given) is printed.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>show children of the specified revision</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--style</span></kbd></td> +<td>display using template map file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--template</span></kbd></td> +<td>display with template</td></tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="section" id="churn"> +<h2><a class="toc-backref" href="#id71">churn</a></h2> +<p>command to display statistics about repository history</p> +<div class="section" id="id9"> +<h3>Commands</h3> +<div class="section" id="id10"> +<h4>churn</h4> +<pre class="literal-block"> +hg churn [-d DATE] [-r REV] [--aliases FILE] [FILE] +</pre> +<p>This command will display a histogram representing the number +of changed lines or revisions, grouped according to the given +template. The default template will group changes by author. +The --dateformat option may be used to group the results by +date instead.</p> +<p>Statistics are based on the number of changed lines, or +alternatively the number of matching revisions if the +--changesets option is specified.</p> +<p>Examples:</p> +<pre class="literal-block"> +# display count of changed lines for every committer +hg churn -t '{author|email}' + +# display daily activity graph +hg churn -f '%H' -s -c + +# display activity of developers by month +hg churn -f '%Y-%m' -s -c + +# display count of lines changed in every year +hg churn -f '%Y' -s +</pre> +<p>It is possible to map alternate email addresses to a main address +by providing a file using the following format:</p> +<pre class="literal-block"> +<alias email> = <actual email> +</pre> +<p>Such a file may be specified with the --aliases option, otherwise +a .hgchurn file will be looked for in the working directory root.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>count rate for the specified revision or range</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>count rate for revisions matching date spec</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-t</span>, <span class="option">--template</span></kbd></td> +<td>template to group changesets (default: {author|email})</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-f</span>, <span class="option">--dateformat</span></kbd></td> +</tr> +<tr><td> </td><td>strftime-compatible format for grouping by date</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-c</span>, <span class="option">--changesets</span></kbd></td> +</tr> +<tr><td> </td><td>count rate by number of changesets</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-s</span>, <span class="option">--sort</span></kbd></td> +<td>sort by key (default: sort by count)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--diffstat</span></kbd></td> +<td>display added/removed lines separately</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--aliases</span></kbd></td> +<td>file with email aliases</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="section" id="color"> +<h2><a class="toc-backref" href="#id72">color</a></h2> +<p>colorize output from some commands</p> +<p>This extension modifies the status and resolve commands to add color +to their output to reflect file status, the qseries command to add +color to reflect patch status (applied, unapplied, missing), and to +diff-related commands to highlight additions, removals, diff headers, +and trailing whitespace.</p> +<p>Other effects in addition to color, like bold and underlined text, are +also available. By default, the terminfo database is used to find the +terminal codes used to change color and effect. If terminfo is not +available, then effects are rendered with the ECMA-48 SGR control +function (aka ANSI escape codes).</p> +<p>Default effects may be overridden from your configuration file:</p> +<pre class="literal-block"> +[color] +status.modified = blue bold underline red_background +status.added = green bold +status.removed = red bold blue_background +status.deleted = cyan bold underline +status.unknown = magenta bold underline +status.ignored = black bold + +# 'none' turns off all effects +status.clean = none +status.copied = none + +qseries.applied = blue bold underline +qseries.unapplied = black bold +qseries.missing = red bold + +diff.diffline = bold +diff.extended = cyan bold +diff.file_a = red bold +diff.file_b = green bold +diff.hunk = magenta +diff.deleted = red +diff.inserted = green +diff.changed = white +diff.trailingwhitespace = bold red_background + +resolve.unresolved = red bold +resolve.resolved = green bold + +bookmarks.current = green + +branches.active = none +branches.closed = black bold +branches.current = green +branches.inactive = none + +tags.normal = green +tags.local = black bold +</pre> +<p>The available effects in terminfo mode are 'blink', 'bold', 'dim', +'inverse', 'invisible', 'italic', 'standout', and 'underline'; in +ECMA-48 mode, the options are 'bold', 'inverse', 'italic', and +'underline'. How each is rendered depends on the terminal emulator. +Some may not be available for a given terminal type, and will be +silently ignored.</p> +<p>Note that on some systems, terminfo mode may cause problems when using +color with the pager extension and less -R. less with the -R option +will only display ECMA-48 color codes, and terminfo mode may sometimes +emit codes that less doesn't understand. You can work around this by +either using ansi mode (or auto mode), or by using less -r (which will +pass through all terminal control codes, not just color control +codes).</p> +<p>Because there are only eight standard colors, this module allows you +to define color names for other color slots which might be available +for your terminal type, assuming terminfo mode. For instance:</p> +<pre class="literal-block"> +color.brightblue = 12 +color.pink = 207 +color.orange = 202 +</pre> +<p>to set 'brightblue' to color slot 12 (useful for 16 color terminals +that have brighter colors defined in the upper eight) and, 'pink' and +'orange' to colors in 256-color xterm's default color cube. These +defined colors may then be used as any of the pre-defined eight, +including appending '_background' to set the background to that color.</p> +<p>By default, the color extension will use ANSI mode (or win32 mode on +Windows) if it detects a terminal. To override auto mode (to enable +terminfo mode, for example), set the following configuration option:</p> +<pre class="literal-block"> +[color] +mode = terminfo +</pre> +<p>Any value other than 'ansi', 'win32', 'terminfo', or 'auto' will +disable color.</p> +</div> +<div class="section" id="convert"> +<h2><a class="toc-backref" href="#id73">convert</a></h2> +<p>import revisions from foreign VCS repositories into Mercurial</p> +<div class="section" id="id11"> +<h3>Commands</h3> +<div class="section" id="id12"> +<h4>convert</h4> +<pre class="literal-block"> +hg convert [OPTION]... SOURCE [DEST [REVMAP]] +</pre> +<p>Accepted source formats [identifiers]:</p> +<ul class="simple"> +<li>Mercurial [hg]</li> +<li>CVS [cvs]</li> +<li>Darcs [darcs]</li> +<li>git [git]</li> +<li>Subversion [svn]</li> +<li>Monotone [mtn]</li> +<li>GNU Arch [gnuarch]</li> +<li>Bazaar [bzr]</li> +<li>Perforce [p4]</li> +</ul> +<p>Accepted destination formats [identifiers]:</p> +<ul class="simple"> +<li>Mercurial [hg]</li> +<li>Subversion [svn] (history on branches is not preserved)</li> +</ul> +<p>If no revision is given, all revisions will be converted. +Otherwise, convert will only import up to the named revision +(given in a format understood by the source).</p> +<p>If no destination directory name is specified, it defaults to the +basename of the source with <tt class="docutils literal"><span class="pre">-hg</span></tt> appended. If the destination +repository doesn't exist, it will be created.</p> +<p>By default, all sources except Mercurial will use --branchsort. +Mercurial uses --sourcesort to preserve original revision numbers +order. Sort modes have the following effects:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">--branchsort</span></kbd></td> +<td>convert from parent to child revision when possible, +which means branches are usually converted one after +the other. It generates more compact repositories.</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--datesort</span></kbd></td> +<td>sort revisions by date. Converted repositories have +good-looking changelogs but are often an order of +magnitude larger than the same ones generated by +--branchsort.</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--sourcesort</span></kbd></td> +<td>try to preserve source revisions order, only +supported by Mercurial sources.</td></tr> +</tbody> +</table> +<p>If <tt class="docutils literal">REVMAP</tt> isn't given, it will be put in a default location +(<tt class="docutils literal"><span class="pre"><dest>/.hg/shamap</span></tt> by default). The <tt class="docutils literal">REVMAP</tt> is a simple +text file that maps each source commit ID to the destination ID +for that revision, like so:</p> +<pre class="literal-block"> +<source ID> <destination ID> +</pre> +<p>If the file doesn't exist, it's automatically created. It's +updated on each commit copied, so <a class="reference external" href="hg.1.html#convert"><tt class="docutils literal">hg convert</tt></a> can be interrupted +and can be run repeatedly to copy new commits.</p> +<p>The authormap is a simple text file that maps each source commit +author to a destination commit author. It is handy for source SCMs +that use unix logins to identify authors (eg: CVS). One line per +author mapping and the line format is:</p> +<pre class="literal-block"> +source author = destination author +</pre> +<p>Empty lines and lines starting with a <tt class="docutils literal">#</tt> are ignored.</p> +<p>The filemap is a file that allows filtering and remapping of files +and directories. Each line can contain one of the following +directives:</p> +<pre class="literal-block"> +include path/to/file-or-dir + +exclude path/to/file-or-dir + +rename path/to/source path/to/destination +</pre> +<p>Comment lines start with <tt class="docutils literal">#</tt>. A specified path matches if it +equals the full relative name of a file or one of its parent +directories. The <tt class="docutils literal">include</tt> or <tt class="docutils literal">exclude</tt> directive with the +longest matching path applies, so line order does not matter.</p> +<p>The <tt class="docutils literal">include</tt> directive causes a file, or all files under a +directory, to be included in the destination repository, and the +exclusion of all other files and directories not explicitly +included. The <tt class="docutils literal">exclude</tt> directive causes files or directories to +be omitted. The <tt class="docutils literal">rename</tt> directive renames a file or directory if +it is converted. To rename from a subdirectory into the root of +the repository, use <tt class="docutils literal">.</tt> as the path to rename to.</p> +<p>The splicemap is a file that allows insertion of synthetic +history, letting you specify the parents of a revision. This is +useful if you want to e.g. give a Subversion merge two parents, or +graft two disconnected series of history together. Each entry +contains a key, followed by a space, followed by one or two +comma-separated values:</p> +<pre class="literal-block"> +key parent1, parent2 +</pre> +<p>The key is the revision ID in the source +revision control system whose parents should be modified (same +format as a key in .hg/shamap). The values are the revision IDs +(in either the source or destination revision control system) that +should be used as the new parents for that node. For example, if +you have merged "release-1.0" into "trunk", then you should +specify the revision on "trunk" as the first parent and the one on +the "release-1.0" branch as the second.</p> +<p>The branchmap is a file that allows you to rename a branch when it is +being brought in from whatever external repository. When used in +conjunction with a splicemap, it allows for a powerful combination +to help fix even the most badly mismanaged repositories and turn them +into nicely structured Mercurial repositories. The branchmap contains +lines of the form:</p> +<pre class="literal-block"> +original_branch_name new_branch_name +</pre> +<p>where "original_branch_name" is the name of the branch in the +source repository, and "new_branch_name" is the name of the branch +is the destination repository. No whitespace is allowed in the +branch names. This can be used to (for instance) move code in one +repository from "default" to a named branch.</p> +<div class="section" id="mercurial-source"> +<h5>Mercurial Source</h5> +<p>The Mercurial source recognizes the following configuration +options, which you can set on the command line with <tt class="docutils literal"><span class="pre">--config</span></tt>:</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name" colspan="2">convert.hg.ignoreerrors:</th></tr> +<tr class="field"><td> </td><td class="field-body">ignore integrity errors when reading. +Use it to fix Mercurial repositories with missing revlogs, by +converting from and to Mercurial. Default is False.</td> +</tr> +<tr class="field"><th class="field-name" colspan="2">convert.hg.saverev:</th></tr> +<tr class="field"><td> </td><td class="field-body">store original revision ID in changeset +(forces target IDs to change). It takes a boolean argument and +defaults to False.</td> +</tr> +<tr class="field"><th class="field-name" colspan="2">convert.hg.startrev:</th></tr> +<tr class="field"><td> </td><td class="field-body">convert start revision and its descendants. +It takes a hg revision identifier and defaults to 0.</td> +</tr> +</tbody> +</table> +</div> +<div class="section" id="cvs-source"> +<h5>CVS Source</h5> +<p>CVS source will use a sandbox (i.e. a checked-out copy) from CVS +to indicate the starting point of what will be converted. Direct +access to the repository files is not needed, unless of course the +repository is <tt class="docutils literal">:local:</tt>. The conversion uses the top level +directory in the sandbox to find the CVS repository, and then uses +CVS rlog commands to find files to convert. This means that unless +a filemap is given, all files under the starting directory will be +converted, and that any directory reorganization in the CVS +sandbox is ignored.</p> +<p>The following options can be used with <tt class="docutils literal"><span class="pre">--config</span></tt>:</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name" colspan="2">convert.cvsps.cache:</th></tr> +<tr class="field"><td> </td><td class="field-body">Set to False to disable remote log caching, +for testing and debugging purposes. Default is True.</td> +</tr> +<tr class="field"><th class="field-name" colspan="2">convert.cvsps.fuzz:</th></tr> +<tr class="field"><td> </td><td class="field-body">Specify the maximum time (in seconds) that is +allowed between commits with identical user and log message in +a single changeset. When very large files were checked in as +part of a changeset then the default may not be long enough. +The default is 60.</td> +</tr> +<tr class="field"><th class="field-name" colspan="2">convert.cvsps.mergeto:</th></tr> +<tr class="field"><td> </td><td class="field-body">Specify a regular expression to which +commit log messages are matched. If a match occurs, then the +conversion process will insert a dummy revision merging the +branch on which this log message occurs to the branch +indicated in the regex. Default is <tt class="docutils literal">{{mergetobranch +<span class="pre">([-\w]+)}}</span></tt></td> +</tr> +<tr class="field"><th class="field-name" colspan="2">convert.cvsps.mergefrom:</th></tr> +<tr class="field"><td> </td><td class="field-body">Specify a regular expression to which +commit log messages are matched. If a match occurs, then the +conversion process will add the most recent revision on the +branch indicated in the regex as the second parent of the +changeset. Default is <tt class="docutils literal">{{mergefrombranch <span class="pre">([-\w]+)}}</span></tt></td> +</tr> +<tr class="field"><th class="field-name">hook.cvslog:</th><td class="field-body">Specify a Python function to be called at the end of +gathering the CVS log. The function is passed a list with the +log entries, and can modify the entries in-place, or add or +delete them.</td> +</tr> +<tr class="field"><th class="field-name" colspan="2">hook.cvschangesets:</th></tr> +<tr class="field"><td> </td><td class="field-body">Specify a Python function to be called after +the changesets are calculated from the CVS log. The +function is passed a list with the changeset entries, and can +modify the changesets in-place, or add or delete them.</td> +</tr> +</tbody> +</table> +<p>An additional "debugcvsps" Mercurial command allows the builtin +changeset merging code to be run without doing a conversion. Its +parameters and output are similar to that of cvsps 2.1. Please see +the command help for more details.</p> +</div> +<div class="section" id="subversion-source"> +<h5>Subversion Source</h5> +<p>Subversion source detects classical trunk/branches/tags layouts. +By default, the supplied <tt class="docutils literal"><span class="pre">svn://repo/path/</span></tt> source URL is +converted as a single branch. If <tt class="docutils literal"><span class="pre">svn://repo/path/trunk</span></tt> exists +it replaces the default branch. If <tt class="docutils literal"><span class="pre">svn://repo/path/branches</span></tt> +exists, its subdirectories are listed as possible branches. If +<tt class="docutils literal"><span class="pre">svn://repo/path/tags</span></tt> exists, it is looked for tags referencing +converted branches. Default <tt class="docutils literal">trunk</tt>, <tt class="docutils literal">branches</tt> and <tt class="docutils literal">tags</tt> +values can be overridden with following options. Set them to paths +relative to the source URL, or leave them blank to disable auto +detection.</p> +<p>The following options can be set with <tt class="docutils literal"><span class="pre">--config</span></tt>:</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name" colspan="2">convert.svn.branches:</th></tr> +<tr class="field"><td> </td><td class="field-body">specify the directory containing branches. +The default is <tt class="docutils literal">branches</tt>.</td> +</tr> +<tr class="field"><th class="field-name" colspan="2">convert.svn.tags:</th></tr> +<tr class="field"><td> </td><td class="field-body">specify the directory containing tags. The +default is <tt class="docutils literal">tags</tt>.</td> +</tr> +<tr class="field"><th class="field-name" colspan="2">convert.svn.trunk:</th></tr> +<tr class="field"><td> </td><td class="field-body">specify the name of the trunk branch. The +default is <tt class="docutils literal">trunk</tt>.</td> +</tr> +</tbody> +</table> +<p>Source history can be retrieved starting at a specific revision, +instead of being integrally converted. Only single branch +conversions are supported.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name" colspan="2">convert.svn.startrev:</th></tr> +<tr class="field"><td> </td><td class="field-body">specify start Subversion revision number. +The default is 0.</td> +</tr> +</tbody> +</table> +</div> +<div class="section" id="perforce-source"> +<h5>Perforce Source</h5> +<p>The Perforce (P4) importer can be given a p4 depot path or a +client specification as source. It will convert all files in the +source to a flat Mercurial repository, ignoring labels, branches +and integrations. Note that when a depot path is given you then +usually should specify a target directory, because otherwise the +target may be named <tt class="docutils literal"><span class="pre">...-hg</span></tt>.</p> +<p>It is possible to limit the amount of source history to be +converted by specifying an initial Perforce revision:</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name" colspan="2">convert.p4.startrev:</th></tr> +<tr class="field"><td> </td><td class="field-body">specify initial Perforce revision (a +Perforce changelist number).</td> +</tr> +</tbody> +</table> +</div> +<div class="section" id="mercurial-destination"> +<h5>Mercurial Destination</h5> +<p>The following options are supported:</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name" colspan="2">convert.hg.clonebranches:</th></tr> +<tr class="field"><td> </td><td class="field-body">dispatch source branches in separate +clones. The default is False.</td> +</tr> +<tr class="field"><th class="field-name" colspan="2">convert.hg.tagsbranch:</th></tr> +<tr class="field"><td> </td><td class="field-body">branch name for tag revisions, defaults to +<tt class="docutils literal">default</tt>.</td> +</tr> +<tr class="field"><th class="field-name" colspan="2">convert.hg.usebranchnames:</th></tr> +<tr class="field"><td> </td><td class="field-body">preserve branch names. The default is +True.</td> +</tr> +</tbody> +</table> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">--authors</span></kbd></td> +<td>username mapping filename (DEPRECATED, use --authormap instead)</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-s</span>, <span class="option">--source-type</span></kbd></td> +</tr> +<tr><td> </td><td>source repository type</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-d</span>, <span class="option">--dest-type</span></kbd></td> +</tr> +<tr><td> </td><td>destination repository type</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>import up to target revision REV</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-A</span>, <span class="option">--authormap</span></kbd></td> +</tr> +<tr><td> </td><td>remap usernames using this file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--filemap</span></kbd></td> +<td>remap file names using contents of file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--splicemap</span></kbd></td> +<td>splice synthesized history into place</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--branchmap</span></kbd></td> +<td>change branch names while converting</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--branchsort</span></kbd></td> +<td>try to sort changesets by branches</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--datesort</span></kbd></td> +<td>try to sort changesets by date</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--sourcesort</span></kbd></td> +<td>preserve source changesets order</td></tr> +</tbody> +</table> +</div> +</div> +</div> +</div> +<div class="section" id="eol"> +<h2><a class="toc-backref" href="#id74">eol</a></h2> +<p>automatically manage newlines in repository files</p> +<p>This extension allows you to manage the type of line endings (CRLF or +LF) that are used in the repository and in the local working +directory. That way you can get CRLF line endings on Windows and LF on +Unix/Mac, thereby letting everybody use their OS native line endings.</p> +<p>The extension reads its configuration from a versioned <tt class="docutils literal">.hgeol</tt> +configuration file found in the root of the working copy. The +<tt class="docutils literal">.hgeol</tt> file use the same syntax as all other Mercurial +configuration files. It uses two sections, <tt class="docutils literal">[patterns]</tt> and +<tt class="docutils literal">[repository]</tt>.</p> +<p>The <tt class="docutils literal">[patterns]</tt> section specifies how line endings should be +converted between the working copy and the repository. The format is +specified by a file pattern. The first match is used, so put more +specific patterns first. The available line endings are <tt class="docutils literal">LF</tt>, +<tt class="docutils literal">CRLF</tt>, and <tt class="docutils literal">BIN</tt>.</p> +<p>Files with the declared format of <tt class="docutils literal">CRLF</tt> or <tt class="docutils literal">LF</tt> are always +checked out and stored in the repository in that format and files +declared to be binary (<tt class="docutils literal">BIN</tt>) are left unchanged. Additionally, +<tt class="docutils literal">native</tt> is an alias for checking out in the platform's default line +ending: <tt class="docutils literal">LF</tt> on Unix (including Mac OS X) and <tt class="docutils literal">CRLF</tt> on +Windows. Note that <tt class="docutils literal">BIN</tt> (do nothing to line endings) is Mercurial's +default behaviour; it is only needed if you need to override a later, +more general pattern.</p> +<p>The optional <tt class="docutils literal">[repository]</tt> section specifies the line endings to +use for files stored in the repository. It has a single setting, +<tt class="docutils literal">native</tt>, which determines the storage line endings for files +declared as <tt class="docutils literal">native</tt> in the <tt class="docutils literal">[patterns]</tt> section. It can be set to +<tt class="docutils literal">LF</tt> or <tt class="docutils literal">CRLF</tt>. The default is <tt class="docutils literal">LF</tt>. For example, this means +that on Windows, files configured as <tt class="docutils literal">native</tt> (<tt class="docutils literal">CRLF</tt> by default) +will be converted to <tt class="docutils literal">LF</tt> when stored in the repository. Files +declared as <tt class="docutils literal">LF</tt>, <tt class="docutils literal">CRLF</tt>, or <tt class="docutils literal">BIN</tt> in the <tt class="docutils literal">[patterns]</tt> section +are always stored as-is in the repository.</p> +<p>Example versioned <tt class="docutils literal">.hgeol</tt> file:</p> +<pre class="literal-block"> +[patterns] +**.py = native +**.vcproj = CRLF +**.txt = native +Makefile = LF +**.jpg = BIN + +[repository] +native = LF +</pre> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">The rules will first apply when files are touched in the working +copy, e.g. by updating to null and back to tip to touch all files.</p> +</div> +<p>The extension uses an optional <tt class="docutils literal">[eol]</tt> section read from both the +normal Mercurial configuration files and the <tt class="docutils literal">.hgeol</tt> file, with the +latter overriding the former. You can use that section to control the +overall behavior. There are three settings:</p> +<ul class="simple"> +<li><tt class="docutils literal">eol.native</tt> (default <tt class="docutils literal">os.linesep</tt>) can be set to <tt class="docutils literal">LF</tt> or +<tt class="docutils literal">CRLF</tt> to override the default interpretation of <tt class="docutils literal">native</tt> for +checkout. This can be used with <a class="reference external" href="hg.1.html#archive"><tt class="docutils literal">hg archive</tt></a> on Unix, say, to +generate an archive where files have line endings for Windows.</li> +<li><tt class="docutils literal"><span class="pre">eol.only-consistent</span></tt> (default True) can be set to False to make +the extension convert files with inconsistent EOLs. Inconsistent +means that there is both <tt class="docutils literal">CRLF</tt> and <tt class="docutils literal">LF</tt> present in the file. +Such files are normally not touched under the assumption that they +have mixed EOLs on purpose.</li> +<li><tt class="docutils literal"><span class="pre">eol.fix-trailing-newline</span></tt> (default False) can be set to True to +ensure that converted files end with a EOL character (either <tt class="docutils literal">\n</tt> +or <tt class="docutils literal">\r\n</tt> as per the configured patterns).</li> +</ul> +<p>The extension provides <tt class="docutils literal">cleverencode:</tt> and <tt class="docutils literal">cleverdecode:</tt> filters +like the deprecated win32text extension does. This means that you can +disable win32text and enable eol and your filters will still work. You +only need to these filters until you have prepared a <tt class="docutils literal">.hgeol</tt> file.</p> +<p>The <tt class="docutils literal">win32text.forbid*</tt> hooks provided by the win32text extension +have been unified into a single hook named <tt class="docutils literal">eol.checkheadshook</tt>. The +hook will lookup the expected line endings from the <tt class="docutils literal">.hgeol</tt> file, +which means you must migrate to a <tt class="docutils literal">.hgeol</tt> file first before using +the hook. <tt class="docutils literal">eol.checkheadshook</tt> only checks heads, intermediate +invalid revisions will be pushed. To forbid them completely, use the +<tt class="docutils literal">eol.checkallhook</tt> hook. These hooks are best used as +<tt class="docutils literal">pretxnchangegroup</tt> hooks.</p> +<p>See <a class="reference external" href="hg.1.html#patterns"><tt class="docutils literal">hg help patterns</tt></a> for more information about the glob patterns +used.</p> +</div> +<div class="section" id="extdiff"> +<h2><a class="toc-backref" href="#id75">extdiff</a></h2> +<p>command to allow external programs to compare revisions</p> +<p>The extdiff Mercurial extension allows you to use external programs +to compare revisions, or revision with working directory. The external +diff programs are called with a configurable set of options and two +non-option arguments: paths to directories containing snapshots of +files to compare.</p> +<p>The extdiff extension also allows you to configure new diff commands, so +you do not need to type <a class="reference external" href="hg.1.html#extdiff"><tt class="docutils literal">hg extdiff <span class="pre">-p</span> kdiff3</tt></a> always.</p> +<pre class="literal-block"> +[extdiff] +# add new command that runs GNU diff(1) in 'context diff' mode +cdiff = gdiff -Nprc5 +## or the old way: +#cmd.cdiff = gdiff +#opts.cdiff = -Nprc5 + +# add new command called vdiff, runs kdiff3 +vdiff = kdiff3 + +# add new command called meld, runs meld (no need to name twice) +meld = + +# add new command called vimdiff, runs gvimdiff with DirDiff plugin +# (see http://www.vim.org/scripts/script.php?script_id=102) Non +# English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in +# your .vimrc +vimdiff = gvim -f "+next" \ + "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))" +</pre> +<p>Tool arguments can include variables that are expanded at runtime:</p> +<pre class="literal-block"> +$parent1, $plabel1 - filename, descriptive label of first parent +$child, $clabel - filename, descriptive label of child revision +$parent2, $plabel2 - filename, descriptive label of second parent +$root - repository root +$parent is an alias for $parent1. +</pre> +<p>The extdiff extension will look in your [diff-tools] and [merge-tools] +sections for diff tool arguments, when none are specified in [extdiff].</p> +<pre class="literal-block"> +[extdiff] +kdiff3 = + +[diff-tools] +kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child +</pre> +<p>You can use -I/-X and list of file or directory names like normal +<a class="reference external" href="hg.1.html#diff"><tt class="docutils literal">hg diff</tt></a> command. The extdiff extension makes snapshots of only +needed files, so running the external diff program will actually be +pretty fast (at least faster than having to compare the entire tree).</p> +<div class="section" id="id13"> +<h3>Commands</h3> +<div class="section" id="id14"> +<h4>extdiff</h4> +<pre class="literal-block"> +hg extdiff [OPT]... [FILE]... +</pre> +<p>Show differences between revisions for the specified files, using +an external program. The default program used is diff, with +default options "-Npru".</p> +<p>To select a different program, use the -p/--program option. The +program will be passed the names of two directories to compare. To +pass additional options to the program, use -o/--option. These +will be passed before the names of the directories to compare.</p> +<p>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, the working directory files are compared +to its parent.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-p</span>, <span class="option">--program</span></kbd></td> +<td>comparison program to run</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-o</span>, <span class="option">--option</span></kbd></td> +<td>pass option to comparison program</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>revision</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-c</span>, <span class="option">--change</span></kbd></td> +<td>change made by revision</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="section" id="factotum"> +<h2><a class="toc-backref" href="#id76">factotum</a></h2> +<p>http authentication with factotum</p> +<p>This extension allows the factotum(4) facility on Plan 9 from Bell Labs +platforms to provide authentication information for HTTP access. Configuration +entries specified in the auth section as well as authentication information +provided in the repository URL are fully supported. If no prefix is specified, +a value of "*" will be assumed.</p> +<p>By default, keys are specified as:</p> +<pre class="literal-block"> +proto=pass service=hg prefix=<prefix> user=<username> !password=<password> +</pre> +<p>If the factotum extension is unable to read the required key, one will be +requested interactively.</p> +<p>A configuration section is available to customize runtime behavior. By +default, these entries are:</p> +<pre class="literal-block"> +[factotum] +executable = /bin/auth/factotum +mountpoint = /mnt/factotum +service = hg +</pre> +<p>The executable entry defines the full path to the factotum binary. The +mountpoint entry defines the path to the factotum file service. Lastly, the +service entry controls the service name used when reading keys.</p> +</div> +<div class="section" id="fetch"> +<h2><a class="toc-backref" href="#id77">fetch</a></h2> +<p>pull, update and merge in one command (DEPRECATED)</p> +<div class="section" id="id15"> +<h3>Commands</h3> +<div class="section" id="id16"> +<h4>fetch</h4> +<pre class="literal-block"> +hg fetch [SOURCE] +</pre> +<p>This finds all changes from the repository at the specified path +or URL and adds them to the local repository.</p> +<p>If the pulled changes add a new branch head, the head is +automatically merged, and the result of the merge is committed. +Otherwise, the working directory is updated to include the new +changes.</p> +<p>When a merge is needed, the working directory is first updated to +the newly pulled changes. Local changes are then merged into the +pulled changes. To switch the merge order, use --switch-parent.</p> +<p>See <a class="reference external" href="hg.1.html#dates"><tt class="docutils literal">hg help dates</tt></a> for a list of formats valid for -d/--date.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>a specific revision you would like to pull</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--edit</span></kbd></td> +<td>edit commit message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--force-editor</span></kbd></td> +<td>edit commit message (DEPRECATED)</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">--switch-parent</span></kbd></td> +</tr> +<tr><td> </td><td>switch parents when merging</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--message</span></kbd></td> +<td>use text as commit message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--logfile</span></kbd></td> +<td>read commit message from file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>record the specified date as commit date</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--user</span></kbd></td> +<td>record the specified user as committer</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--ssh</span></kbd></td> +<td>specify ssh command to use</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--remotecmd</span></kbd></td> +<td>specify hg command to run on the remote side</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--insecure</span></kbd></td> +<td>do not verify server certificate (ignoring web.cacerts config)</td></tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="section" id="gpg"> +<h2><a class="toc-backref" href="#id78">gpg</a></h2> +<p>commands to sign and verify changesets</p> +<div class="section" id="id17"> +<h3>Commands</h3> +<div class="section" id="sigcheck"> +<h4>sigcheck</h4> +<pre class="literal-block"> +hg sigcheck REV +</pre> +<p>verify all the signatures there may be for a particular revision</p> +</div> +<div class="section" id="sign"> +<h4>sign</h4> +<pre class="literal-block"> +hg sign [OPTION]... [REV]... +</pre> +<p>If no revision is given, the parent of the working directory is used, +or tip if no revision is checked out.</p> +<p>See <a class="reference external" href="hg.1.html#dates"><tt class="docutils literal">hg help dates</tt></a> for a list of formats valid for -d/--date.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--local</span></kbd></td> +<td>make the signature local</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>sign even if the sigfile is modified</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--no-commit</span></kbd></td> +<td>do not commit the sigfile after signing</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-k</span>, <span class="option">--key</span></kbd></td> +<td>the key id to sign with</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--message</span></kbd></td> +<td>commit message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>record the specified date as commit date</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--user</span></kbd></td> +<td>record the specified user as committer</td></tr> +</tbody> +</table> +</div> +<div class="section" id="sigs"> +<h4>sigs</h4> +<pre class="literal-block"> +hg sigs +</pre> +<p>list signed changesets</p> +</div> +</div> +</div> +<div class="section" id="graphlog"> +<h2><a class="toc-backref" href="#id79">graphlog</a></h2> +<p>command to view revision graphs from a shell</p> +<p>This extension adds a --graph option to the incoming, outgoing and log +commands. When this options is given, an ASCII representation of the +revision graph is also shown.</p> +<div class="section" id="id18"> +<h3>Commands</h3> +<div class="section" id="glog"> +<h4>glog</h4> +<pre class="literal-block"> +hg glog [OPTION]... [FILE] +</pre> +<p>Print a revision history alongside a revision graph drawn with +ASCII characters.</p> +<p>Nodes printed as an @ character are parents of the working +directory.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--follow</span></kbd></td> +<td>follow changeset history, or file history across copies and renames</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--follow-first</span></kbd></td> +<td>only follow the first parent of merge changesets (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>show revisions matching date spec</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-C</span>, <span class="option">--copies</span></kbd></td> +<td>show copied files</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-k</span>, <span class="option">--keyword</span></kbd></td> +<td>do case-insensitive search for a given text</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>show the specified revision or range</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--removed</span></kbd></td> +<td>include revisions where files were removed</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-m</span>, <span class="option">--only-merges</span></kbd></td> +</tr> +<tr><td> </td><td>show only merges (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--user</span></kbd></td> +<td>revisions committed by user</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--only-branch</span></kbd></td> +<td>show only changesets within the given named branch (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-b</span>, <span class="option">--branch</span></kbd></td> +<td>show changesets within the given named branch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-P</span>, <span class="option">--prune</span></kbd></td> +<td>do not display revision or any of its ancestors</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--hidden</span></kbd></td> +<td>show hidden changesets (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-p</span>, <span class="option">--patch</span></kbd></td> +<td>show patch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-g</span>, <span class="option">--git</span></kbd></td> +<td>use git extended diff format</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--limit</span></kbd></td> +<td>limit number of changes displayed</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-M</span>, <span class="option">--no-merges</span></kbd></td> +</tr> +<tr><td> </td><td>do not show merges</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--stat</span></kbd></td> +<td>output diffstat-style summary of changes</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-G</span>, <span class="option">--graph</span></kbd></td> +<td>show the revision DAG</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--style</span></kbd></td> +<td>display using template map file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--template</span></kbd></td> +<td>display with template</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="section" id="hgcia"> +<h2><a class="toc-backref" href="#id80">hgcia</a></h2> +<p>hooks for integrating with the CIA.vc notification service</p> +<p>This is meant to be run as a changegroup or incoming hook. To +configure it, set the following options in your hgrc:</p> +<pre class="literal-block"> +[cia] +# your registered CIA user name +user = foo +# the name of the project in CIA +project = foo +# the module (subproject) (optional) +#module = foo +# Append a diffstat to the log message (optional) +#diffstat = False +# Template to use for log messages (optional) +#template = {desc}\n{baseurl}{webroot}/rev/{node}-- {diffstat} +# Style to use (optional) +#style = foo +# The URL of the CIA notification service (optional) +# You can use mailto: URLs to send by email, eg +# mailto:cia@cia.vc +# Make sure to set email.from if you do this. +#url = http://cia.vc/ +# print message instead of sending it (optional) +#test = False +# number of slashes to strip for url paths +#strip = 0 + +[hooks] +# one of these: +changegroup.cia = python:hgcia.hook +#incoming.cia = python:hgcia.hook + +[web] +# If you want hyperlinks (optional) +baseurl = http://server/path/to/repo +</pre> +</div> +<div class="section" id="hgk"> +<h2><a class="toc-backref" href="#id81">hgk</a></h2> +<p>browse the repository in a graphical way</p> +<p>The hgk extension allows browsing the history of a repository in a +graphical way. It requires Tcl/Tk version 8.4 or later. (Tcl/Tk is not +distributed with Mercurial.)</p> +<p>hgk consists of two parts: a Tcl script that does the displaying and +querying of information, and an extension to Mercurial named hgk.py, +which provides hooks for hgk to get information. hgk can be found in +the contrib directory, and the extension is shipped in the hgext +repository, and needs to be enabled.</p> +<p>The <a class="reference external" href="hg.1.html#view"><tt class="docutils literal">hg view</tt></a> command will launch the hgk Tcl script. For this command +to work, hgk must be in your search path. Alternately, you can specify +the path to hgk in your configuration file:</p> +<pre class="literal-block"> +[hgk] +path=/location/of/hgk +</pre> +<p>hgk can make use of the extdiff extension to visualize revisions. +Assuming you had already configured extdiff vdiff command, just add:</p> +<pre class="literal-block"> +[hgk] +vdiff=vdiff +</pre> +<p>Revisions context menu will now display additional entries to fire +vdiff on hovered and selected revisions.</p> +<div class="section" id="id19"> +<h3>Commands</h3> +<div class="section" id="view"> +<h4>view</h4> +<pre class="literal-block"> +hg view [-l LIMIT] [REVRANGE] +</pre> +<p>start interactive history viewer</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--limit</span></kbd></td> +<td>limit number of changes displayed</td></tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="section" id="highlight"> +<h2><a class="toc-backref" href="#id82">highlight</a></h2> +<p>syntax highlighting for hgweb (requires Pygments)</p> +<p>It depends on the Pygments syntax highlighting library: +<a class="reference external" href="http://pygments.org/">http://pygments.org/</a></p> +<p>There is a single configuration option:</p> +<pre class="literal-block"> +[web] +pygments_style = <style> +</pre> +<p>The default is 'colorful'.</p> +</div> +<div class="section" id="histedit"> +<h2><a class="toc-backref" href="#id83">histedit</a></h2> +<p>interactive history editing</p> +<p>With this extension installed, Mercurial gains one new command: histedit. Usage +is as follows, assuming the following history:</p> +<pre class="literal-block"> +@ 3[tip] 7c2fd3b9020c 2009-04-27 18:04 -0500 durin42 +| Add delta +| +o 2 030b686bedc4 2009-04-27 18:04 -0500 durin42 +| Add gamma +| +o 1 c561b4e977df 2009-04-27 18:04 -0500 durin42 +| Add beta +| +o 0 d8d2fcd0e319 2009-04-27 18:04 -0500 durin42 + Add alpha +</pre> +<p>If you were to run <tt class="docutils literal">hg histedit c561b4e977df</tt>, you would see the following +file open in your editor:</p> +<pre class="literal-block"> +pick c561b4e977df Add beta +pick 030b686bedc4 Add gamma +pick 7c2fd3b9020c Add delta + +# Edit history between 633536316234 and 7c2fd3b9020c +# +# Commands: +# p, pick = use commit +# e, edit = use commit, but stop for amending +# f, fold = use commit, but fold into previous commit +# d, drop = remove commit from history +# m, mess = edit message without changing commit content +# +</pre> +<p>In this file, lines beginning with <tt class="docutils literal">#</tt> are ignored. You must specify a rule +for each revision in your history. For example, if you had meant to add gamma +before beta, and then wanted to add delta in the same revision as beta, you +would reorganize the file to look like this:</p> +<pre class="literal-block"> +pick 030b686bedc4 Add gamma +pick c561b4e977df Add beta +fold 7c2fd3b9020c Add delta + +# Edit history between 633536316234 and 7c2fd3b9020c +# +# Commands: +# p, pick = use commit +# e, edit = use commit, but stop for amending +# f, fold = use commit, but fold into previous commit +# d, drop = remove commit from history +# m, mess = edit message without changing commit content +# +</pre> +<p>At which point you close the editor and <tt class="docutils literal">histedit</tt> starts working. When you +specify a <tt class="docutils literal">fold</tt> operation, <tt class="docutils literal">histedit</tt> will open an editor when it folds +those revisions together, offering you a chance to clean up the commit message:</p> +<pre class="literal-block"> +Add beta +*** +Add delta +</pre> +<p>Edit the commit message to your liking, then close the editor. For +this example, let's assume that the commit message was changed to +<tt class="docutils literal">Add beta and delta.</tt> After histedit has run and had a chance to +remove any old or temporary revisions it needed, the history looks +like this:</p> +<pre class="literal-block"> +@ 2[tip] 989b4d060121 2009-04-27 18:04 -0500 durin42 +| Add beta and delta. +| +o 1 081603921c3f 2009-04-27 18:04 -0500 durin42 +| Add gamma +| +o 0 d8d2fcd0e319 2009-04-27 18:04 -0500 durin42 + Add alpha +</pre> +<p>Note that <tt class="docutils literal">histedit</tt> does <em>not</em> remove any revisions (even its own temporary +ones) until after it has completed all the editing operations, so it will +probably perform several strip operations when it's done. For the above example, +it had to run strip twice. Strip can be slow depending on a variety of factors, +so you might need to be a little patient. You can choose to keep the original +revisions by passing the <tt class="docutils literal"><span class="pre">--keep</span></tt> flag.</p> +<p>The <tt class="docutils literal">edit</tt> operation will drop you back to a command prompt, +allowing you to edit files freely, or even use <tt class="docutils literal">hg record</tt> to commit +some changes as a separate commit. When you're done, any remaining +uncommitted changes will be committed as well. When done, run <tt class="docutils literal">hg +histedit <span class="pre">--continue</span></tt> to finish this step. You'll be prompted for a +new commit message, but the default commit message will be the +original message for the <tt class="docutils literal">edit</tt> ed revision.</p> +<p>The <tt class="docutils literal">message</tt> operation will give you a chance to revise a commit +message without changing the contents. It's a shortcut for doing +<tt class="docutils literal">edit</tt> immediately followed by <cite>hg histedit --continue`</cite>.</p> +<p>If <tt class="docutils literal">histedit</tt> encounters a conflict when moving a revision (while +handling <tt class="docutils literal">pick</tt> or <tt class="docutils literal">fold</tt>), it'll stop in a similar manner to +<tt class="docutils literal">edit</tt> with the difference that it won't prompt you for a commit +message when done. If you decide at this point that you don't like how +much work it will be to rearrange history, or that you made a mistake, +you can use <tt class="docutils literal">hg histedit <span class="pre">--abort</span></tt> to abandon the new changes you +have made and return to the state before you attempted to edit your +history.</p> +<p>If we clone the example repository above and add three more changes, such that +we have the following history:</p> +<pre class="literal-block"> +@ 6[tip] 038383181893 2009-04-27 18:04 -0500 stefan +| Add theta +| +o 5 140988835471 2009-04-27 18:04 -0500 stefan +| Add eta +| +o 4 122930637314 2009-04-27 18:04 -0500 stefan +| Add zeta +| +o 3 836302820282 2009-04-27 18:04 -0500 stefan +| Add epsilon +| +o 2 989b4d060121 2009-04-27 18:04 -0500 durin42 +| Add beta and delta. +| +o 1 081603921c3f 2009-04-27 18:04 -0500 durin42 +| Add gamma +| +o 0 d8d2fcd0e319 2009-04-27 18:04 -0500 durin42 + Add alpha +</pre> +<p>If you run <tt class="docutils literal">hg histedit <span class="pre">--outgoing</span></tt> on the clone then it is the same +as running <tt class="docutils literal">hg histedit 836302820282</tt>. If you need plan to push to a +repository that Mercurial does not detect to be related to the source +repo, you can add a <tt class="docutils literal"><span class="pre">--force</span></tt> option.</p> +<div class="section" id="id20"> +<h3>Commands</h3> +<div class="section" id="id21"> +<h4>histedit</h4> +<pre class="literal-block"> +hg histedit [PARENT] +</pre> +<p>interactively edit changeset history</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">--commands</span></kbd></td> +<td>Read history edits from the specified file.</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-c</span>, <span class="option">--continue</span></kbd></td> +<td>continue an edit already in progress</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-k</span>, <span class="option">--keep</span></kbd></td> +<td>don't strip old nodes after edit is complete</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--abort</span></kbd></td> +<td>abort an edit in progress</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-o</span>, <span class="option">--outgoing</span></kbd></td> +<td>changesets not found in destination</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>force outgoing even for unrelated repositories</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>first revision to be edited</td></tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="section" id="inotify"> +<h2><a class="toc-backref" href="#id84">inotify</a></h2> +<p>accelerate status report using Linux's inotify service</p> +<div class="section" id="id22"> +<h3>Commands</h3> +<div class="section" id="inserve"> +<h4>inserve</h4> +<pre class="literal-block"> +hg inserve [OPTION]... +</pre> +<p>start an inotify server for this repository</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--daemon</span></kbd></td> +<td>run server in background</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">--daemon-pipefds</span></kbd></td> +</tr> +<tr><td> </td><td>used internally by daemon mode</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-t</span>, <span class="option">--idle-timeout</span></kbd></td> +</tr> +<tr><td> </td><td>minutes to sit idle before exiting</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--pid-file</span></kbd></td> +<td>name of file to write process ID to</td></tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="section" id="interhg"> +<h2><a class="toc-backref" href="#id85">interhg</a></h2> +<p>expand expressions into changelog and summaries</p> +<p>This extension allows the use of a special syntax in summaries, which +will be automatically expanded into links or any other arbitrary +expression, much like InterWiki does.</p> +<p>A few example patterns (link to bug tracking, etc.) that may be used +in your hgrc:</p> +<pre class="literal-block"> +[interhg] +issues = s!issue(\d+)!<a href="http://bts/issue\1">issue\1</a>! +bugzilla = s!((?:bug|b=|(?=#?\d{4,}))(?:\s*#?)(\d+))!<a..=\2">\1</a>!i +boldify = s!(^|\s)#(\d+)\b! <b>#\2</b>! +</pre> +</div> +<div class="section" id="keyword"> +<h2><a class="toc-backref" href="#id86">keyword</a></h2> +<p>expand keywords in tracked files</p> +<p>This extension expands RCS/CVS-like or self-customized $Keywords$ in +tracked text files selected by your configuration.</p> +<p>Keywords are only expanded in local repositories and not stored in the +change history. The mechanism can be regarded as a convenience for the +current user or for archive distribution.</p> +<p>Keywords expand to the changeset data pertaining to the latest change +relative to the working directory parent of each file.</p> +<p>Configuration is done in the [keyword], [keywordset] and [keywordmaps] +sections of hgrc files.</p> +<p>Example:</p> +<pre class="literal-block"> +[keyword] +# expand keywords in every python file except those matching "x*" +**.py = +x* = ignore + +[keywordset] +# prefer svn- over cvs-like default keywordmaps +svn = True +</pre> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">The more specific you are in your filename patterns the less you +lose speed in huge repositories.</p> +</div> +<p>For [keywordmaps] template mapping and expansion demonstration and +control run <a class="reference external" href="hg.1.html#kwdemo"><tt class="docutils literal">hg kwdemo</tt></a>. See <a class="reference external" href="hg.1.html#templates"><tt class="docutils literal">hg help templates</tt></a> for a list of +available templates and filters.</p> +<p>Three additional date template filters are provided:</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name"><tt class="docutils literal">utcdate</tt>:</th><td class="field-body">"2006/09/18 15:13:13"</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">svnutcdate</tt>:</th><td class="field-body">"2006-09-18 15:13:13Z"</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">svnisodate</tt>:</th><td class="field-body">"2006-09-18 08:13:13 -700 (Mon, 18 Sep 2006)"</td> +</tr> +</tbody> +</table> +<p>The default template mappings (view with <a class="reference external" href="hg.1.html#kwdemo"><tt class="docutils literal">hg kwdemo <span class="pre">-d</span></tt></a>) can be +replaced with customized keywords and templates. Again, run +<a class="reference external" href="hg.1.html#kwdemo"><tt class="docutils literal">hg kwdemo</tt></a> to control the results of your configuration changes.</p> +<p>Before changing/disabling active keywords, you must run <a class="reference external" href="hg.1.html#kwshrink"><tt class="docutils literal">hg kwshrink</tt></a> +to avoid storing expanded keywords in the change history.</p> +<p>To force expansion after enabling it, or a configuration change, run +<a class="reference external" href="hg.1.html#kwexpand"><tt class="docutils literal">hg kwexpand</tt></a>.</p> +<p>Expansions spanning more than one line and incremental expansions, +like CVS' $Log$, are not supported. A keyword template map "Log = +{desc}" expands to the first line of the changeset description.</p> +<div class="section" id="id23"> +<h3>Commands</h3> +<div class="section" id="kwdemo"> +<h4>kwdemo</h4> +<pre class="literal-block"> +hg kwdemo [-d] [-f RCFILE] [TEMPLATEMAP]... +</pre> +<p>Show current, custom, or default keyword template maps and their +expansions.</p> +<p>Extend the current configuration by specifying maps as arguments +and using -f/--rcfile to source an external hgrc file.</p> +<p>Use -d/--default to disable current configuration.</p> +<p>See <a class="reference external" href="hg.1.html#templates"><tt class="docutils literal">hg help templates</tt></a> for information on templates and filters.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--default</span></kbd></td> +<td>show default keyword template maps</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--rcfile</span></kbd></td> +<td>read maps from rcfile</td></tr> +</tbody> +</table> +</div> +<div class="section" id="kwexpand"> +<h4>kwexpand</h4> +<pre class="literal-block"> +hg kwexpand [OPTION]... [FILE]... +</pre> +<p>Run after (re)enabling keyword expansion.</p> +<p>kwexpand refuses to run if given files contain local changes.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +</tbody> +</table> +</div> +<div class="section" id="kwfiles"> +<h4>kwfiles</h4> +<pre class="literal-block"> +hg kwfiles [OPTION]... [FILE]... +</pre> +<p>List which files in the working directory are matched by the +[keyword] configuration patterns.</p> +<p>Useful to prevent inadvertent keyword expansion and to speed up +execution by including only files that are actual candidates for +expansion.</p> +<p>See <a class="reference external" href="hg.1.html#keyword"><tt class="docutils literal">hg help keyword</tt></a> on how to construct patterns both for +inclusion and exclusion of files.</p> +<p>With -A/--all and -v/--verbose the codes used to show the status +of files are:</p> +<pre class="literal-block"> +K = keyword expansion candidate +k = keyword expansion candidate (not tracked) +I = ignored +i = ignored (not tracked) +</pre> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-A</span>, <span class="option">--all</span></kbd></td> +<td>show keyword status flags of all files</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-i</span>, <span class="option">--ignore</span></kbd></td> +<td>show files excluded from expansion</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--unknown</span></kbd></td> +<td>only show unknown (not tracked) files</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +</tbody> +</table> +</div> +<div class="section" id="kwshrink"> +<h4>kwshrink</h4> +<pre class="literal-block"> +hg kwshrink [OPTION]... [FILE]... +</pre> +<p>Must be run before changing/disabling active keywords.</p> +<p>kwshrink refuses to run if given files contain local changes.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="section" id="largefiles"> +<h2><a class="toc-backref" href="#id87">largefiles</a></h2> +<p>track large binary files</p> +<p>Large binary files tend to be not very compressible, not very +diffable, and not at all mergeable. Such files are not handled +efficiently by Mercurial's storage format (revlog), which is based on +compressed binary deltas; storing large binary files as regular +Mercurial files wastes bandwidth and disk space and increases +Mercurial's memory usage. The largefiles extension addresses these +problems by adding a centralized client-server layer on top of +Mercurial: largefiles live in a <em>central store</em> out on the network +somewhere, and you only fetch the revisions that you need when you +need them.</p> +<p>largefiles works by maintaining a "standin file" in .hglf/ for each +largefile. The standins are small (41 bytes: an SHA-1 hash plus +newline) and are tracked by Mercurial. Largefile revisions are +identified by the SHA-1 hash of their contents, which is written to +the standin. largefiles uses that revision ID to get/put largefile +revisions from/to the central store. This saves both disk space and +bandwidth, since you don't need to retrieve all historical revisions +of large files when you clone or pull.</p> +<p>To start a new repository or add new large binary files, just add +--large to your <a class="reference external" href="hg.1.html#add"><tt class="docutils literal">hg add</tt></a> command. For example:</p> +<pre class="literal-block"> +$ dd if=/dev/urandom of=randomdata count=2000 +$ hg add --large randomdata +$ hg commit -m 'add randomdata as a largefile' +</pre> +<p>When you push a changeset that adds/modifies largefiles to a remote +repository, its largefile revisions will be uploaded along with it. +Note that the remote Mercurial must also have the largefiles extension +enabled for this to work.</p> +<p>When you pull a changeset that affects largefiles from a remote +repository, Mercurial behaves as normal. However, when you update to +such a revision, any largefiles needed by that revision are downloaded +and cached (if they have never been downloaded before). This means +that network access may be required to update to changesets you have +not previously updated to.</p> +<p>If you already have large files tracked by Mercurial without the +largefiles extension, you will need to convert your repository in +order to benefit from largefiles. This is done with the +<a class="reference external" href="hg.1.html#lfconvert"><tt class="docutils literal">hg lfconvert</tt></a> command:</p> +<pre class="literal-block"> +$ hg lfconvert --size 10 oldrepo newrepo +</pre> +<p>In repositories that already have largefiles in them, any new file +over 10MB will automatically be added as a largefile. To change this +threshold, set <tt class="docutils literal">largefiles.minsize</tt> in your Mercurial config file +to the minimum size in megabytes to track as a largefile, or use the +--lfsize option to the add command (also in megabytes):</p> +<pre class="literal-block"> +[largefiles] +minsize = 2 + +$ hg add --lfsize 2 +</pre> +<p>The <tt class="docutils literal">largefiles.patterns</tt> config option allows you to specify a list +of filename patterns (see <a class="reference external" href="hg.1.html#patterns"><tt class="docutils literal">hg help patterns</tt></a>) that should always be +tracked as largefiles:</p> +<pre class="literal-block"> +[largefiles] +patterns = + *.jpg + re:.*\.(png|bmp)$ + library.zip + content/audio/* +</pre> +<p>Files that match one of these patterns will be added as largefiles +regardless of their size.</p> +<p>The <tt class="docutils literal">largefiles.minsize</tt> and <tt class="docutils literal">largefiles.patterns</tt> config options +will be ignored for any repositories not already containing a +largefile. To add the first largefile to a repository, you must +explicitly do so with the --large flag passed to the <a class="reference external" href="hg.1.html#add"><tt class="docutils literal">hg add</tt></a> +command.</p> +<div class="section" id="id24"> +<h3>Commands</h3> +<div class="section" id="lfconvert"> +<h4>lfconvert</h4> +<pre class="literal-block"> +hg lfconvert SOURCE DEST [FILE ...] +</pre> +<p>Convert repository SOURCE to a new repository DEST, identical to +SOURCE except that certain files will be converted as largefiles: +specifically, any file that matches any PATTERN <em>or</em> whose size is +above the minimum size threshold is converted as a largefile. The +size used to determine whether or not to track a file as a +largefile is the size of the first version of the file. The +minimum size can be specified either with --size or in +configuration as <tt class="docutils literal">largefiles.size</tt>.</p> +<p>After running this command you will need to make sure that +largefiles is enabled anywhere you intend to push the new +repository.</p> +<p>Use --to-normal to convert largefiles back to normal files; after +this, the DEST repository can be used without largefiles at all.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-s</span>, <span class="option">--size</span></kbd></td> +<td>minimum size (MB) for files to be converted as largefiles</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--to-normal</span></kbd></td> +<td>convert from a largefiles repo to a normal repo</td></tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="section" id="mq"> +<h2><a class="toc-backref" href="#id88">mq</a></h2> +<p>manage a stack of patches</p> +<p>This extension lets you work with a stack of patches in a Mercurial +repository. It manages two stacks of patches - all known patches, and +applied patches (subset of known patches).</p> +<p>Known patches are represented as patch files in the .hg/patches +directory. Applied patches are both patch files and changesets.</p> +<p>Common tasks (use <a class="reference external" href="hg.1.html#command"><tt class="docutils literal">hg help command</tt></a> for more details):</p> +<pre class="literal-block"> +create new patch qnew +import existing patch qimport + +print patch series qseries +print applied patches qapplied + +add known patch to applied stack qpush +remove patch from applied stack qpop +refresh contents of top applied patch qrefresh +</pre> +<p>By default, mq will automatically use git patches when required to +avoid losing file mode changes, copy records, binary files or empty +files creations or deletions. This behaviour can be configured with:</p> +<pre class="literal-block"> +[mq] +git = auto/keep/yes/no +</pre> +<p>If set to 'keep', mq will obey the [diff] section configuration while +preserving existing git patches upon qrefresh. If set to 'yes' or +'no', mq will override the [diff] section and always generate git or +regular patches, possibly losing data in the second case.</p> +<p>It may be desirable for mq changesets to be kept in the secret phase (see +<a class="reference external" href="hg.1.html#phases"><tt class="docutils literal">hg help phases</tt></a>), which can be enabled with the following setting:</p> +<pre class="literal-block"> +[mq] +secret = True +</pre> +<p>You will by default be managing a patch queue named "patches". You can +create other, independent patch queues with the <a class="reference external" href="hg.1.html#qqueue"><tt class="docutils literal">hg qqueue</tt></a> command.</p> +<p>If the working directory contains uncommitted files, qpush, qpop and +qgoto abort immediately. If -f/--force is used, the changes are +discarded. Setting:</p> +<pre class="literal-block"> +[mq] +keepchanges = True +</pre> +<p>make them behave as if --keep-changes were passed, and non-conflicting +local changes will be tolerated and preserved. If incompatible options +such as -f/--force or --exact are passed, this setting is ignored.</p> +<div class="section" id="id25"> +<h3>Commands</h3> +<div class="section" id="qapplied"> +<h4>qapplied</h4> +<pre class="literal-block"> +hg qapplied [-1] [-s] [PATCH] +</pre> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-1</span>, <span class="option">--last</span></kbd></td> +<td>show only the preceding applied patch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-s</span>, <span class="option">--summary</span></kbd></td> +<td>print first line of patch header</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qclone"> +<h4>qclone</h4> +<pre class="literal-block"> +hg qclone [OPTION]... SOURCE [DEST] +</pre> +<p>If source is local, destination will have no patches applied. If +source is remote, this command can not check if patches are +applied in source, so cannot guarantee that patches are not +applied in destination. If you clone remote repository, be sure +before that it has no patches applied.</p> +<p>Source patch repository is looked for in <src>/.hg/patches by +default. Use -p <url> to change.</p> +<p>The patch directory must be a nested Mercurial repository, as +would be created by <a class="reference external" href="hg.1.html#init"><tt class="docutils literal">hg init <span class="pre">--mq</span></tt></a>.</p> +<p>Return 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">--pull</span></kbd></td> +<td>use pull protocol to copy metadata</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-U</span>, <span class="option">--noupdate</span></kbd></td> +<td>do not update the new working directories</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--uncompressed</span></kbd></td> +<td>use uncompressed transfer (fast over LAN)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-p</span>, <span class="option">--patches</span></kbd></td> +<td>location of source patch repository</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--ssh</span></kbd></td> +<td>specify ssh command to use</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--remotecmd</span></kbd></td> +<td>specify hg command to run on the remote side</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--insecure</span></kbd></td> +<td>do not verify server certificate (ignoring web.cacerts config)</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qcommit"> +<h4>qcommit</h4> +<pre class="literal-block"> +hg qcommit [OPTION]... [FILE]... +</pre> +<p>This command is deprecated; use <a class="reference external" href="hg.1.html#commit"><tt class="docutils literal">hg commit <span class="pre">--mq</span></tt></a> instead.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-A</span>, <span class="option">--addremove</span></kbd></td> +</tr> +<tr><td> </td><td>mark new/missing files as added/removed before committing</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--close-branch</span></kbd></td> +<td>mark a branch as closed, hiding it from the branch list</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--amend</span></kbd></td> +<td>amend the parent of the working dir</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--message</span></kbd></td> +<td>use text as commit message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--logfile</span></kbd></td> +<td>read commit message from file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>record the specified date as commit date</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--user</span></kbd></td> +<td>record the specified user as committer</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-S</span>, <span class="option">--subrepos</span></kbd></td> +<td><p class="first">recurse into subrepositories</p> +<p class="last">aliases: qci</p> +</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qdelete"> +<h4>qdelete</h4> +<pre class="literal-block"> +hg qdelete [-k] [PATCH]... +</pre> +<p>The patches must not be applied, and at least one patch is required. Exact +patch identifiers must be given. With -k/--keep, the patch files are +preserved in the patch directory.</p> +<p>To stop managing a patch and move it into permanent history, +use the <a class="reference external" href="hg.1.html#qfinish"><tt class="docutils literal">hg qfinish</tt></a> command.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-k</span>, <span class="option">--keep</span></kbd></td> +<td>keep patch file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td><p class="first">stop managing a revision (DEPRECATED)</p> +<p class="last">aliases: qremove qrm</p> +</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qdiff"> +<h4>qdiff</h4> +<pre class="literal-block"> +hg qdiff [OPTION]... [FILE]... +</pre> +<p>Shows a diff which includes the current patch as well as any +changes which have been made in the working directory since the +last refresh (thus showing what the current patch would become +after a qrefresh).</p> +<p>Use <a class="reference external" href="hg.1.html#diff"><tt class="docutils literal">hg diff</tt></a> if you only want to see the changes made since the +last qrefresh, or <a class="reference external" href="hg.1.html#export"><tt class="docutils literal">hg export qtip</tt></a> if you want to see changes +made by the current patch without including changes made since the +qrefresh.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--text</span></kbd></td> +<td>treat all files as text</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-g</span>, <span class="option">--git</span></kbd></td> +<td>use git extended diff format</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--nodates</span></kbd></td> +<td>omit dates from diff headers</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-p</span>, <span class="option">--show-function</span></kbd></td> +</tr> +<tr><td> </td><td>show which function each change is in</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--reverse</span></kbd></td> +<td>produce a diff that undoes the changes</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-w</span>, <span class="option">--ignore-all-space</span></kbd></td> +</tr> +<tr><td> </td><td>ignore white space when comparing lines</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-b</span>, <span class="option">--ignore-space-change</span></kbd></td> +</tr> +<tr><td> </td><td>ignore changes in the amount of white space</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-B</span>, <span class="option">--ignore-blank-lines</span></kbd></td> +</tr> +<tr><td> </td><td>ignore changes whose lines are all blank</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-U</span>, <span class="option">--unified</span></kbd></td> +<td>number of lines of context to show</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--stat</span></kbd></td> +<td>output diffstat-style summary of changes</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qfinish"> +<h4>qfinish</h4> +<pre class="literal-block"> +hg qfinish [-a] [REV]... +</pre> +<p>Finishes the specified revisions (corresponding to applied +patches) by moving them out of mq control into regular repository +history.</p> +<p>Accepts a revision range or the -a/--applied option. If --applied +is specified, all applied mq revisions are removed from mq +control. Otherwise, the given revisions must be at the base of the +stack of applied patches.</p> +<p>This can be especially useful if your changes have been applied to +an upstream repository, or if you are about to push your changes +to upstream.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--applied</span></kbd></td> +<td>finish all applied changesets</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qfold"> +<h4>qfold</h4> +<pre class="literal-block"> +hg qfold [-e] [-k] [-m TEXT] [-l FILE] PATCH... +</pre> +<p>Patches must not yet be applied. Each patch will be successively +applied to the current patch in the order given. If all the +patches apply successfully, the current patch will be refreshed +with the new cumulative patch, and the folded patches will be +deleted. With -k/--keep, the folded patch files will not be +removed afterwards.</p> +<p>The header for each folded patch will be concatenated with the +current patch header, separated by a line of <tt class="docutils literal">* * *</tt>.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--edit</span></kbd></td> +<td>edit patch header</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-k</span>, <span class="option">--keep</span></kbd></td> +<td>keep folded patch files</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--message</span></kbd></td> +<td>use text as commit message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--logfile</span></kbd></td> +<td>read commit message from file</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qgoto"> +<h4>qgoto</h4> +<pre class="literal-block"> +hg qgoto [OPTION]... PATCH +</pre> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">--keep-changes</span></kbd></td> +<td>tolerate non-conflicting local changes</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>overwrite any local changes</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--no-backup</span></kbd></td> +<td>do not save backup copies of files</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qguard"> +<h4>qguard</h4> +<pre class="literal-block"> +hg qguard [-l] [-n] [PATCH] [-- [+GUARD]... [-GUARD]...] +</pre> +<p>Guards control whether a patch can be pushed. A patch with no +guards is always pushed. A patch with a positive guard ("+foo") is +pushed only if the <a class="reference external" href="hg.1.html#qselect"><tt class="docutils literal">hg qselect</tt></a> command has activated it. A patch with +a negative guard ("-foo") is never pushed if the <a class="reference external" href="hg.1.html#qselect"><tt class="docutils literal">hg qselect</tt></a> command +has activated it.</p> +<p>With no arguments, print the currently active guards. +With arguments, set guards for the named patch.</p> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">Specifying negative guards now requires '--'.</p> +</div> +<p>To set guards on another patch:</p> +<pre class="literal-block"> +hg qguard other.patch -- +2.6.17 -stable +</pre> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--list</span></kbd></td> +<td>list all patches and guards</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-n</span>, <span class="option">--none</span></kbd></td> +<td>drop all guards</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qheader"> +<h4>qheader</h4> +<pre class="literal-block"> +hg qheader [PATCH] +</pre> +<p>Returns 0 on success.</p> +</div> +<div class="section" id="qimport"> +<h4>qimport</h4> +<pre class="literal-block"> +hg qimport [-e] [-n NAME] [-f] [-g] [-P] [-r REV]... [FILE]... +</pre> +<p>The patch is inserted into the series after the last applied +patch. If no patches have been applied, qimport prepends the patch +to the series.</p> +<p>The patch will have the same name as its source file unless you +give it a new one with -n/--name.</p> +<p>You can register an existing patch inside the patch directory with +the -e/--existing flag.</p> +<p>With -f/--force, an existing patch of the same name will be +overwritten.</p> +<p>An existing changeset may be placed under mq control with -r/--rev +(e.g. qimport --rev tip -n patch will place tip under mq control). +With -g/--git, patches imported with --rev will use the git diff +format. See the diffs help topic for information on why this is +important for preserving rename/copy information and permission +changes. Use <a class="reference external" href="hg.1.html#qfinish"><tt class="docutils literal">hg qfinish</tt></a> to remove changesets from mq control.</p> +<p>To import a patch from standard input, pass - as the patch file. +When importing from standard input, a patch name must be specified +using the --name flag.</p> +<p>To import an existing patch while renaming it:</p> +<pre class="literal-block"> +hg qimport -e existing-patch -n new-name +</pre> +<p>Returns 0 if import succeeded.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--existing</span></kbd></td> +<td>import file in patch directory</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-n</span>, <span class="option">--name</span></kbd></td> +<td>name of patch file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>overwrite existing files</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>place existing revisions under mq control</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-g</span>, <span class="option">--git</span></kbd></td> +<td>use git extended diff format</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-P</span>, <span class="option">--push</span></kbd></td> +<td>qpush after importing</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qinit"> +<h4>qinit</h4> +<pre class="literal-block"> +hg qinit [-c] +</pre> +<p>The queue repository is unversioned by default. If +-c/--create-repo is specified, qinit will create a separate nested +repository for patches (qinit -c may also be run later to convert +an unversioned patch repository into a versioned one). You can use +qcommit to commit changes to this queue repository.</p> +<p>This command is deprecated. Without -c, it's implied by other relevant +commands. With -c, use <a class="reference external" href="hg.1.html#init"><tt class="docutils literal">hg init <span class="pre">--mq</span></tt></a> instead.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-c</span>, <span class="option">--create-repo</span></kbd></td> +</tr> +<tr><td> </td><td>create queue repository</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qnew"> +<h4>qnew</h4> +<pre class="literal-block"> +hg qnew [-e] [-m TEXT] [-l FILE] PATCH [FILE]... +</pre> +<p>qnew creates a new patch on top of the currently-applied patch (if +any). The patch will be initialized with any outstanding changes +in the working directory. You may also use -I/--include, +-X/--exclude, and/or a list of files after the patch name to add +only changes to matching files to the new patch, leaving the rest +as uncommitted modifications.</p> +<p>-u/--user and -d/--date can be used to set the (given) user and +date, respectively. -U/--currentuser and -D/--currentdate set user +to current user and date to current date.</p> +<p>-e/--edit, -m/--message or -l/--logfile set the patch header as +well as the commit message. If none is specified, the header is +empty and the commit message is '[mq]: PATCH'.</p> +<p>Use the -g/--git option to keep the patch in the git extended diff +format. Read the diffs help topic for more information on why this +is important for preserving permission changes and copy/rename +information.</p> +<p>Returns 0 on successful creation of a new patch.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--edit</span></kbd></td> +<td>edit commit message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>import uncommitted changes (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-g</span>, <span class="option">--git</span></kbd></td> +<td>use git extended diff format</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-U</span>, <span class="option">--currentuser</span></kbd></td> +</tr> +<tr><td> </td><td>add "From: <current user>" to patch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--user</span></kbd></td> +<td>add "From: <USER>" to patch</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-D</span>, <span class="option">--currentdate</span></kbd></td> +</tr> +<tr><td> </td><td>add "Date: <current date>" to patch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>add "Date: <DATE>" to patch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--message</span></kbd></td> +<td>use text as commit message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--logfile</span></kbd></td> +<td>read commit message from file</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qnext"> +<h4>qnext</h4> +<pre class="literal-block"> +hg qnext [-s] +</pre> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-s</span>, <span class="option">--summary</span></kbd></td> +<td>print first line of patch header</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qpop"> +<h4>qpop</h4> +<pre class="literal-block"> +hg qpop [-a] [-f] [PATCH | INDEX] +</pre> +<p>Without argument, pops off the top of the patch stack. If given a +patch name, keeps popping off patches until the named patch is at +the top of the stack.</p> +<p>By default, abort if the working directory contains uncommitted +changes. With --keep-changes, abort only if the uncommitted files +overlap with patched files. With -f/--force, backup and discard +changes made to such files.</p> +<p>Return 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--all</span></kbd></td> +<td>pop all patches</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-n</span>, <span class="option">--name</span></kbd></td> +<td>queue name to pop (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--keep-changes</span></kbd></td> +<td>tolerate non-conflicting local changes</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>forget any local changes to patched files</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--no-backup</span></kbd></td> +<td>do not save backup copies of files</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qprev"> +<h4>qprev</h4> +<pre class="literal-block"> +hg qprev [-s] +</pre> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-s</span>, <span class="option">--summary</span></kbd></td> +<td>print first line of patch header</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qpush"> +<h4>qpush</h4> +<pre class="literal-block"> +hg qpush [-f] [-l] [-a] [--move] [PATCH | INDEX] +</pre> +<p>By default, abort if the working directory contains uncommitted +changes. With --keep-changes, abort only if the uncommitted files +overlap with patched files. With -f/--force, backup and patch over +uncommitted changes.</p> +<p>Return 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">--keep-changes</span></kbd></td> +<td>tolerate non-conflicting local changes</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>apply on top of local changes</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--exact</span></kbd></td> +<td>apply the target patch to its recorded parent</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--list</span></kbd></td> +<td>list patch name in commit text</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--all</span></kbd></td> +<td>apply all patches</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--merge</span></kbd></td> +<td>merge from another queue (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-n</span>, <span class="option">--name</span></kbd></td> +<td>merge queue name (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--move</span></kbd></td> +<td>reorder patch series and apply only the patch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--no-backup</span></kbd></td> +<td>do not save backup copies of files</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qqueue"> +<h4>qqueue</h4> +<pre class="literal-block"> +hg qqueue [OPTION] [QUEUE] +</pre> +<p>Supports switching between different patch queues, as well as creating +new patch queues and deleting existing ones.</p> +<p>Omitting a queue name or specifying -l/--list will show you the registered +queues - by default the "normal" patches queue is registered. The currently +active queue will be marked with "(active)". Specifying --active will print +only the name of the active queue.</p> +<p>To create a new queue, use -c/--create. The queue is automatically made +active, except in the case where there are applied patches from the +currently active queue in the repository. Then the queue will only be +created and switching will fail.</p> +<p>To delete an existing queue, use --delete. You cannot delete the currently +active queue.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--list</span></kbd></td> +<td>list all available queues</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--active</span></kbd></td> +<td>print name of active queue</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-c</span>, <span class="option">--create</span></kbd></td> +<td>create new queue</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--rename</span></kbd></td> +<td>rename active queue</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--delete</span></kbd></td> +<td>delete reference to queue</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--purge</span></kbd></td> +<td>delete queue, and remove patch dir</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qrefresh"> +<h4>qrefresh</h4> +<pre class="literal-block"> +hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]... +</pre> +<p>If any file patterns are provided, the refreshed patch will +contain only the modifications that match those patterns; the +remaining modifications will remain in the working directory.</p> +<p>If -s/--short is specified, files currently included in the patch +will be refreshed just like matched files and remain in the patch.</p> +<p>If -e/--edit is specified, Mercurial will start your configured editor for +you to enter a message. In case qrefresh fails, you will find a backup of +your message in <tt class="docutils literal"><span class="pre">.hg/last-message.txt</span></tt>.</p> +<p>hg add/remove/copy/rename work as usual, though you might want to +use git-style patches (-g/--git or [diff] git=1) to track copies +and renames. See the diffs help topic for more information on the +git diff format.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--edit</span></kbd></td> +<td>edit commit message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-g</span>, <span class="option">--git</span></kbd></td> +<td>use git extended diff format</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-s</span>, <span class="option">--short</span></kbd></td> +<td>refresh only files already in the patch and specified files</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-U</span>, <span class="option">--currentuser</span></kbd></td> +</tr> +<tr><td> </td><td>add/update author field in patch with current user</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--user</span></kbd></td> +<td>add/update author field in patch with given user</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-D</span>, <span class="option">--currentdate</span></kbd></td> +</tr> +<tr><td> </td><td>add/update date field in patch with current date</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>add/update date field in patch with given date</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--message</span></kbd></td> +<td>use text as commit message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--logfile</span></kbd></td> +<td>read commit message from file</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qrename"> +<h4>qrename</h4> +<pre class="literal-block"> +hg qrename PATCH1 [PATCH2] +</pre> +<p>With one argument, renames the current patch to PATCH1. +With two arguments, renames PATCH1 to PATCH2.</p> +<p>Returns 0 on success.</p> +<blockquote> +aliases: qmv</blockquote> +</div> +<div class="section" id="qrestore"> +<h4>qrestore</h4> +<pre class="literal-block"> +hg qrestore [-d] [-u] REV +</pre> +<p>This command is deprecated, use <a class="reference external" href="hg.1.html#rebase"><tt class="docutils literal">hg rebase</tt></a> instead.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--delete</span></kbd></td> +<td>delete save entry</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--update</span></kbd></td> +<td>update queue working directory</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qsave"> +<h4>qsave</h4> +<pre class="literal-block"> +hg qsave [-m TEXT] [-l FILE] [-c] [-n NAME] [-e] [-f] +</pre> +<p>This command is deprecated, use <a class="reference external" href="hg.1.html#rebase"><tt class="docutils literal">hg rebase</tt></a> instead.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-c</span>, <span class="option">--copy</span></kbd></td> +<td>copy patch directory</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-n</span>, <span class="option">--name</span></kbd></td> +<td>copy directory name</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--empty</span></kbd></td> +<td>clear queue status file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>force copy</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--message</span></kbd></td> +<td>use text as commit message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--logfile</span></kbd></td> +<td>read commit message from file</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qselect"> +<h4>qselect</h4> +<pre class="literal-block"> +hg qselect [OPTION]... [GUARD]... +</pre> +<p>Use the <a class="reference external" href="hg.1.html#qguard"><tt class="docutils literal">hg qguard</tt></a> command to set or print guards on patch, then use +qselect to tell mq which guards to use. A patch will be pushed if +it has no guards or any positive guards match the currently +selected guard, but will not be pushed if any negative guards +match the current guard. For example:</p> +<pre class="literal-block"> +qguard foo.patch -- -stable (negative guard) +qguard bar.patch +stable (positive guard) +qselect stable +</pre> +<p>This activates the "stable" guard. mq will skip foo.patch (because +it has a negative match) but push bar.patch (because it has a +positive match).</p> +<p>With no arguments, prints the currently active guards. +With one argument, sets the active guard.</p> +<p>Use -n/--none to deactivate guards (no other arguments needed). +When no guards are active, patches with positive guards are +skipped and patches with negative guards are pushed.</p> +<p>qselect can change the guards on applied patches. It does not pop +guarded patches by default. Use --pop to pop back to the last +applied patch that is not guarded. Use --reapply (which implies +--pop) to push back to the current patch afterwards, but skip +guarded patches.</p> +<p>Use -s/--series to print a list of all guards in the series file +(no other arguments needed). Use -v for more information.</p> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-n</span>, <span class="option">--none</span></kbd></td> +<td>disable all guards</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-s</span>, <span class="option">--series</span></kbd></td> +<td>list all guards in series file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--pop</span></kbd></td> +<td>pop to before first guarded applied patch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--reapply</span></kbd></td> +<td>pop, then reapply patches</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qseries"> +<h4>qseries</h4> +<pre class="literal-block"> +hg qseries [-ms] +</pre> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--missing</span></kbd></td> +<td>print patches not in series</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-s</span>, <span class="option">--summary</span></kbd></td> +<td>print first line of patch header</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qtop"> +<h4>qtop</h4> +<pre class="literal-block"> +hg qtop [-s] +</pre> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-s</span>, <span class="option">--summary</span></kbd></td> +<td>print first line of patch header</td></tr> +</tbody> +</table> +</div> +<div class="section" id="qunapplied"> +<h4>qunapplied</h4> +<pre class="literal-block"> +hg qunapplied [-1] [-s] [PATCH] +</pre> +<p>Returns 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-1</span>, <span class="option">--first</span></kbd></td> +<td>show only the first patch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-s</span>, <span class="option">--summary</span></kbd></td> +<td>print first line of patch header</td></tr> +</tbody> +</table> +</div> +<div class="section" id="strip"> +<h4>strip</h4> +<pre class="literal-block"> +hg strip [-k] [-f] [-n] [-B bookmark] [-r] REV... +</pre> +<p>The strip command removes the specified changesets and all their +descendants. If the working directory has uncommitted changes, the +operation is aborted unless the --force flag is supplied, in which +case changes will be discarded.</p> +<p>If a parent of the working directory is stripped, then the working +directory will automatically be updated to the most recent +available ancestor of the stripped parent after the operation +completes.</p> +<p>Any stripped changesets are stored in <tt class="docutils literal"><span class="pre">.hg/strip-backup</span></tt> as a +bundle (see <a class="reference external" href="hg.1.html#bundle"><tt class="docutils literal">hg help bundle</tt></a> and <a class="reference external" href="hg.1.html#unbundle"><tt class="docutils literal">hg help unbundle</tt></a>). They can +be restored by running <a class="reference external" href="hg.1.html#unbundle"><tt class="docutils literal">hg unbundle <span class="pre">.hg/strip-backup/BUNDLE</span></tt></a>, +where BUNDLE is the bundle file created by the strip. Note that +the local revision numbers will in general be different after the +restore.</p> +<p>Use the --no-backup option to discard the backup bundle once the +operation completes.</p> +<p>Strip is not a history-rewriting operation and can be used on +changesets in the public phase. But if the stripped changesets have +been pushed to a remote repository you will likely pull them again.</p> +<p>Return 0 on success.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>strip specified revision (optional, can specify revisions without this option)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> +<td>force removal of changesets, discard uncommitted changes (no backup)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-b</span>, <span class="option">--backup</span></kbd></td> +<td>bundle only changesets with local revision number greater than REV which are not descendants of REV (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--no-backup</span></kbd></td> +<td>no backups</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--nobackup</span></kbd></td> +<td>no backups (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-n</span></kbd></td> +<td>ignored (DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-k</span>, <span class="option">--keep</span></kbd></td> +<td>do not modify working copy during strip</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-B</span>, <span class="option">--bookmark</span></kbd></td> +<td>remove revs only reachable from given bookmark</td></tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="section" id="notify"> +<h2><a class="toc-backref" href="#id89">notify</a></h2> +<p>hooks for sending email push notifications</p> +<p>This extension implements hooks to send email notifications when +changesets are sent from or received by the local repository.</p> +<p>First, enable the extension as explained in <a class="reference external" href="hg.1.html#extensions"><tt class="docutils literal">hg help extensions</tt></a>, and +register the hook you want to run. <tt class="docutils literal">incoming</tt> and <tt class="docutils literal">changegroup</tt> hooks +are run when changesets are received, while <tt class="docutils literal">outgoing</tt> hooks are for +changesets sent to another repository:</p> +<pre class="literal-block"> +[hooks] +# one email for each incoming changeset +incoming.notify = python:hgext.notify.hook +# one email for all incoming changesets +changegroup.notify = python:hgext.notify.hook + +# one email for all outgoing changesets +outgoing.notify = python:hgext.notify.hook +</pre> +<p>This registers the hooks. To enable notification, subscribers must +be assigned to repositories. The <tt class="docutils literal">[usersubs]</tt> section maps multiple +repositories to a given recipient. The <tt class="docutils literal">[reposubs]</tt> section maps +multiple recipients to a single repository:</p> +<pre class="literal-block"> +[usersubs] +# key is subscriber email, value is a comma-separated list of repo glob +# patterns +user@host = pattern + +[reposubs] +# key is glob pattern, value is a comma-separated list of subscriber +# emails +pattern = user@host +</pre> +<p>Glob patterns are matched against absolute path to repository +root.</p> +<p>In order to place them under direct user management, <tt class="docutils literal">[usersubs]</tt> and +<tt class="docutils literal">[reposubs]</tt> sections may be placed in a separate <tt class="docutils literal">hgrc</tt> file and +incorporated by reference:</p> +<pre class="literal-block"> +[notify] +config = /path/to/subscriptionsfile +</pre> +<p>Notifications will not be sent until the <tt class="docutils literal">notify.test</tt> value is set +to <tt class="docutils literal">False</tt>; see below.</p> +<p>Notifications content can be tweaked with the following configuration entries:</p> +<dl class="docutils"> +<dt>notify.test</dt> +<dd>If <tt class="docutils literal">True</tt>, print messages to stdout instead of sending them. Default: True.</dd> +<dt>notify.sources</dt> +<dd><p class="first">Space-separated list of change sources. Notifications are activated only +when a changeset's source is in this list. Sources may be:</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name"><tt class="docutils literal">serve</tt>:</th><td class="field-body">changesets received via http or ssh</td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">pull</tt>:</th><td class="field-body">changesets received via <tt class="docutils literal">hg pull</tt></td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">unbundle</tt>:</th><td class="field-body">changesets received via <tt class="docutils literal">hg unbundle</tt></td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">push</tt>:</th><td class="field-body">changesets sent or received via <tt class="docutils literal">hg push</tt></td> +</tr> +<tr class="field"><th class="field-name"><tt class="docutils literal">bundle</tt>:</th><td class="field-body">changesets sent via <tt class="docutils literal">hg unbundle</tt></td> +</tr> +</tbody> +</table> +<p class="last">Default: serve.</p> +</dd> +<dt>notify.strip</dt> +<dd>Number of leading slashes to strip from url paths. By default, notifications +reference repositories with their absolute path. <tt class="docutils literal">notify.strip</tt> lets you +turn them into relative paths. For example, <tt class="docutils literal">notify.strip=3</tt> will change +<tt class="docutils literal">/long/path/repository</tt> into <tt class="docutils literal">repository</tt>. Default: 0.</dd> +<dt>notify.domain</dt> +<dd>Default email domain for sender or recipients with no explicit domain.</dd> +<dt>notify.style</dt> +<dd>Style file to use when formatting emails.</dd> +<dt>notify.template</dt> +<dd>Template to use when formatting emails.</dd> +<dt>notify.incoming</dt> +<dd>Template to use when run as an incoming hook, overriding <tt class="docutils literal">notify.template</tt>.</dd> +<dt>notify.outgoing</dt> +<dd>Template to use when run as an outgoing hook, overriding <tt class="docutils literal">notify.template</tt>.</dd> +<dt>notify.changegroup</dt> +<dd>Template to use when running as a changegroup hook, overriding +<tt class="docutils literal">notify.template</tt>.</dd> +<dt>notify.maxdiff</dt> +<dd>Maximum number of diff lines to include in notification email. Set to 0 +to disable the diff, or -1 to include all of it. Default: 300.</dd> +<dt>notify.maxsubject</dt> +<dd>Maximum number of characters in email's subject line. Default: 67.</dd> +<dt>notify.diffstat</dt> +<dd>Set to True to include a diffstat before diff content. Default: True.</dd> +<dt>notify.merge</dt> +<dd>If True, send notifications for merge changesets. Default: True.</dd> +<dt>notify.mbox</dt> +<dd>If set, append mails to this mbox file instead of sending. Default: None.</dd> +<dt>notify.fromauthor</dt> +<dd>If set, use the committer of the first changeset in a changegroup for +the "From" field of the notification mail. If not set, take the user +from the pushing repo. Default: False.</dd> +</dl> +<p>If set, the following entries will also be used to customize the +notifications:</p> +<dl class="docutils"> +<dt>email.from</dt> +<dd>Email <tt class="docutils literal">From</tt> address to use if none can be found in the generated +email content.</dd> +<dt>web.baseurl</dt> +<dd>Root repository URL to combine with repository paths when making +references. See also <tt class="docutils literal">notify.strip</tt>.</dd> +</dl> +</div> +<div class="section" id="pager"> +<h2><a class="toc-backref" href="#id90">pager</a></h2> +<p>browse command output with an external pager</p> +<p>To set the pager that should be used, set the application variable:</p> +<pre class="literal-block"> +[pager] +pager = less -FRX +</pre> +<p>If no pager is set, the pager extensions uses the environment variable +$PAGER. If neither pager.pager, nor $PAGER is set, no pager is used.</p> +<p>You can disable the pager for certain commands by adding them to the +pager.ignore list:</p> +<pre class="literal-block"> +[pager] +ignore = version, help, update +</pre> +<p>You can also enable the pager only for certain commands using +pager.attend. Below is the default list of commands to be paged:</p> +<pre class="literal-block"> +[pager] +attend = annotate, cat, diff, export, glog, log, qdiff +</pre> +<p>Setting pager.attend to an empty value will cause all commands to be +paged.</p> +<p>If pager.attend is present, pager.ignore will be ignored.</p> +<p>To ignore global commands like <a class="reference external" href="hg.1.html#version"><tt class="docutils literal">hg version</tt></a> or <a class="reference external" href="hg.1.html#help"><tt class="docutils literal">hg help</tt></a>, you have +to specify them in your user configuration file.</p> +<p>The --pager=... option can also be used to control when the pager is +used. Use a boolean value like yes, no, on, off, or use auto for +normal behavior.</p> +</div> +<div class="section" id="patchbomb"> +<h2><a class="toc-backref" href="#id91">patchbomb</a></h2> +<p>command to send changesets as (a series of) patch emails</p> +<p>The series is started off with a "[PATCH 0 of N]" introduction, which +describes the series as a whole.</p> +<p>Each patch email has a Subject line of "[PATCH M of N] ...", using the +first line of the changeset description as the subject text. The +message contains two or three body parts:</p> +<ul class="simple"> +<li>The changeset description.</li> +<li>[Optional] The result of running diffstat on the patch.</li> +<li>The patch itself, as generated by <a class="reference external" href="hg.1.html#export"><tt class="docutils literal">hg export</tt></a>.</li> +</ul> +<p>Each message refers to the first in the series using the In-Reply-To +and References headers, so they will show up as a sequence in threaded +mail and news readers, and in mail archives.</p> +<p>To configure other defaults, add a section like this to your +configuration file:</p> +<pre class="literal-block"> +[email] +from = My Name <my@email> +to = recipient1, recipient2, ... +cc = cc1, cc2, ... +bcc = bcc1, bcc2, ... +reply-to = address1, address2, ... +</pre> +<p>Use <tt class="docutils literal">[patchbomb]</tt> as configuration section name if you need to +override global <tt class="docutils literal">[email]</tt> address settings.</p> +<p>Then you can use the <a class="reference external" href="hg.1.html#email"><tt class="docutils literal">hg email</tt></a> command to mail a series of +changesets as a patchbomb.</p> +<p>You can also either configure the method option in the email section +to be a sendmail compatible mailer or fill out the [smtp] section so +that the patchbomb extension can automatically send patchbombs +directly from the commandline. See the [email] and [smtp] sections in +hgrc(5) for details.</p> +<div class="section" id="id26"> +<h3>Commands</h3> +<div class="section" id="email"> +<h4>email</h4> +<pre class="literal-block"> +hg email [OPTION]... [DEST]... +</pre> +<p>By default, diffs are sent in the format generated by +<a class="reference external" href="hg.1.html#export"><tt class="docutils literal">hg export</tt></a>, one per message. The series starts with a "[PATCH 0 +of N]" introduction, which describes the series as a whole.</p> +<p>Each patch email has a Subject line of "[PATCH M of N] ...", using +the first line of the changeset description as the subject text. +The message contains two or three parts. First, the changeset +description.</p> +<p>With the -d/--diffstat option, if the diffstat program is +installed, the result of running diffstat on the patch is inserted.</p> +<p>Finally, the patch itself, as generated by <a class="reference external" href="hg.1.html#export"><tt class="docutils literal">hg export</tt></a>.</p> +<p>With the -d/--diffstat or -c/--confirm options, you will be presented +with a final summary of all messages and asked for confirmation before +the messages are sent.</p> +<p>By default the patch is included as text in the email body for +easy reviewing. Using the -a/--attach option will instead create +an attachment for the patch. With -i/--inline an inline attachment +will be created. You can include a patch both as text in the email +body and as a regular or an inline attachment by combining the +-a/--attach or -i/--inline with the --body option.</p> +<p>With -o/--outgoing, emails will be generated for patches not found +in the destination repository (or only those which are ancestors +of the specified revisions if any are provided)</p> +<p>With -b/--bundle, changesets are selected as for --outgoing, but a +single email containing a binary Mercurial bundle as an attachment +will be sent.</p> +<p>With -m/--mbox, instead of previewing each patchbomb message in a +pager or sending the messages directly, it will create a UNIX +mailbox file with the patch emails. This mailbox file can be +previewed with any mail user agent which supports UNIX mbox +files.</p> +<p>With -n/--test, all steps will run, but mail will not be sent. +You will be prompted for an email recipient address, a subject and +an introductory message describing the patches of your patchbomb. +Then when all is done, patchbomb messages are displayed. If the +PAGER environment variable is set, your pager will be fired up once +for each patchbomb message, so you can verify everything is alright.</p> +<p>In case email sending fails, you will find a backup of your series +introductory message in <tt class="docutils literal"><span class="pre">.hg/last-email.txt</span></tt>.</p> +<p>Examples:</p> +<pre class="literal-block"> +hg email -r 3000 # send patch 3000 only +hg email -r 3000 -r 3001 # send patches 3000 and 3001 +hg email -r 3000:3005 # send patches 3000 through 3005 +hg email 3000 # send patch 3000 (deprecated) + +hg email -o # send all patches not in default +hg email -o DEST # send all patches not in DEST +hg email -o -r 3000 # send all ancestors of 3000 not in default +hg email -o -r 3000 DEST # send all ancestors of 3000 not in DEST + +hg email -b # send bundle of all patches not in default +hg email -b DEST # send bundle of all patches not in DEST +hg email -b -r 3000 # bundle of all ancestors of 3000 not in default +hg email -b -r 3000 DEST # bundle of all ancestors of 3000 not in DEST + +hg email -o -m mbox && # generate an mbox file... + mutt -R -f mbox # ... and view it with mutt +hg email -o -m mbox && # generate an mbox file ... + formail -s sendmail \ # ... and use formail to send from the mbox + -bm -t < mbox # ... using sendmail +</pre> +<p>Before using this command, you will need to enable email in your +hgrc. See the [email] section in hgrc(5) for details.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-g</span>, <span class="option">--git</span></kbd></td> +<td>use git extended diff format</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--plain</span></kbd></td> +<td>omit hg patch header</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-o</span>, <span class="option">--outgoing</span></kbd></td> +<td>send changes not found in the target repository</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-b</span>, <span class="option">--bundle</span></kbd></td> +<td>send changes not in target as a binary bundle</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--bundlename</span></kbd></td> +<td>name of the bundle attachment file (default: bundle)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>a revision to send</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--force</span></kbd></td> +<td>run even when remote repository is unrelated (with -b/--bundle)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--base</span></kbd></td> +<td>a base changeset to specify instead of a destination (with -b/--bundle)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--intro</span></kbd></td> +<td>send an introduction email for a single patch</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--body</span></kbd></td> +<td>send patches as inline message text (default)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--attach</span></kbd></td> +<td>send patches as attachments</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-i</span>, <span class="option">--inline</span></kbd></td> +<td>send patches as inline attachments</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--bcc</span></kbd></td> +<td>email addresses of blind carbon copy recipients</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-c</span>, <span class="option">--cc</span></kbd></td> +<td>email addresses of copy recipients</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--confirm</span></kbd></td> +<td>ask for confirmation before sending</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--diffstat</span></kbd></td> +<td>add diffstat output to messages</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--date</span></kbd></td> +<td>use the given date as the sending date</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--desc</span></kbd></td> +<td>use the given file as the series description</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-f</span>, <span class="option">--from</span></kbd></td> +<td>email address of sender</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-n</span>, <span class="option">--test</span></kbd></td> +<td>print messages that would be sent</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--mbox</span></kbd></td> +<td>write messages to mbox file instead of sending them</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--reply-to</span></kbd></td> +<td>email addresses replies should be sent to</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-s</span>, <span class="option">--subject</span></kbd></td> +<td>subject of first message (intro or single patch)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--in-reply-to</span></kbd></td> +<td>message identifier to reply to</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--flag</span></kbd></td> +<td>flags to add in subject prefixes</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-t</span>, <span class="option">--to</span></kbd></td> +<td>email addresses of recipients</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--ssh</span></kbd></td> +<td>specify ssh command to use</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--remotecmd</span></kbd></td> +<td>specify hg command to run on the remote side</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--insecure</span></kbd></td> +<td>do not verify server certificate (ignoring web.cacerts config)</td></tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="section" id="progress"> +<h2><a class="toc-backref" href="#id92">progress</a></h2> +<p>show progress bars for some actions</p> +<p>This extension uses the progress information logged by hg commands +to draw progress bars that are as informative as possible. Some progress +bars only offer indeterminate information, while others have a definite +end point.</p> +<p>The following settings are available:</p> +<pre class="literal-block"> +[progress] +delay = 3 # number of seconds (float) before showing the progress bar +changedelay = 1 # changedelay: minimum delay before showing a new topic. + # If set to less than 3 * refresh, that value will + # be used instead. +refresh = 0.1 # time in seconds between refreshes of the progress bar +format = topic bar number estimate # format of the progress bar +width = <none> # if set, the maximum width of the progress information + # (that is, min(width, term width) will be used) +clear-complete = True # clear the progress bar after it's done +disable = False # if true, don't show a progress bar +assume-tty = False # if true, ALWAYS show a progress bar, unless + # disable is given +</pre> +<p>Valid entries for the format field are topic, bar, number, unit, +estimate, speed, and item. item defaults to the last 20 characters of +the item, but this can be changed by adding either <tt class="docutils literal"><span class="pre">-<num></span></tt> which +would take the last num characters, or <tt class="docutils literal">+<num></tt> for the first num +characters.</p> +</div> +<div class="section" id="purge"> +<h2><a class="toc-backref" href="#id93">purge</a></h2> +<p>command to delete untracked files from the working directory</p> +<div class="section" id="id27"> +<h3>Commands</h3> +<div class="section" id="id28"> +<h4>purge</h4> +<pre class="literal-block"> +hg purge [OPTION]... [DIR]... +</pre> +<p>Delete files not known to Mercurial. This is useful to test local +and uncommitted changes in an otherwise-clean source tree.</p> +<p>This means that purge will delete:</p> +<ul class="simple"> +<li>Unknown files: files marked with "?" by <a class="reference external" href="hg.1.html#status"><tt class="docutils literal">hg status</tt></a></li> +<li>Empty directories: in fact Mercurial ignores directories unless +they contain files under source control management</li> +</ul> +<p>But it will leave untouched:</p> +<ul class="simple"> +<li>Modified and unmodified tracked files</li> +<li>Ignored files (unless --all is specified)</li> +<li>New files added to the repository (with <a class="reference external" href="hg.1.html#add"><tt class="docutils literal">hg add</tt></a>)</li> +</ul> +<p>If directories are given on the command line, only files in these +directories are considered.</p> +<p>Be careful with purge, as you could irreversibly delete some files +you forgot to add to the repository. If you only want to print the +list of files that this program would delete, use the --print +option.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-a</span>, <span class="option">--abort-on-err</span></kbd></td> +</tr> +<tr><td> </td><td>abort if an error occurs</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--all</span></kbd></td> +<td>purge ignored files too</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-p</span>, <span class="option">--print</span></kbd></td> +<td>print filenames instead of deleting them</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-0</span>, <span class="option">--print0</span></kbd></td> +<td>end filenames with NUL, for use with xargs (implies -p/--print)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td><p class="first">exclude names matching the given patterns</p> +<p class="last">aliases: clean</p> +</td></tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="section" id="rebase"> +<h2><a class="toc-backref" href="#id94">rebase</a></h2> +<p>command to move sets of revisions to a different ancestor</p> +<p>This extension lets you rebase changesets in an existing Mercurial +repository.</p> +<p>For more information: +<a class="reference external" href="http://mercurial.selenic.com/wiki/RebaseExtension">http://mercurial.selenic.com/wiki/RebaseExtension</a></p> +<div class="section" id="id29"> +<h3>Commands</h3> +<div class="section" id="id30"> +<h4>rebase</h4> +<pre class="literal-block"> +hg rebase [-s REV | -b REV] [-d REV] [OPTION] +</pre> +<p>Rebase uses repeated merging to graft changesets from one part of +history (the source) onto another (the destination). This can be +useful for linearizing <em>local</em> changes relative to a master +development tree.</p> +<p>You should not rebase changesets that have already been shared +with others. Doing so will force everybody else to perform the +same rebase or they will end up with duplicated changesets after +pulling in your rebased changesets.</p> +<p>If you don't specify a destination changeset (<tt class="docutils literal"><span class="pre">-d/--dest</span></tt>), +rebase uses the tipmost head of the current named branch as the +destination. (The destination changeset is not modified by +rebasing, but new changesets are added as its descendants.)</p> +<p>You can specify which changesets to rebase in two ways: as a +"source" changeset or as a "base" changeset. Both are shorthand +for a topologically related set of changesets (the "source +branch"). If you specify source (<tt class="docutils literal"><span class="pre">-s/--source</span></tt>), rebase will +rebase that changeset and all of its descendants onto dest. If you +specify base (<tt class="docutils literal"><span class="pre">-b/--base</span></tt>), rebase will select ancestors of base +back to but not including the common ancestor with dest. Thus, +<tt class="docutils literal"><span class="pre">-b</span></tt> is less precise but more convenient than <tt class="docutils literal"><span class="pre">-s</span></tt>: you can +specify any changeset in the source branch, and rebase will select +the whole branch. If you specify neither <tt class="docutils literal"><span class="pre">-s</span></tt> nor <tt class="docutils literal"><span class="pre">-b</span></tt>, rebase +uses the parent of the working directory as the base.</p> +<p>By default, rebase recreates the changesets in the source branch +as descendants of dest and then destroys the originals. Use +<tt class="docutils literal"><span class="pre">--keep</span></tt> to preserve the original source changesets. Some +changesets in the source branch (e.g. merges from the destination +branch) may be dropped if they no longer contribute any change.</p> +<p>One result of the rules for selecting the destination changeset +and source branch is that, unlike <tt class="docutils literal">merge</tt>, rebase will do +nothing if you are at the latest (tipmost) head of a named branch +with two heads. You need to explicitly specify source and/or +destination (or <tt class="docutils literal">update</tt> to the other head, if it's the head of +the intended source branch).</p> +<p>If a rebase is interrupted to manually resolve a merge, it can be +continued with --continue/-c or aborted with --abort/-a.</p> +<p>Returns 0 on success, 1 if nothing to rebase.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-s</span>, <span class="option">--source</span></kbd></td> +<td>rebase from the specified changeset</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-b</span>, <span class="option">--base</span></kbd></td> +<td>rebase from the base of the specified changeset (up to greatest common ancestor of base and dest)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-r</span>, <span class="option">--rev</span></kbd></td> +<td>rebase these revisions</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--dest</span></kbd></td> +<td>rebase onto the specified changeset</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--collapse</span></kbd></td> +<td>collapse the rebased changesets</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--message</span></kbd></td> +<td>use text as collapse commit message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--edit</span></kbd></td> +<td>invoke editor on commit messages</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--logfile</span></kbd></td> +<td>read collapse commit message from file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--keep</span></kbd></td> +<td>keep original changesets</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--keepbranches</span></kbd></td> +<td>keep original branch names</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-D</span>, <span class="option">--detach</span></kbd></td> +<td>(DEPRECATED)</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-t</span>, <span class="option">--tool</span></kbd></td> +<td>specify merge tool</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-c</span>, <span class="option">--continue</span></kbd></td> +<td>continue an interrupted rebase</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--abort</span></kbd></td> +<td>abort an interrupted rebase</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--style</span></kbd></td> +<td>display using template map file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--template</span></kbd></td> +<td>display with template</td></tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="section" id="record"> +<h2><a class="toc-backref" href="#id95">record</a></h2> +<p>commands to interactively select changes for commit/qrefresh</p> +<div class="section" id="id31"> +<h3>Commands</h3> +<div class="section" id="qrecord"> +<h4>qrecord</h4> +<pre class="literal-block"> +hg qrecord [OPTION]... PATCH [FILE]... +</pre> +<p>See <a class="reference external" href="hg.1.html#qnew"><tt class="docutils literal">hg help qnew</tt></a> & <a class="reference external" href="hg.1.html#record"><tt class="docutils literal">hg help record</tt></a> for more information and +usage.</p> +</div> +<div class="section" id="id32"> +<h4>record</h4> +<pre class="literal-block"> +hg record [OPTION]... [FILE]... +</pre> +<p>If a list of files is omitted, all changes reported by <a class="reference external" href="hg.1.html#status"><tt class="docutils literal">hg status</tt></a> +will be candidates for recording.</p> +<p>See <a class="reference external" href="hg.1.html#dates"><tt class="docutils literal">hg help dates</tt></a> for a list of formats valid for -d/--date.</p> +<p>You will be prompted for whether to record changes to each +modified file, and for files with multiple changes, for each +change to use. For each query, the following responses are +possible:</p> +<pre class="literal-block"> +y - record this change +n - skip this change +e - edit this change manually + +s - skip remaining changes to this file +f - record remaining changes to this file + +d - done, skip remaining changes and files +a - record all changes to all remaining files +q - quit, recording no changes + +? - display help +</pre> +<p>This command is not available when committing a merge.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-A</span>, <span class="option">--addremove</span></kbd></td> +</tr> +<tr><td> </td><td>mark new/missing files as added/removed before committing</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--close-branch</span></kbd></td> +<td>mark a branch as closed, hiding it from the branch list</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--amend</span></kbd></td> +<td>amend the parent of the working dir</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-I</span>, <span class="option">--include</span></kbd></td> +<td>include names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-X</span>, <span class="option">--exclude</span></kbd></td> +<td>exclude names matching the given patterns</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--message</span></kbd></td> +<td>use text as commit message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-l</span>, <span class="option">--logfile</span></kbd></td> +<td>read commit message from file</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-d</span>, <span class="option">--date</span></kbd></td> +<td>record the specified date as commit date</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-u</span>, <span class="option">--user</span></kbd></td> +<td>record the specified user as committer</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-S</span>, <span class="option">--subrepos</span></kbd></td> +<td>recurse into subrepositories</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-w</span>, <span class="option">--ignore-all-space</span></kbd></td> +</tr> +<tr><td> </td><td>ignore white space when comparing lines</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-b</span>, <span class="option">--ignore-space-change</span></kbd></td> +</tr> +<tr><td> </td><td>ignore changes in the amount of white space</td></tr> +<tr><td class="option-group" colspan="2"> +<kbd><span class="option">-B</span>, <span class="option">--ignore-blank-lines</span></kbd></td> +</tr> +<tr><td> </td><td>ignore changes whose lines are all blank</td></tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="section" id="relink"> +<h2><a class="toc-backref" href="#id96">relink</a></h2> +<p>recreates hardlinks between repository clones</p> +<div class="section" id="id33"> +<h3>Commands</h3> +<div class="section" id="id34"> +<h4>relink</h4> +<pre class="literal-block"> +hg relink [ORIGIN] +</pre> +<p>When repositories are cloned locally, their data files will be +hardlinked so that they only use the space of a single repository.</p> +<p>Unfortunately, subsequent pulls into either repository will break +hardlinks for any files touched by the new changesets, even if +both repositories end up pulling the same changes.</p> +<p>Similarly, passing --rev to "hg clone" will fail to use any +hardlinks, falling back to a complete copy of the source +repository.</p> +<p>This command lets you recreate those hardlinks and reclaim that +wasted space.</p> +<p>This repository will be relinked to share space with ORIGIN, which +must be on the same local disk. If ORIGIN is omitted, looks for +"default-relink", then "default", in [paths].</p> +<p>Do not attempt any read operations on this repository while the +command is running. (Both repositories will be locked against +writes.)</p> +</div> +</div> +</div> +<div class="section" id="schemes"> +<h2><a class="toc-backref" href="#id97">schemes</a></h2> +<p>extend schemes with shortcuts to repository swarms</p> +<p>This extension allows you to specify shortcuts for parent URLs with a +lot of repositories to act like a scheme, for example:</p> +<pre class="literal-block"> +[schemes] +py = http://code.python.org/hg/ +</pre> +<p>After that you can use it like:</p> +<pre class="literal-block"> +hg clone py://trunk/ +</pre> +<p>Additionally there is support for some more complex schemas, for +example used by Google Code:</p> +<pre class="literal-block"> +[schemes] +gcode = http://{1}.googlecode.com/hg/ +</pre> +<p>The syntax is taken from Mercurial templates, and you have unlimited +number of variables, starting with <tt class="docutils literal">{1}</tt> and continuing with +<tt class="docutils literal">{2}</tt>, <tt class="docutils literal">{3}</tt> and so on. This variables will receive parts of URL +supplied, split by <tt class="docutils literal">/</tt>. Anything not specified as <tt class="docutils literal">{part}</tt> will be +just appended to an URL.</p> +<p>For convenience, the extension adds these schemes by default:</p> +<pre class="literal-block"> +[schemes] +py = http://hg.python.org/ +bb = https://bitbucket.org/ +bb+ssh = ssh://hg@bitbucket.org/ +gcode = https://{1}.googlecode.com/hg/ +kiln = https://{1}.kilnhg.com/Repo/ +</pre> +<p>You can override a predefined scheme by defining a new scheme with the +same name.</p> +</div> +<div class="section" id="share"> +<h2><a class="toc-backref" href="#id98">share</a></h2> +<p>share a common history between several working directories</p> +<div class="section" id="id35"> +<h3>Commands</h3> +<div class="section" id="id36"> +<h4>share</h4> +<pre class="literal-block"> +hg share [-U] SOURCE [DEST] +</pre> +<p>Initialize a new repository and working directory that shares its +history with another repository.</p> +<div class="note"> +<p class="first admonition-title">Note</p> +<p class="last">using rollback or extensions that destroy/modify history (mq, +rebase, etc.) can cause considerable confusion with shared +clones. In particular, if two shared clones are both updated to +the same changeset, and one of them destroys that changeset +with rollback, the other clone will suddenly stop working: all +operations will fail with "abort: working directory has unknown +parent". The only known workaround is to use debugsetparents on +the broken clone to reset it to a changeset that still exists +(e.g. tip).</p> +</div> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-U</span>, <span class="option">--noupdate</span></kbd></td> +<td>do not create a working copy</td></tr> +</tbody> +</table> +</div> +<div class="section" id="unshare"> +<h4>unshare</h4> +<pre class="literal-block"> +hg unshare +</pre> +<p>Copy the store data to the repo and remove the sharedpath data.</p> +</div> +</div> +</div> +<div class="section" id="transplant"> +<h2><a class="toc-backref" href="#id99">transplant</a></h2> +<p>command to transplant changesets from another branch</p> +<p>This extension allows you to transplant patches from another branch.</p> +<p>Transplanted patches are recorded in .hg/transplant/transplants, as a +map from a changeset hash to its hash in the source repository.</p> +<div class="section" id="id37"> +<h3>Commands</h3> +<div class="section" id="id38"> +<h4>transplant</h4> +<pre class="literal-block"> +hg transplant [-s REPO] [-b BRANCH [-a]] [-p REV] [-m REV] [REV]... +</pre> +<p>Selected changesets will be applied on top of the current working +directory with the log of the original changeset. The changesets +are copied and will thus appear twice in the history. Use the +rebase extension instead if you want to move a whole branch of +unpublished changesets.</p> +<p>If --log is specified, log messages will have a comment appended +of the form:</p> +<pre class="literal-block"> +(transplanted from CHANGESETHASH) +</pre> +<p>You can rewrite the changelog message with the --filter option. +Its argument will be invoked with the current changelog message as +$1 and the patch as $2.</p> +<p>If --source/-s is specified, selects changesets from the named +repository. If --branch/-b is specified, selects changesets from +the branch holding the named revision, up to that revision. If +--all/-a is specified, all changesets on the branch will be +transplanted, otherwise you will be prompted to select the +changesets you want.</p> +<p><a class="reference external" href="hg.1.html#transplant"><tt class="docutils literal">hg transplant <span class="pre">--branch</span> REV <span class="pre">--all</span></tt></a> will transplant the +selected branch (up to the named revision) onto your current +working directory.</p> +<p>You can optionally mark selected transplanted changesets as merge +changesets. You will not be prompted to transplant any ancestors +of a merged transplant, and you can merge descendants of them +normally instead of transplanting them.</p> +<p>Merge changesets may be transplanted directly by specifying the +proper parent changeset by calling <a class="reference external" href="hg.1.html#transplant"><tt class="docutils literal">hg transplant <span class="pre">--parent</span></tt></a>.</p> +<p>If no merges or revisions are provided, <a class="reference external" href="hg.1.html#transplant"><tt class="docutils literal">hg transplant</tt></a> will +start an interactive changeset browser.</p> +<p>If a changeset application fails, you can fix the merge by hand +and then resume where you left off by calling <a class="reference external" href="hg.1.html#transplant"><tt class="docutils literal">hg transplant +<span class="pre">--continue/-c</span></tt></a>.</p> +<p>Options:</p> +<table class="docutils option-list" frame="void" rules="none"> +<col class="option" /> +<col class="description" /> +<tbody valign="top"> +<tr><td class="option-group"> +<kbd><span class="option">-s</span>, <span class="option">--source</span></kbd></td> +<td>pull patches from REPO</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-b</span>, <span class="option">--branch</span></kbd></td> +<td>pull patches from branch BRANCH</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-a</span>, <span class="option">--all</span></kbd></td> +<td>pull all changesets up to BRANCH</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-p</span>, <span class="option">--prune</span></kbd></td> +<td>skip over REV</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-m</span>, <span class="option">--merge</span></kbd></td> +<td>merge at REV</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--parent</span></kbd></td> +<td>parent to choose when transplanting merge</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-e</span>, <span class="option">--edit</span></kbd></td> +<td>invoke editor on commit messages</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--log</span></kbd></td> +<td>append transplant info to log message</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">-c</span>, <span class="option">--continue</span></kbd></td> +<td>continue last transplant session after repair</td></tr> +<tr><td class="option-group"> +<kbd><span class="option">--filter</span></kbd></td> +<td>filter changesets through command</td></tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="section" id="win32mbcs"> +<h2><a class="toc-backref" href="#id100">win32mbcs</a></h2> +<p>allow the use of MBCS paths with problematic encodings</p> +<p>Some MBCS encodings are not good for some path operations (i.e. +splitting path, case conversion, etc.) with its encoded bytes. We call +such a encoding (i.e. shift_jis and big5) as "problematic encoding". +This extension can be used to fix the issue with those encodings by +wrapping some functions to convert to Unicode string before path +operation.</p> +<p>This extension is useful for:</p> +<ul class="simple"> +<li>Japanese Windows users using shift_jis encoding.</li> +<li>Chinese Windows users using big5 encoding.</li> +<li>All users who use a repository with one of problematic encodings on +case-insensitive file system.</li> +</ul> +<p>This extension is not needed for:</p> +<ul class="simple"> +<li>Any user who use only ASCII chars in path.</li> +<li>Any user who do not use any of problematic encodings.</li> +</ul> +<p>Note that there are some limitations on using this extension:</p> +<ul class="simple"> +<li>You should use single encoding in one repository.</li> +<li>If the repository path ends with 0x5c, .hg/hgrc cannot be read.</li> +<li>win32mbcs is not compatible with fixutf8 extension.</li> +</ul> +<p>By default, win32mbcs uses encoding.encoding decided by Mercurial. +You can specify the encoding by config option:</p> +<pre class="literal-block"> +[win32mbcs] +encoding = sjis +</pre> +<p>It is useful for the users who want to commit with UTF-8 log message.</p> +</div> +<div class="section" id="win32text"> +<h2><a class="toc-backref" href="#id101">win32text</a></h2> +<p>perform automatic newline conversion</p> +<blockquote> +<p>Deprecation: The win32text extension requires each user to configure +the extension again and again for each clone since the configuration +is not copied when cloning.</p> +<p>We have therefore made the <tt class="docutils literal">eol</tt> as an alternative. The <tt class="docutils literal">eol</tt> +uses a version controlled file for its configuration and each clone +will therefore use the right settings from the start.</p> +</blockquote> +<p>To perform automatic newline conversion, use:</p> +<pre class="literal-block"> +[extensions] +win32text = +[encode] +** = cleverencode: +# or ** = macencode: + +[decode] +** = cleverdecode: +# or ** = macdecode: +</pre> +<p>If not doing conversion, to make sure you do not commit CRLF/CR by accident:</p> +<pre class="literal-block"> +[hooks] +pretxncommit.crlf = python:hgext.win32text.forbidcrlf +# or pretxncommit.cr = python:hgext.win32text.forbidcr +</pre> +<p>To do the same check on a server to prevent CRLF/CR from being +pushed or pulled:</p> +<pre class="literal-block"> +[hooks] +pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf +# or pretxnchangegroup.cr = python:hgext.win32text.forbidcr +</pre> +</div> +<div class="section" id="zeroconf"> +<h2><a class="toc-backref" href="#id102">zeroconf</a></h2> +<p>discover and advertise repositories on the local network</p> +<p>Zeroconf-enabled repositories will be announced in a network without +the need to configure a server or a service. They can be discovered +without knowing their actual IP address.</p> +<p>To allow other people to discover your repository using run +<a class="reference external" href="hg.1.html#serve"><tt class="docutils literal">hg serve</tt></a> in your repository:</p> +<pre class="literal-block"> +$ cd test +$ hg serve +</pre> +<p>You can discover Zeroconf-enabled repositories by running +<a class="reference external" href="hg.1.html#paths"><tt class="docutils literal">hg paths</tt></a>:</p> +<pre class="literal-block"> +$ hg paths +zc-test = http://example.com:8000/test +</pre> +</div> +</div> +<div class="section" id="files"> +<h1><a class="toc-backref" href="#contents">Files</a></h1> +<dl class="docutils"> +<dt><tt class="docutils literal">/etc/mercurial/hgrc</tt>, <tt class="docutils literal"><span class="pre">$HOME/.hgrc</span></tt>, <tt class="docutils literal">.hg/hgrc</tt></dt> +<dd>This file contains defaults and configuration. Values in +<tt class="docutils literal">.hg/hgrc</tt> override those in <tt class="docutils literal"><span class="pre">$HOME/.hgrc</span></tt>, and these override +settings made in the global <tt class="docutils literal">/etc/mercurial/hgrc</tt> configuration. +See <a class="reference external" href="hgrc.5.html"><strong>hgrc</strong>(5)</a> for details of the contents and format of these +files.</dd> +<dt><tt class="docutils literal">.hgignore</tt></dt> +<dd>This file contains regular expressions (one per line) that +describe file names that should be ignored by <strong>hg</strong>. For details, +see <a class="reference external" href="hgignore.5.html"><strong>hgignore</strong>(5)</a>.</dd> +<dt><tt class="docutils literal">.hgsub</tt></dt> +<dd>This file defines the locations of all subrepositories, and +tells where the subrepository checkouts came from. For details, see +<a class="reference external" href="hg.1.html#subrepos"><tt class="docutils literal">hg help subrepos</tt></a>.</dd> +<dt><tt class="docutils literal">.hgsubstate</tt></dt> +<dd>This file is where Mercurial stores all nested repository states. <em>NB: This +file should not be edited manually.</em></dd> +<dt><tt class="docutils literal">.hgtags</tt></dt> +<dd>This file contains changeset hash values and text tag names (one +of each separated by spaces) that correspond to tagged versions of +the repository contents. The file content is encoded using UTF-8.</dd> +<dt><tt class="docutils literal"><span class="pre">.hg/last-message.txt</span></tt></dt> +<dd>This file is used by <a class="reference external" href="hg.1.html#commit"><tt class="docutils literal">hg commit</tt></a> to store a backup of the commit message +in case the commit fails.</dd> +<dt><tt class="docutils literal">.hg/localtags</tt></dt> +<dd>This file can be used to define local tags which are not shared among +repositories. The file format is the same as for <tt class="docutils literal">.hgtags</tt>, but it is +encoded using the local system encoding.</dd> +</dl> +<p>Some commands (e.g. revert) produce backup files ending in <tt class="docutils literal">.orig</tt>, +if the <tt class="docutils literal">.orig</tt> file already exists and is not tracked by Mercurial, +it will be overwritten.</p> +</div> +<div class="section" id="bugs"> +<h1><a class="toc-backref" href="#contents">Bugs</a></h1> +<p>Probably lots, please post them to the mailing list (see <a class="reference internal" href="#resources">Resources</a> +below) when you find them.</p> +</div> +<div class="section" id="see-also"> +<h1><a class="toc-backref" href="#contents">See Also</a></h1> +<p><a class="reference external" href="hgignore.5.html"><strong>hgignore</strong>(5)</a>, <a class="reference external" href="hgrc.5.html"><strong>hgrc</strong>(5)</a></p> +</div> +<div class="section" id="author"> +<h1><a class="toc-backref" href="#contents">Author</a></h1> +<p>Written by Matt Mackall <<a class="reference external" href="mailto:mpm@selenic.com">mpm@selenic.com</a>></p> +</div> +<div class="section" id="resources"> +<h1><a class="toc-backref" href="#contents">Resources</a></h1> +<p>Main Web Site: <a class="reference external" href="http://mercurial.selenic.com/">http://mercurial.selenic.com/</a></p> +<p>Source code repository: <a class="reference external" href="http://selenic.com/hg">http://selenic.com/hg</a></p> +<p>Mailing list: <a class="reference external" href="http://selenic.com/mailman/listinfo/mercurial">http://selenic.com/mailman/listinfo/mercurial</a></p> +</div> +<div class="section" id="copying"> +<h1><a class="toc-backref" href="#contents">Copying</a></h1> +<p>Copyright (C) 2005-2012 Matt Mackall. +Free use of this software is granted under the terms of the GNU General +Public License version 2 or any later version.</p> +<!-- Common link and substitution definitions. --> +</div> +</div> +</body> +</html> |