| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 6 |
<meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" /> |
| 7 |
<title>hg pull</title> |
| 8 |
<link rel="stylesheet" href="../style.css" type="text/css" /> |
| 9 |
</head> |
| 10 |
<body> |
| 11 |
<div class="document" id="hg-pull"> |
| 12 |
<span id="hg-pull-1"></span> |
| 13 |
<h1 class="title">hg pull</h1> |
| 14 |
<h2 class="subtitle" id="pull-changes-from-the-specified-source">pull changes from the specified source</h2> |
| 15 |
|
| 16 |
<div class="contents htmlonly topic" id="contents"> |
| 17 |
<p class="topic-title"><a class="reference internal" href="#top">Contents</a></p> |
| 18 |
<ul class="simple"> |
| 19 |
<li><a class="reference internal" href="#synopsis" id="toc-entry-1">Synopsis</a></li> |
| 20 |
<li><a class="reference internal" href="#description" id="toc-entry-2">Description</a></li> |
| 21 |
<li><a class="reference internal" href="#options" id="toc-entry-3">Options</a></li> |
| 22 |
</ul> |
| 23 |
</div> |
| 24 |
<div class="section" id="synopsis"> |
| 25 |
<h1><a class="toc-backref" href="#contents">Synopsis</a></h1> |
| 26 |
<pre class="literal-block"> |
| 27 |
hg pull [-u] [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [SOURCE]... |
| 28 |
</pre> |
| 29 |
</div> |
| 30 |
<div class="section" id="description"> |
| 31 |
<h1><a class="toc-backref" href="#contents">Description</a></h1> |
| 32 |
<p>Pull changes from a remote repository to a local one.</p> |
| 33 |
<p>This finds all changes from the repository at the specified path |
| 34 |
or URL and adds them to a local repository (the current one unless |
| 35 |
-R is specified). By default, this does not update the copy of the |
| 36 |
project in the working directory.</p> |
| 37 |
<p>When cloning from servers that support it, Mercurial may fetch |
| 38 |
pre-generated data. When this is done, hooks operating on incoming |
| 39 |
changesets and changegroups may fire more than once, once for each |
| 40 |
pre-generated bundle and as well as for any additional remaining |
| 41 |
data. See <a class="reference external" href="hg.1.html#-e"><tt class="docutils literal">hg help <span class="pre">-e</span> clonebundles</tt></a> for more.</p> |
| 42 |
<p>Use <a class="reference external" href="hg-incoming.html"><tt class="docutils literal">hg incoming</tt></a> if you want to see what would have been added |
| 43 |
by a pull at the time you issued this command. If you then decide |
| 44 |
to add those changes to the repository, you should use <a class="reference external" href="hg-pull.html"><tt class="docutils literal">hg pull |
| 45 |
<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-incoming.html"><tt class="docutils literal">hg incoming</tt></a>.</p> |
| 46 |
<p>If SOURCE is omitted, the 'default' path will be used. |
| 47 |
See <a class="reference external" href="topic-urls.html"><tt class="docutils literal">hg help urls</tt></a> for more information.</p> |
| 48 |
<p>If multiple sources are specified, they will be pulled sequentially as if |
| 49 |
the command was run multiple times. If --update is specified, the command |
| 50 |
will stop at the first failed --update.</p> |
| 51 |
<p>Specifying bookmark as <tt class="docutils literal">.</tt> is equivalent to specifying the active |
| 52 |
bookmark's name.</p> |
| 53 |
<div class="verbose docutils container"> |
| 54 |
One can use the <cite>--remote-hidden</cite> flag to pull changesets |
| 55 |
hidden on the remote. This flag is "best effort", and will only |
| 56 |
work if the server supports the feature and is configured to |
| 57 |
allow the user to access hidden changesets. This option is |
| 58 |
experimental and backwards compatibility is not guaranteed.</div> |
| 59 |
<p>Returns 0 on success, 1 if an update had unresolved files.</p> |
| 60 |
</div> |
| 61 |
<div class="section" id="options"> |
| 62 |
<h1><a class="toc-backref" href="#contents">Options</a></h1> |
| 63 |
<table class="docutils option-list" frame="void" rules="none"> |
| 64 |
<col class="option" /> |
| 65 |
<col class="description" /> |
| 66 |
<tbody valign="top"> |
| 67 |
<tr><td class="option-group"> |
| 68 |
<kbd><span class="option">-u</span>, <span class="option">--update</span></kbd></td> |
| 69 |
<td>update to new branch head if new descendants were pulled</td></tr> |
| 70 |
<tr><td class="option-group"> |
| 71 |
<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> |
| 72 |
<td>run even when remote repository is unrelated</td></tr> |
| 73 |
<tr><td class="option-group"> |
| 74 |
<kbd><span class="option">--confirm</span></kbd></td> |
| 75 |
<td>confirm pull before applying changes</td></tr> |
| 76 |
<tr><td class="option-group" colspan="2"> |
| 77 |
<kbd><span class="option">-r</span>, <span class="option">--rev <var><REV[+]></var></span></kbd></td> |
| 78 |
</tr> |
| 79 |
<tr><td> </td><td>a remote changeset intended to be added</td></tr> |
| 80 |
<tr><td class="option-group" colspan="2"> |
| 81 |
<kbd><span class="option">-B</span>, <span class="option">--bookmark <var><BOOKMARK[+]></var></span></kbd></td> |
| 82 |
</tr> |
| 83 |
<tr><td> </td><td>bookmark to pull</td></tr> |
| 84 |
<tr><td class="option-group" colspan="2"> |
| 85 |
<kbd><span class="option">-b</span>, <span class="option">--branch <var><BRANCH[+]></var></span></kbd></td> |
| 86 |
</tr> |
| 87 |
<tr><td> </td><td>a specific branch you would like to pull</td></tr> |
| 88 |
<tr><td class="option-group" colspan="2"> |
| 89 |
<kbd><span class="option">--remote-hidden</span></kbd></td> |
| 90 |
</tr> |
| 91 |
<tr><td> </td><td>include changesets hidden on the remote (EXPERIMENTAL)</td></tr> |
| 92 |
<tr><td class="option-group" colspan="2"> |
| 93 |
<kbd><span class="option">-e</span>, <span class="option">--ssh <var><CMD></var></span></kbd></td> |
| 94 |
</tr> |
| 95 |
<tr><td> </td><td>specify ssh command to use</td></tr> |
| 96 |
<tr><td class="option-group" colspan="2"> |
| 97 |
<kbd><span class="option">--remotecmd <var><CMD></var></span></kbd></td> |
| 98 |
</tr> |
| 99 |
<tr><td> </td><td>specify hg command to run on the remote side</td></tr> |
| 100 |
<tr><td class="option-group"> |
| 101 |
<kbd><span class="option">--insecure</span></kbd></td> |
| 102 |
<td>do not verify server certificate (ignoring web.cacerts config)</td></tr> |
| 103 |
</tbody> |
| 104 |
</table> |
| 105 |
<p>[+] marked option can be specified multiple times</p> |
| 106 |
</div> |
| 107 |
</div> |
| 108 |
</body> |
| 109 |
</html> |