| 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>mq</title> |
| 8 |
<link rel="stylesheet" href="../style.css" type="text/css" /> |
| 9 |
</head> |
| 10 |
<body> |
| 11 |
<div class="document" id="mq"> |
| 12 |
<span id="ext-mq"></span> |
| 13 |
<h1 class="title">mq</h1> |
| 14 |
|
| 15 |
<div class="contents htmlonly topic" id="contents"> |
| 16 |
<p class="topic-title"><a class="reference internal" href="#top">Contents</a></p> |
| 17 |
<ul class="simple"> |
| 18 |
<li><a class="reference internal" href="#description" id="toc-entry-1">Description</a></li> |
| 19 |
<li><a class="reference internal" href="#commands" id="toc-entry-2">Commands</a><ul> |
| 20 |
<li><a class="reference internal" href="#repository-creation" id="toc-entry-3">Repository creation</a></li> |
| 21 |
<li><a class="reference internal" href="#change-creation" id="toc-entry-4">Change creation</a></li> |
| 22 |
<li><a class="reference internal" href="#change-manipulation" id="toc-entry-5">Change manipulation</a></li> |
| 23 |
<li><a class="reference internal" href="#change-organization" id="toc-entry-6">Change organization</a></li> |
| 24 |
<li><a class="reference internal" href="#file-content-management" id="toc-entry-7">File content management</a></li> |
| 25 |
<li><a class="reference internal" href="#change-import-export" id="toc-entry-8">Change import/export</a></li> |
| 26 |
</ul> |
| 27 |
</li> |
| 28 |
</ul> |
| 29 |
</div> |
| 30 |
<p>manage a stack of patches</p> |
| 31 |
<div class="section" id="description"> |
| 32 |
<h1><a class="toc-backref" href="#contents">Description</a></h1> |
| 33 |
<p>This extension lets you work with a stack of patches in a Mercurial |
| 34 |
repository. It manages two stacks of patches - all known patches, and |
| 35 |
applied patches (subset of known patches).</p> |
| 36 |
<p>Known patches are represented as patch files in the .hg/patches |
| 37 |
directory. Applied patches are both patch files and changesets.</p> |
| 38 |
<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> |
| 39 |
<pre class="literal-block"> |
| 40 |
create new patch qnew |
| 41 |
import existing patch qimport |
| 42 |
|
| 43 |
print patch series qseries |
| 44 |
print applied patches qapplied |
| 45 |
|
| 46 |
add known patch to applied stack qpush |
| 47 |
remove patch from applied stack qpop |
| 48 |
refresh contents of top applied patch qrefresh |
| 49 |
</pre> |
| 50 |
<p>By default, mq will automatically use git patches when required to |
| 51 |
avoid losing file mode changes, copy records, binary files or empty |
| 52 |
files creations or deletions. This behavior can be configured with:</p> |
| 53 |
<pre class="literal-block"> |
| 54 |
[mq] |
| 55 |
git = auto/keep/yes/no |
| 56 |
</pre> |
| 57 |
<p>If set to 'keep', mq will obey the [diff] section configuration while |
| 58 |
preserving existing git patches upon qrefresh. If set to 'yes' or |
| 59 |
'no', mq will override the [diff] section and always generate git or |
| 60 |
regular patches, possibly losing data in the second case.</p> |
| 61 |
<p>It may be desirable for mq changesets to be kept in the secret phase (see |
| 62 |
<a class="reference external" href="topic-phases.html"><tt class="docutils literal">hg help phases</tt></a>), which can be enabled with the following setting:</p> |
| 63 |
<pre class="literal-block"> |
| 64 |
[mq] |
| 65 |
secret = True |
| 66 |
</pre> |
| 67 |
<p>You will by default be managing a patch queue named "patches". You can |
| 68 |
create other, independent patch queues with the <a class="reference external" href="hg-qqueue.html"><tt class="docutils literal">hg qqueue</tt></a> command.</p> |
| 69 |
<p>If the working directory contains uncommitted files, qpush, qpop and |
| 70 |
qgoto abort immediately. If -f/--force is used, the changes are |
| 71 |
discarded. Setting:</p> |
| 72 |
<pre class="literal-block"> |
| 73 |
[mq] |
| 74 |
keepchanges = True |
| 75 |
</pre> |
| 76 |
<p>make them behave as if --keep-changes were passed, and non-conflicting |
| 77 |
local changes will be tolerated and preserved. If incompatible options |
| 78 |
such as -f/--force or --exact are passed, this setting is ignored.</p> |
| 79 |
<p>This extension used to provide a strip command. This command now lives |
| 80 |
in the strip extension.</p> |
| 81 |
</div> |
| 82 |
<div class="section" id="commands"> |
| 83 |
<h1><a class="toc-backref" href="#contents">Commands</a></h1> |
| 84 |
<div class="section" id="repository-creation"> |
| 85 |
<h2><a class="toc-backref" href="#contents">Repository creation</a></h2> |
| 86 |
<div class="section" id="qclone"> |
| 87 |
<h3>qclone</h3> |
| 88 |
<p>clone main and patch repository at same time:</p> |
| 89 |
<pre class="literal-block"> |
| 90 |
hg qclone [OPTION]... SOURCE [DEST] |
| 91 |
</pre> |
| 92 |
<p>If source is local, destination will have no patches applied. If |
| 93 |
source is remote, this command can not check if patches are |
| 94 |
applied in source, so cannot guarantee that patches are not |
| 95 |
applied in destination. If you clone remote repository, be sure |
| 96 |
before that it has no patches applied.</p> |
| 97 |
<p>Source patch repository is looked for in <src>/.hg/patches by |
| 98 |
default. Use -p <url> to change.</p> |
| 99 |
<p>The patch directory must be a nested Mercurial repository, as |
| 100 |
would be created by <a class="reference external" href="hg-init.html"><tt class="docutils literal">hg init <span class="pre">--mq</span></tt></a>.</p> |
| 101 |
<p>Return 0 on success.</p> |
| 102 |
<p>Options:</p> |
| 103 |
<table class="docutils option-list" frame="void" rules="none"> |
| 104 |
<col class="option" /> |
| 105 |
<col class="description" /> |
| 106 |
<tbody valign="top"> |
| 107 |
<tr><td class="option-group"> |
| 108 |
<kbd><span class="option">--pull</span></kbd></td> |
| 109 |
<td>use pull protocol to copy metadata</td></tr> |
| 110 |
<tr><td class="option-group"> |
| 111 |
<kbd><span class="option">-U</span>, <span class="option">--noupdate</span></kbd></td> |
| 112 |
<td>do not update the new working directories</td></tr> |
| 113 |
<tr><td class="option-group"> |
| 114 |
<kbd><span class="option">--uncompressed</span></kbd></td> |
| 115 |
<td>use uncompressed transfer (fast over LAN)</td></tr> |
| 116 |
<tr><td class="option-group" colspan="2"> |
| 117 |
<kbd><span class="option">-p</span>, <span class="option">--patches <var><REPO></var></span></kbd></td> |
| 118 |
</tr> |
| 119 |
<tr><td> </td><td>location of source patch repository</td></tr> |
| 120 |
<tr><td class="option-group" colspan="2"> |
| 121 |
<kbd><span class="option">-e</span>, <span class="option">--ssh <var><CMD></var></span></kbd></td> |
| 122 |
</tr> |
| 123 |
<tr><td> </td><td>specify ssh command to use</td></tr> |
| 124 |
<tr><td class="option-group" colspan="2"> |
| 125 |
<kbd><span class="option">--remotecmd <var><CMD></var></span></kbd></td> |
| 126 |
</tr> |
| 127 |
<tr><td> </td><td>specify hg command to run on the remote side</td></tr> |
| 128 |
<tr><td class="option-group"> |
| 129 |
<kbd><span class="option">--insecure</span></kbd></td> |
| 130 |
<td>do not verify server certificate (ignoring web.cacerts config)</td></tr> |
| 131 |
</tbody> |
| 132 |
</table> |
| 133 |
</div> |
| 134 |
<div class="section" id="qinit"> |
| 135 |
<h3>qinit</h3> |
| 136 |
<p>init a new queue repository (DEPRECATED):</p> |
| 137 |
<pre class="literal-block"> |
| 138 |
hg qinit [-c] |
| 139 |
</pre> |
| 140 |
<p>The queue repository is unversioned by default. If |
| 141 |
-c/--create-repo is specified, qinit will create a separate nested |
| 142 |
repository for patches (qinit -c may also be run later to convert |
| 143 |
an unversioned patch repository into a versioned one). You can use |
| 144 |
qcommit to commit changes to this queue repository.</p> |
| 145 |
<p>This command is deprecated. Without -c, it's implied by other relevant |
| 146 |
commands. With -c, use <a class="reference external" href="hg-init.html"><tt class="docutils literal">hg init <span class="pre">--mq</span></tt></a> instead.</p> |
| 147 |
<p>Options:</p> |
| 148 |
<table class="docutils option-list" frame="void" rules="none"> |
| 149 |
<col class="option" /> |
| 150 |
<col class="description" /> |
| 151 |
<tbody valign="top"> |
| 152 |
<tr><td class="option-group" colspan="2"> |
| 153 |
<kbd><span class="option">-c</span>, <span class="option">--create-repo</span></kbd></td> |
| 154 |
</tr> |
| 155 |
<tr><td> </td><td>create queue repository</td></tr> |
| 156 |
</tbody> |
| 157 |
</table> |
| 158 |
</div> |
| 159 |
</div> |
| 160 |
<div class="section" id="change-creation"> |
| 161 |
<h2><a class="toc-backref" href="#contents">Change creation</a></h2> |
| 162 |
<div class="section" id="qcommit"> |
| 163 |
<h3>qcommit</h3> |
| 164 |
<p>commit changes in the queue repository (DEPRECATED):</p> |
| 165 |
<pre class="literal-block"> |
| 166 |
hg qcommit [OPTION]... [FILE]... |
| 167 |
</pre> |
| 168 |
<p>This command is deprecated; use <a class="reference external" href="hg-commit.html"><tt class="docutils literal">hg commit <span class="pre">--mq</span></tt></a> instead.</p> |
| 169 |
<p>Options:</p> |
| 170 |
<table class="docutils option-list" frame="void" rules="none"> |
| 171 |
<col class="option" /> |
| 172 |
<col class="description" /> |
| 173 |
<tbody valign="top"> |
| 174 |
<tr><td class="option-group" colspan="2"> |
| 175 |
<kbd><span class="option">-A</span>, <span class="option">--addremove</span></kbd></td> |
| 176 |
</tr> |
| 177 |
<tr><td> </td><td>mark new/missing files as added/removed before committing</td></tr> |
| 178 |
<tr><td class="option-group"> |
| 179 |
<kbd><span class="option">--close-branch</span></kbd></td> |
| 180 |
<td>mark a branch head as closed</td></tr> |
| 181 |
<tr><td class="option-group"> |
| 182 |
<kbd><span class="option">--amend</span></kbd></td> |
| 183 |
<td>amend the parent of the working directory</td></tr> |
| 184 |
<tr><td class="option-group"> |
| 185 |
<kbd><span class="option">-s</span>, <span class="option">--secret</span></kbd></td> |
| 186 |
<td>use the secret phase for committing</td></tr> |
| 187 |
<tr><td class="option-group"> |
| 188 |
<kbd><span class="option">--draft</span></kbd></td> |
| 189 |
<td>use the draft phase for committing</td></tr> |
| 190 |
<tr><td class="option-group"> |
| 191 |
<kbd><span class="option">-e</span>, <span class="option">--edit</span></kbd></td> |
| 192 |
<td>invoke editor on commit messages</td></tr> |
| 193 |
<tr><td class="option-group" colspan="2"> |
| 194 |
<kbd><span class="option">--force-close-branch</span></kbd></td> |
| 195 |
</tr> |
| 196 |
<tr><td> </td><td>forcibly close branch from a non-head changeset (ADVANCED)</td></tr> |
| 197 |
<tr><td class="option-group" colspan="2"> |
| 198 |
<kbd><span class="option">-i</span>, <span class="option">--interactive</span></kbd></td> |
| 199 |
</tr> |
| 200 |
<tr><td> </td><td>use interactive mode</td></tr> |
| 201 |
<tr><td class="option-group" colspan="2"> |
| 202 |
<kbd><span class="option">-I</span>, <span class="option">--include <var><PATTERN[+]></var></span></kbd></td> |
| 203 |
</tr> |
| 204 |
<tr><td> </td><td>include names matching the given patterns</td></tr> |
| 205 |
<tr><td class="option-group" colspan="2"> |
| 206 |
<kbd><span class="option">-X</span>, <span class="option">--exclude <var><PATTERN[+]></var></span></kbd></td> |
| 207 |
</tr> |
| 208 |
<tr><td> </td><td>exclude names matching the given patterns</td></tr> |
| 209 |
<tr><td class="option-group" colspan="2"> |
| 210 |
<kbd><span class="option">-m</span>, <span class="option">--message <var><TEXT></var></span></kbd></td> |
| 211 |
</tr> |
| 212 |
<tr><td> </td><td>use text as commit message</td></tr> |
| 213 |
<tr><td class="option-group" colspan="2"> |
| 214 |
<kbd><span class="option">-l</span>, <span class="option">--logfile <var><FILE></var></span></kbd></td> |
| 215 |
</tr> |
| 216 |
<tr><td> </td><td>read commit message from file</td></tr> |
| 217 |
<tr><td class="option-group" colspan="2"> |
| 218 |
<kbd><span class="option">-d</span>, <span class="option">--date <var><DATE></var></span></kbd></td> |
| 219 |
</tr> |
| 220 |
<tr><td> </td><td>record the specified date as commit date</td></tr> |
| 221 |
<tr><td class="option-group" colspan="2"> |
| 222 |
<kbd><span class="option">-u</span>, <span class="option">--user <var><USER></var></span></kbd></td> |
| 223 |
</tr> |
| 224 |
<tr><td> </td><td>record the specified user as committer</td></tr> |
| 225 |
<tr><td class="option-group"> |
| 226 |
<kbd><span class="option">-S</span>, <span class="option">--subrepos</span></kbd></td> |
| 227 |
<td>recurse into subrepositories</td></tr> |
| 228 |
</tbody> |
| 229 |
</table> |
| 230 |
<p>[+] marked option can be specified multiple times</p> |
| 231 |
<!-- --> |
| 232 |
<blockquote> |
| 233 |
aliases: qci</blockquote> |
| 234 |
</div> |
| 235 |
<div class="section" id="qnew"> |
| 236 |
<h3>qnew</h3> |
| 237 |
<p>create a new patch:</p> |
| 238 |
<pre class="literal-block"> |
| 239 |
hg qnew [-e] [-m TEXT] [-l FILE] PATCH [FILE]... |
| 240 |
</pre> |
| 241 |
<p>qnew creates a new patch on top of the currently-applied patch (if |
| 242 |
any). The patch will be initialized with any outstanding changes |
| 243 |
in the working directory. You may also use -I/--include, |
| 244 |
-X/--exclude, and/or a list of files after the patch name to add |
| 245 |
only changes to matching files to the new patch, leaving the rest |
| 246 |
as uncommitted modifications.</p> |
| 247 |
<p>-u/--user and -d/--date can be used to set the (given) user and |
| 248 |
date, respectively. -U/--currentuser and -D/--currentdate set user |
| 249 |
to current user and date to current date.</p> |
| 250 |
<p>-e/--edit, -m/--message or -l/--logfile set the patch header as |
| 251 |
well as the commit message. If none is specified, the header is |
| 252 |
empty and the commit message is '[mq]: PATCH'.</p> |
| 253 |
<p>Use the -g/--git option to keep the patch in the git extended diff |
| 254 |
format. Read the diffs help topic for more information on why this |
| 255 |
is important for preserving permission changes and copy/rename |
| 256 |
information.</p> |
| 257 |
<p>Returns 0 on successful creation of a new patch.</p> |
| 258 |
<p>Options:</p> |
| 259 |
<table class="docutils option-list" frame="void" rules="none"> |
| 260 |
<col class="option" /> |
| 261 |
<col class="description" /> |
| 262 |
<tbody valign="top"> |
| 263 |
<tr><td class="option-group"> |
| 264 |
<kbd><span class="option">-e</span>, <span class="option">--edit</span></kbd></td> |
| 265 |
<td>invoke editor on commit messages</td></tr> |
| 266 |
<tr><td class="option-group"> |
| 267 |
<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> |
| 268 |
<td>import uncommitted changes (DEPRECATED)</td></tr> |
| 269 |
<tr><td class="option-group"> |
| 270 |
<kbd><span class="option">-g</span>, <span class="option">--git</span></kbd></td> |
| 271 |
<td>use git extended diff format</td></tr> |
| 272 |
<tr><td class="option-group" colspan="2"> |
| 273 |
<kbd><span class="option">-U</span>, <span class="option">--currentuser</span></kbd></td> |
| 274 |
</tr> |
| 275 |
<tr><td> </td><td>add "From: <current user>" to patch</td></tr> |
| 276 |
<tr><td class="option-group" colspan="2"> |
| 277 |
<kbd><span class="option">-u</span>, <span class="option">--user <var><USER></var></span></kbd></td> |
| 278 |
</tr> |
| 279 |
<tr><td> </td><td>add "From: <USER>" to patch</td></tr> |
| 280 |
<tr><td class="option-group" colspan="2"> |
| 281 |
<kbd><span class="option">-D</span>, <span class="option">--currentdate</span></kbd></td> |
| 282 |
</tr> |
| 283 |
<tr><td> </td><td>add "Date: <current date>" to patch</td></tr> |
| 284 |
<tr><td class="option-group" colspan="2"> |
| 285 |
<kbd><span class="option">-d</span>, <span class="option">--date <var><DATE></var></span></kbd></td> |
| 286 |
</tr> |
| 287 |
<tr><td> </td><td>add "Date: <DATE>" to patch</td></tr> |
| 288 |
<tr><td class="option-group" colspan="2"> |
| 289 |
<kbd><span class="option">-I</span>, <span class="option">--include <var><PATTERN[+]></var></span></kbd></td> |
| 290 |
</tr> |
| 291 |
<tr><td> </td><td>include names matching the given patterns</td></tr> |
| 292 |
<tr><td class="option-group" colspan="2"> |
| 293 |
<kbd><span class="option">-X</span>, <span class="option">--exclude <var><PATTERN[+]></var></span></kbd></td> |
| 294 |
</tr> |
| 295 |
<tr><td> </td><td>exclude names matching the given patterns</td></tr> |
| 296 |
<tr><td class="option-group" colspan="2"> |
| 297 |
<kbd><span class="option">-m</span>, <span class="option">--message <var><TEXT></var></span></kbd></td> |
| 298 |
</tr> |
| 299 |
<tr><td> </td><td>use text as commit message</td></tr> |
| 300 |
<tr><td class="option-group" colspan="2"> |
| 301 |
<kbd><span class="option">-l</span>, <span class="option">--logfile <var><FILE></var></span></kbd></td> |
| 302 |
</tr> |
| 303 |
<tr><td> </td><td>read commit message from file</td></tr> |
| 304 |
</tbody> |
| 305 |
</table> |
| 306 |
<p>[+] marked option can be specified multiple times</p> |
| 307 |
</div> |
| 308 |
<div class="section" id="qrefresh"> |
| 309 |
<h3>qrefresh</h3> |
| 310 |
<p>update the current patch:</p> |
| 311 |
<pre class="literal-block"> |
| 312 |
hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]... |
| 313 |
</pre> |
| 314 |
<p>If any file patterns are provided, the refreshed patch will |
| 315 |
contain only the modifications that match those patterns; the |
| 316 |
remaining modifications will remain in the working directory.</p> |
| 317 |
<p>If -s/--short is specified, files currently included in the patch |
| 318 |
will be refreshed just like matched files and remain in the patch.</p> |
| 319 |
<p>If -e/--edit is specified, Mercurial will start your configured editor for |
| 320 |
you to enter a message. In case qrefresh fails, you will find a backup of |
| 321 |
your message in <tt class="docutils literal"><span class="pre">.hg/last-message.txt</span></tt>.</p> |
| 322 |
<p>hg add/remove/copy/rename work as usual, though you might want to |
| 323 |
use git-style patches (-g/--git or [diff] git=1) to track copies |
| 324 |
and renames. See the diffs help topic for more information on the |
| 325 |
git diff format.</p> |
| 326 |
<p>Returns 0 on success.</p> |
| 327 |
<p>Options:</p> |
| 328 |
<table class="docutils option-list" frame="void" rules="none"> |
| 329 |
<col class="option" /> |
| 330 |
<col class="description" /> |
| 331 |
<tbody valign="top"> |
| 332 |
<tr><td class="option-group"> |
| 333 |
<kbd><span class="option">-e</span>, <span class="option">--edit</span></kbd></td> |
| 334 |
<td>invoke editor on commit messages</td></tr> |
| 335 |
<tr><td class="option-group"> |
| 336 |
<kbd><span class="option">-g</span>, <span class="option">--git</span></kbd></td> |
| 337 |
<td>use git extended diff format</td></tr> |
| 338 |
<tr><td class="option-group"> |
| 339 |
<kbd><span class="option">-s</span>, <span class="option">--short</span></kbd></td> |
| 340 |
<td>refresh only files already in the patch and specified files</td></tr> |
| 341 |
<tr><td class="option-group" colspan="2"> |
| 342 |
<kbd><span class="option">-U</span>, <span class="option">--currentuser</span></kbd></td> |
| 343 |
</tr> |
| 344 |
<tr><td> </td><td>add/update author field in patch with current user</td></tr> |
| 345 |
<tr><td class="option-group" colspan="2"> |
| 346 |
<kbd><span class="option">-u</span>, <span class="option">--user <var><USER></var></span></kbd></td> |
| 347 |
</tr> |
| 348 |
<tr><td> </td><td>add/update author field in patch with given user</td></tr> |
| 349 |
<tr><td class="option-group" colspan="2"> |
| 350 |
<kbd><span class="option">-D</span>, <span class="option">--currentdate</span></kbd></td> |
| 351 |
</tr> |
| 352 |
<tr><td> </td><td>add/update date field in patch with current date</td></tr> |
| 353 |
<tr><td class="option-group" colspan="2"> |
| 354 |
<kbd><span class="option">-d</span>, <span class="option">--date <var><DATE></var></span></kbd></td> |
| 355 |
</tr> |
| 356 |
<tr><td> </td><td>add/update date field in patch with given date</td></tr> |
| 357 |
<tr><td class="option-group" colspan="2"> |
| 358 |
<kbd><span class="option">-I</span>, <span class="option">--include <var><PATTERN[+]></var></span></kbd></td> |
| 359 |
</tr> |
| 360 |
<tr><td> </td><td>include names matching the given patterns</td></tr> |
| 361 |
<tr><td class="option-group" colspan="2"> |
| 362 |
<kbd><span class="option">-X</span>, <span class="option">--exclude <var><PATTERN[+]></var></span></kbd></td> |
| 363 |
</tr> |
| 364 |
<tr><td> </td><td>exclude names matching the given patterns</td></tr> |
| 365 |
<tr><td class="option-group" colspan="2"> |
| 366 |
<kbd><span class="option">-m</span>, <span class="option">--message <var><TEXT></var></span></kbd></td> |
| 367 |
</tr> |
| 368 |
<tr><td> </td><td>use text as commit message</td></tr> |
| 369 |
<tr><td class="option-group" colspan="2"> |
| 370 |
<kbd><span class="option">-l</span>, <span class="option">--logfile <var><FILE></var></span></kbd></td> |
| 371 |
</tr> |
| 372 |
<tr><td> </td><td>read commit message from file</td></tr> |
| 373 |
</tbody> |
| 374 |
</table> |
| 375 |
<p>[+] marked option can be specified multiple times</p> |
| 376 |
</div> |
| 377 |
</div> |
| 378 |
<div class="section" id="change-manipulation"> |
| 379 |
<h2><a class="toc-backref" href="#contents">Change manipulation</a></h2> |
| 380 |
<div class="section" id="qfold"> |
| 381 |
<h3>qfold</h3> |
| 382 |
<p>fold the named patches into the current patch:</p> |
| 383 |
<pre class="literal-block"> |
| 384 |
hg qfold [-e] [-k] [-m TEXT] [-l FILE] PATCH... |
| 385 |
</pre> |
| 386 |
<p>Patches must not yet be applied. Each patch will be successively |
| 387 |
applied to the current patch in the order given. If all the |
| 388 |
patches apply successfully, the current patch will be refreshed |
| 389 |
with the new cumulative patch, and the folded patches will be |
| 390 |
deleted. With -k/--keep, the folded patch files will not be |
| 391 |
removed afterwards.</p> |
| 392 |
<p>The header for each folded patch will be concatenated with the |
| 393 |
current patch header, separated by a line of <tt class="docutils literal">* * *</tt>.</p> |
| 394 |
<p>Returns 0 on success.</p> |
| 395 |
<p>Options:</p> |
| 396 |
<table class="docutils option-list" frame="void" rules="none"> |
| 397 |
<col class="option" /> |
| 398 |
<col class="description" /> |
| 399 |
<tbody valign="top"> |
| 400 |
<tr><td class="option-group"> |
| 401 |
<kbd><span class="option">-e</span>, <span class="option">--edit</span></kbd></td> |
| 402 |
<td>invoke editor on commit messages</td></tr> |
| 403 |
<tr><td class="option-group"> |
| 404 |
<kbd><span class="option">-k</span>, <span class="option">--keep</span></kbd></td> |
| 405 |
<td>keep folded patch files</td></tr> |
| 406 |
<tr><td class="option-group" colspan="2"> |
| 407 |
<kbd><span class="option">-m</span>, <span class="option">--message <var><TEXT></var></span></kbd></td> |
| 408 |
</tr> |
| 409 |
<tr><td> </td><td>use text as commit message</td></tr> |
| 410 |
<tr><td class="option-group" colspan="2"> |
| 411 |
<kbd><span class="option">-l</span>, <span class="option">--logfile <var><FILE></var></span></kbd></td> |
| 412 |
</tr> |
| 413 |
<tr><td> </td><td>read commit message from file</td></tr> |
| 414 |
</tbody> |
| 415 |
</table> |
| 416 |
</div> |
| 417 |
</div> |
| 418 |
<div class="section" id="change-organization"> |
| 419 |
<h2><a class="toc-backref" href="#contents">Change organization</a></h2> |
| 420 |
<div class="section" id="qapplied"> |
| 421 |
<h3>qapplied</h3> |
| 422 |
<p>print the patches already applied:</p> |
| 423 |
<pre class="literal-block"> |
| 424 |
hg qapplied [-1] [-s] [PATCH] |
| 425 |
</pre> |
| 426 |
<p>Returns 0 on success.</p> |
| 427 |
<p>Options:</p> |
| 428 |
<table class="docutils option-list" frame="void" rules="none"> |
| 429 |
<col class="option" /> |
| 430 |
<col class="description" /> |
| 431 |
<tbody valign="top"> |
| 432 |
<tr><td class="option-group"> |
| 433 |
<kbd><span class="option">-1</span>, <span class="option">--last</span></kbd></td> |
| 434 |
<td>show only the preceding applied patch</td></tr> |
| 435 |
<tr><td class="option-group"> |
| 436 |
<kbd><span class="option">-s</span>, <span class="option">--summary</span></kbd></td> |
| 437 |
<td>print first line of patch header</td></tr> |
| 438 |
</tbody> |
| 439 |
</table> |
| 440 |
</div> |
| 441 |
<div class="section" id="qdelete"> |
| 442 |
<h3>qdelete</h3> |
| 443 |
<p>remove patches from queue:</p> |
| 444 |
<pre class="literal-block"> |
| 445 |
hg qdelete [-k] [PATCH]... |
| 446 |
</pre> |
| 447 |
<p>The patches must not be applied, and at least one patch is required. Exact |
| 448 |
patch identifiers must be given. With -k/--keep, the patch files are |
| 449 |
preserved in the patch directory.</p> |
| 450 |
<p>To stop managing a patch and move it into permanent history, |
| 451 |
use the <a class="reference external" href="hg-qfinish.html"><tt class="docutils literal">hg qfinish</tt></a> command.</p> |
| 452 |
<p>Options:</p> |
| 453 |
<table class="docutils option-list" frame="void" rules="none"> |
| 454 |
<col class="option" /> |
| 455 |
<col class="description" /> |
| 456 |
<tbody valign="top"> |
| 457 |
<tr><td class="option-group"> |
| 458 |
<kbd><span class="option">-k</span>, <span class="option">--keep</span></kbd></td> |
| 459 |
<td>keep patch file</td></tr> |
| 460 |
<tr><td class="option-group" colspan="2"> |
| 461 |
<kbd><span class="option">-r</span>, <span class="option">--rev <var><REV[+]></var></span></kbd></td> |
| 462 |
</tr> |
| 463 |
<tr><td> </td><td>stop managing a revision (DEPRECATED)</td></tr> |
| 464 |
</tbody> |
| 465 |
</table> |
| 466 |
<p>[+] marked option can be specified multiple times</p> |
| 467 |
<!-- --> |
| 468 |
<blockquote> |
| 469 |
aliases: qremove qrm</blockquote> |
| 470 |
</div> |
| 471 |
<div class="section" id="qfinish"> |
| 472 |
<h3>qfinish</h3> |
| 473 |
<p>move applied patches into repository history:</p> |
| 474 |
<pre class="literal-block"> |
| 475 |
hg qfinish [-a] [REV]... |
| 476 |
</pre> |
| 477 |
<p>Finishes the specified revisions (corresponding to applied |
| 478 |
patches) by moving them out of mq control into regular repository |
| 479 |
history.</p> |
| 480 |
<p>Accepts a revision range or the -a/--applied option. If --applied |
| 481 |
is specified, all applied mq revisions are removed from mq |
| 482 |
control. Otherwise, the given revisions must be at the base of the |
| 483 |
stack of applied patches.</p> |
| 484 |
<p>This can be especially useful if your changes have been applied to |
| 485 |
an upstream repository, or if you are about to push your changes |
| 486 |
to upstream.</p> |
| 487 |
<p>Returns 0 on success.</p> |
| 488 |
<p>Options:</p> |
| 489 |
<table class="docutils option-list" frame="void" rules="none"> |
| 490 |
<col class="option" /> |
| 491 |
<col class="description" /> |
| 492 |
<tbody valign="top"> |
| 493 |
<tr><td class="option-group"> |
| 494 |
<kbd><span class="option">-a</span>, <span class="option">--applied</span></kbd></td> |
| 495 |
<td>finish all applied changesets</td></tr> |
| 496 |
</tbody> |
| 497 |
</table> |
| 498 |
</div> |
| 499 |
<div class="section" id="qgoto"> |
| 500 |
<h3>qgoto</h3> |
| 501 |
<p>push or pop patches until named patch is at top of stack:</p> |
| 502 |
<pre class="literal-block"> |
| 503 |
hg qgoto [OPTION]... PATCH |
| 504 |
</pre> |
| 505 |
<p>Returns 0 on success.</p> |
| 506 |
<p>Options:</p> |
| 507 |
<table class="docutils option-list" frame="void" rules="none"> |
| 508 |
<col class="option" /> |
| 509 |
<col class="description" /> |
| 510 |
<tbody valign="top"> |
| 511 |
<tr><td class="option-group"> |
| 512 |
<kbd><span class="option">--keep-changes</span></kbd></td> |
| 513 |
<td>tolerate non-conflicting local changes</td></tr> |
| 514 |
<tr><td class="option-group"> |
| 515 |
<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> |
| 516 |
<td>overwrite any local changes</td></tr> |
| 517 |
<tr><td class="option-group"> |
| 518 |
<kbd><span class="option">--no-backup</span></kbd></td> |
| 519 |
<td>do not save backup copies of files</td></tr> |
| 520 |
</tbody> |
| 521 |
</table> |
| 522 |
</div> |
| 523 |
<div class="section" id="qguard"> |
| 524 |
<h3>qguard</h3> |
| 525 |
<p>set or print guards for a patch:</p> |
| 526 |
<pre class="literal-block"> |
| 527 |
hg qguard [-l] [-n] [PATCH] [-- [+GUARD]... [-GUARD]...] |
| 528 |
</pre> |
| 529 |
<p>Guards control whether a patch can be pushed. A patch with no |
| 530 |
guards is always pushed. A patch with a positive guard ("+foo") is |
| 531 |
pushed only if the <a class="reference external" href="hg-qselect.html"><tt class="docutils literal">hg qselect</tt></a> command has activated it. A patch with |
| 532 |
a negative guard ("-foo") is never pushed if the <a class="reference external" href="hg-qselect.html"><tt class="docutils literal">hg qselect</tt></a> command |
| 533 |
has activated it.</p> |
| 534 |
<p>With no arguments, print the currently active guards. |
| 535 |
With arguments, set guards for the named patch.</p> |
| 536 |
<div class="admonition note"> |
| 537 |
<p class="first admonition-title">Note</p> |
| 538 |
<p class="last">Specifying negative guards now requires '--'.</p> |
| 539 |
</div> |
| 540 |
<p>To set guards on another patch:</p> |
| 541 |
<pre class="literal-block"> |
| 542 |
hg qguard other.patch -- +2.6.17 -stable |
| 543 |
</pre> |
| 544 |
<p>Returns 0 on success.</p> |
| 545 |
<p>Options:</p> |
| 546 |
<table class="docutils option-list" frame="void" rules="none"> |
| 547 |
<col class="option" /> |
| 548 |
<col class="description" /> |
| 549 |
<tbody valign="top"> |
| 550 |
<tr><td class="option-group"> |
| 551 |
<kbd><span class="option">-l</span>, <span class="option">--list</span></kbd></td> |
| 552 |
<td>list all patches and guards</td></tr> |
| 553 |
<tr><td class="option-group"> |
| 554 |
<kbd><span class="option">-n</span>, <span class="option">--none</span></kbd></td> |
| 555 |
<td>drop all guards</td></tr> |
| 556 |
</tbody> |
| 557 |
</table> |
| 558 |
</div> |
| 559 |
<div class="section" id="qheader"> |
| 560 |
<h3>qheader</h3> |
| 561 |
<p>print the header of the topmost or specified patch:</p> |
| 562 |
<pre class="literal-block"> |
| 563 |
hg qheader [PATCH] |
| 564 |
</pre> |
| 565 |
<p>Returns 0 on success.</p> |
| 566 |
</div> |
| 567 |
<div class="section" id="qnext"> |
| 568 |
<h3>qnext</h3> |
| 569 |
<p>print the name of the next pushable patch:</p> |
| 570 |
<pre class="literal-block"> |
| 571 |
hg qnext [-s] |
| 572 |
</pre> |
| 573 |
<p>Returns 0 on success.</p> |
| 574 |
<p>Options:</p> |
| 575 |
<table class="docutils option-list" frame="void" rules="none"> |
| 576 |
<col class="option" /> |
| 577 |
<col class="description" /> |
| 578 |
<tbody valign="top"> |
| 579 |
<tr><td class="option-group"> |
| 580 |
<kbd><span class="option">-s</span>, <span class="option">--summary</span></kbd></td> |
| 581 |
<td>print first line of patch header</td></tr> |
| 582 |
</tbody> |
| 583 |
</table> |
| 584 |
</div> |
| 585 |
<div class="section" id="qpop"> |
| 586 |
<h3>qpop</h3> |
| 587 |
<p>pop the current patch off the stack:</p> |
| 588 |
<pre class="literal-block"> |
| 589 |
hg qpop [-a] [-f] [PATCH | INDEX] |
| 590 |
</pre> |
| 591 |
<p>Without argument, pops off the top of the patch stack. If given a |
| 592 |
patch name, keeps popping off patches until the named patch is at |
| 593 |
the top of the stack.</p> |
| 594 |
<p>By default, abort if the working directory contains uncommitted |
| 595 |
changes. With --keep-changes, abort only if the uncommitted files |
| 596 |
overlap with patched files. With -f/--force, backup and discard |
| 597 |
changes made to such files.</p> |
| 598 |
<p>Return 0 on success.</p> |
| 599 |
<p>Options:</p> |
| 600 |
<table class="docutils option-list" frame="void" rules="none"> |
| 601 |
<col class="option" /> |
| 602 |
<col class="description" /> |
| 603 |
<tbody valign="top"> |
| 604 |
<tr><td class="option-group"> |
| 605 |
<kbd><span class="option">-a</span>, <span class="option">--all</span></kbd></td> |
| 606 |
<td>pop all patches</td></tr> |
| 607 |
<tr><td class="option-group" colspan="2"> |
| 608 |
<kbd><span class="option">-n</span>, <span class="option">--name <var><NAME></var></span></kbd></td> |
| 609 |
</tr> |
| 610 |
<tr><td> </td><td>queue name to pop (DEPRECATED)</td></tr> |
| 611 |
<tr><td class="option-group"> |
| 612 |
<kbd><span class="option">--keep-changes</span></kbd></td> |
| 613 |
<td>tolerate non-conflicting local changes</td></tr> |
| 614 |
<tr><td class="option-group"> |
| 615 |
<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> |
| 616 |
<td>forget any local changes to patched files</td></tr> |
| 617 |
<tr><td class="option-group"> |
| 618 |
<kbd><span class="option">--no-backup</span></kbd></td> |
| 619 |
<td>do not save backup copies of files</td></tr> |
| 620 |
</tbody> |
| 621 |
</table> |
| 622 |
</div> |
| 623 |
<div class="section" id="qprev"> |
| 624 |
<h3>qprev</h3> |
| 625 |
<p>print the name of the preceding applied patch:</p> |
| 626 |
<pre class="literal-block"> |
| 627 |
hg qprev [-s] |
| 628 |
</pre> |
| 629 |
<p>Returns 0 on success.</p> |
| 630 |
<p>Options:</p> |
| 631 |
<table class="docutils option-list" frame="void" rules="none"> |
| 632 |
<col class="option" /> |
| 633 |
<col class="description" /> |
| 634 |
<tbody valign="top"> |
| 635 |
<tr><td class="option-group"> |
| 636 |
<kbd><span class="option">-s</span>, <span class="option">--summary</span></kbd></td> |
| 637 |
<td>print first line of patch header</td></tr> |
| 638 |
</tbody> |
| 639 |
</table> |
| 640 |
</div> |
| 641 |
<div class="section" id="qpush"> |
| 642 |
<h3>qpush</h3> |
| 643 |
<p>push the next patch onto the stack:</p> |
| 644 |
<pre class="literal-block"> |
| 645 |
hg qpush [-f] [-l] [-a] [--move] [PATCH | INDEX] |
| 646 |
</pre> |
| 647 |
<p>By default, abort if the working directory contains uncommitted |
| 648 |
changes. With --keep-changes, abort only if the uncommitted files |
| 649 |
overlap with patched files. With -f/--force, backup and patch over |
| 650 |
uncommitted changes.</p> |
| 651 |
<p>Return 0 on success.</p> |
| 652 |
<p>Options:</p> |
| 653 |
<table class="docutils option-list" frame="void" rules="none"> |
| 654 |
<col class="option" /> |
| 655 |
<col class="description" /> |
| 656 |
<tbody valign="top"> |
| 657 |
<tr><td class="option-group"> |
| 658 |
<kbd><span class="option">--keep-changes</span></kbd></td> |
| 659 |
<td>tolerate non-conflicting local changes</td></tr> |
| 660 |
<tr><td class="option-group"> |
| 661 |
<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> |
| 662 |
<td>apply on top of local changes</td></tr> |
| 663 |
<tr><td class="option-group"> |
| 664 |
<kbd><span class="option">-e</span>, <span class="option">--exact</span></kbd></td> |
| 665 |
<td>apply the target patch to its recorded parent</td></tr> |
| 666 |
<tr><td class="option-group"> |
| 667 |
<kbd><span class="option">-l</span>, <span class="option">--list</span></kbd></td> |
| 668 |
<td>list patch name in commit text</td></tr> |
| 669 |
<tr><td class="option-group"> |
| 670 |
<kbd><span class="option">-a</span>, <span class="option">--all</span></kbd></td> |
| 671 |
<td>apply all patches</td></tr> |
| 672 |
<tr><td class="option-group"> |
| 673 |
<kbd><span class="option">-m</span>, <span class="option">--merge</span></kbd></td> |
| 674 |
<td>merge from another queue (DEPRECATED)</td></tr> |
| 675 |
<tr><td class="option-group" colspan="2"> |
| 676 |
<kbd><span class="option">-n</span>, <span class="option">--name <var><NAME></var></span></kbd></td> |
| 677 |
</tr> |
| 678 |
<tr><td> </td><td>merge queue name (DEPRECATED)</td></tr> |
| 679 |
<tr><td class="option-group"> |
| 680 |
<kbd><span class="option">--move</span></kbd></td> |
| 681 |
<td>reorder patch series and apply only the patch</td></tr> |
| 682 |
<tr><td class="option-group"> |
| 683 |
<kbd><span class="option">--no-backup</span></kbd></td> |
| 684 |
<td>do not save backup copies of files</td></tr> |
| 685 |
</tbody> |
| 686 |
</table> |
| 687 |
</div> |
| 688 |
<div class="section" id="qqueue"> |
| 689 |
<h3>qqueue</h3> |
| 690 |
<p>manage multiple patch queues:</p> |
| 691 |
<pre class="literal-block"> |
| 692 |
hg qqueue [OPTION] [QUEUE] |
| 693 |
</pre> |
| 694 |
<p>Supports switching between different patch queues, as well as creating |
| 695 |
new patch queues and deleting existing ones.</p> |
| 696 |
<p>Omitting a queue name or specifying -l/--list will show you the registered |
| 697 |
queues - by default the "normal" patches queue is registered. The currently |
| 698 |
active queue will be marked with "(active)". Specifying --active will print |
| 699 |
only the name of the active queue.</p> |
| 700 |
<p>To create a new queue, use -c/--create. The queue is automatically made |
| 701 |
active, except in the case where there are applied patches from the |
| 702 |
currently active queue in the repository. Then the queue will only be |
| 703 |
created and switching will fail.</p> |
| 704 |
<p>To delete an existing queue, use --delete. You cannot delete the currently |
| 705 |
active queue.</p> |
| 706 |
<p>Returns 0 on success.</p> |
| 707 |
<p>Options:</p> |
| 708 |
<table class="docutils option-list" frame="void" rules="none"> |
| 709 |
<col class="option" /> |
| 710 |
<col class="description" /> |
| 711 |
<tbody valign="top"> |
| 712 |
<tr><td class="option-group"> |
| 713 |
<kbd><span class="option">-l</span>, <span class="option">--list</span></kbd></td> |
| 714 |
<td>list all available queues</td></tr> |
| 715 |
<tr><td class="option-group"> |
| 716 |
<kbd><span class="option">--active</span></kbd></td> |
| 717 |
<td>print name of active queue</td></tr> |
| 718 |
<tr><td class="option-group"> |
| 719 |
<kbd><span class="option">-c</span>, <span class="option">--create</span></kbd></td> |
| 720 |
<td>create new queue</td></tr> |
| 721 |
<tr><td class="option-group"> |
| 722 |
<kbd><span class="option">--rename</span></kbd></td> |
| 723 |
<td>rename active queue</td></tr> |
| 724 |
<tr><td class="option-group"> |
| 725 |
<kbd><span class="option">--delete</span></kbd></td> |
| 726 |
<td>delete reference to queue</td></tr> |
| 727 |
<tr><td class="option-group"> |
| 728 |
<kbd><span class="option">--purge</span></kbd></td> |
| 729 |
<td>delete queue, and remove patch dir</td></tr> |
| 730 |
</tbody> |
| 731 |
</table> |
| 732 |
</div> |
| 733 |
<div class="section" id="qrename"> |
| 734 |
<h3>qrename</h3> |
| 735 |
<p>rename a patch:</p> |
| 736 |
<pre class="literal-block"> |
| 737 |
hg qrename PATCH1 [PATCH2] |
| 738 |
</pre> |
| 739 |
<p>With one argument, renames the current patch to PATCH1. |
| 740 |
With two arguments, renames PATCH1 to PATCH2.</p> |
| 741 |
<p>Returns 0 on success.</p> |
| 742 |
<!-- --> |
| 743 |
<blockquote> |
| 744 |
aliases: qmv</blockquote> |
| 745 |
</div> |
| 746 |
<div class="section" id="qrestore"> |
| 747 |
<h3>qrestore</h3> |
| 748 |
<p>restore the queue state saved by a revision (DEPRECATED):</p> |
| 749 |
<pre class="literal-block"> |
| 750 |
hg qrestore [-d] [-u] REV |
| 751 |
</pre> |
| 752 |
<p>This command is deprecated, use <a class="reference external" href="hg-rebase.html"><tt class="docutils literal">hg rebase</tt></a> instead.</p> |
| 753 |
<p>Options:</p> |
| 754 |
<table class="docutils option-list" frame="void" rules="none"> |
| 755 |
<col class="option" /> |
| 756 |
<col class="description" /> |
| 757 |
<tbody valign="top"> |
| 758 |
<tr><td class="option-group"> |
| 759 |
<kbd><span class="option">-d</span>, <span class="option">--delete</span></kbd></td> |
| 760 |
<td>delete save entry</td></tr> |
| 761 |
<tr><td class="option-group"> |
| 762 |
<kbd><span class="option">-u</span>, <span class="option">--update</span></kbd></td> |
| 763 |
<td>update queue working directory</td></tr> |
| 764 |
</tbody> |
| 765 |
</table> |
| 766 |
</div> |
| 767 |
<div class="section" id="qsave"> |
| 768 |
<h3>qsave</h3> |
| 769 |
<p>save current queue state (DEPRECATED):</p> |
| 770 |
<pre class="literal-block"> |
| 771 |
hg qsave [-m TEXT] [-l FILE] [-c] [-n NAME] [-e] [-f] |
| 772 |
</pre> |
| 773 |
<p>This command is deprecated, use <a class="reference external" href="hg-rebase.html"><tt class="docutils literal">hg rebase</tt></a> instead.</p> |
| 774 |
<p>Options:</p> |
| 775 |
<table class="docutils option-list" frame="void" rules="none"> |
| 776 |
<col class="option" /> |
| 777 |
<col class="description" /> |
| 778 |
<tbody valign="top"> |
| 779 |
<tr><td class="option-group"> |
| 780 |
<kbd><span class="option">-c</span>, <span class="option">--copy</span></kbd></td> |
| 781 |
<td>copy patch directory</td></tr> |
| 782 |
<tr><td class="option-group" colspan="2"> |
| 783 |
<kbd><span class="option">-n</span>, <span class="option">--name <var><NAME></var></span></kbd></td> |
| 784 |
</tr> |
| 785 |
<tr><td> </td><td>copy directory name</td></tr> |
| 786 |
<tr><td class="option-group"> |
| 787 |
<kbd><span class="option">-e</span>, <span class="option">--empty</span></kbd></td> |
| 788 |
<td>clear queue status file</td></tr> |
| 789 |
<tr><td class="option-group"> |
| 790 |
<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> |
| 791 |
<td>force copy</td></tr> |
| 792 |
<tr><td class="option-group" colspan="2"> |
| 793 |
<kbd><span class="option">-m</span>, <span class="option">--message <var><TEXT></var></span></kbd></td> |
| 794 |
</tr> |
| 795 |
<tr><td> </td><td>use text as commit message</td></tr> |
| 796 |
<tr><td class="option-group" colspan="2"> |
| 797 |
<kbd><span class="option">-l</span>, <span class="option">--logfile <var><FILE></var></span></kbd></td> |
| 798 |
</tr> |
| 799 |
<tr><td> </td><td>read commit message from file</td></tr> |
| 800 |
</tbody> |
| 801 |
</table> |
| 802 |
</div> |
| 803 |
<div class="section" id="qselect"> |
| 804 |
<h3>qselect</h3> |
| 805 |
<p>set or print guarded patches to push:</p> |
| 806 |
<pre class="literal-block"> |
| 807 |
hg qselect [OPTION]... [GUARD]... |
| 808 |
</pre> |
| 809 |
<p>Use the <a class="reference external" href="hg-qguard.html"><tt class="docutils literal">hg qguard</tt></a> command to set or print guards on patch, then use |
| 810 |
qselect to tell mq which guards to use. A patch will be pushed if |
| 811 |
it has no guards or any positive guards match the currently |
| 812 |
selected guard, but will not be pushed if any negative guards |
| 813 |
match the current guard. For example:</p> |
| 814 |
<pre class="literal-block"> |
| 815 |
qguard foo.patch -- -stable (negative guard) |
| 816 |
qguard bar.patch +stable (positive guard) |
| 817 |
qselect stable |
| 818 |
</pre> |
| 819 |
<p>This activates the "stable" guard. mq will skip foo.patch (because |
| 820 |
it has a negative match) but push bar.patch (because it has a |
| 821 |
positive match).</p> |
| 822 |
<p>With no arguments, prints the currently active guards. |
| 823 |
With one argument, sets the active guard.</p> |
| 824 |
<p>Use -n/--none to deactivate guards (no other arguments needed). |
| 825 |
When no guards are active, patches with positive guards are |
| 826 |
skipped and patches with negative guards are pushed.</p> |
| 827 |
<p>qselect can change the guards on applied patches. It does not pop |
| 828 |
guarded patches by default. Use --pop to pop back to the last |
| 829 |
applied patch that is not guarded. Use --reapply (which implies |
| 830 |
--pop) to push back to the current patch afterwards, but skip |
| 831 |
guarded patches.</p> |
| 832 |
<p>Use -s/--series to print a list of all guards in the series file |
| 833 |
(no other arguments needed). Use -v for more information.</p> |
| 834 |
<p>Returns 0 on success.</p> |
| 835 |
<p>Options:</p> |
| 836 |
<table class="docutils option-list" frame="void" rules="none"> |
| 837 |
<col class="option" /> |
| 838 |
<col class="description" /> |
| 839 |
<tbody valign="top"> |
| 840 |
<tr><td class="option-group"> |
| 841 |
<kbd><span class="option">-n</span>, <span class="option">--none</span></kbd></td> |
| 842 |
<td>disable all guards</td></tr> |
| 843 |
<tr><td class="option-group"> |
| 844 |
<kbd><span class="option">-s</span>, <span class="option">--series</span></kbd></td> |
| 845 |
<td>list all guards in series file</td></tr> |
| 846 |
<tr><td class="option-group"> |
| 847 |
<kbd><span class="option">--pop</span></kbd></td> |
| 848 |
<td>pop to before first guarded applied patch</td></tr> |
| 849 |
<tr><td class="option-group"> |
| 850 |
<kbd><span class="option">--reapply</span></kbd></td> |
| 851 |
<td>pop, then reapply patches</td></tr> |
| 852 |
</tbody> |
| 853 |
</table> |
| 854 |
</div> |
| 855 |
<div class="section" id="qseries"> |
| 856 |
<h3>qseries</h3> |
| 857 |
<p>print the entire series file:</p> |
| 858 |
<pre class="literal-block"> |
| 859 |
hg qseries [-ms] |
| 860 |
</pre> |
| 861 |
<p>Returns 0 on success.</p> |
| 862 |
<p>Options:</p> |
| 863 |
<table class="docutils option-list" frame="void" rules="none"> |
| 864 |
<col class="option" /> |
| 865 |
<col class="description" /> |
| 866 |
<tbody valign="top"> |
| 867 |
<tr><td class="option-group"> |
| 868 |
<kbd><span class="option">-m</span>, <span class="option">--missing</span></kbd></td> |
| 869 |
<td>print patches not in series</td></tr> |
| 870 |
<tr><td class="option-group"> |
| 871 |
<kbd><span class="option">-s</span>, <span class="option">--summary</span></kbd></td> |
| 872 |
<td>print first line of patch header</td></tr> |
| 873 |
</tbody> |
| 874 |
</table> |
| 875 |
</div> |
| 876 |
<div class="section" id="qtop"> |
| 877 |
<h3>qtop</h3> |
| 878 |
<p>print the name of the current patch:</p> |
| 879 |
<pre class="literal-block"> |
| 880 |
hg qtop [-s] |
| 881 |
</pre> |
| 882 |
<p>Returns 0 on success.</p> |
| 883 |
<p>Options:</p> |
| 884 |
<table class="docutils option-list" frame="void" rules="none"> |
| 885 |
<col class="option" /> |
| 886 |
<col class="description" /> |
| 887 |
<tbody valign="top"> |
| 888 |
<tr><td class="option-group"> |
| 889 |
<kbd><span class="option">-s</span>, <span class="option">--summary</span></kbd></td> |
| 890 |
<td>print first line of patch header</td></tr> |
| 891 |
</tbody> |
| 892 |
</table> |
| 893 |
</div> |
| 894 |
<div class="section" id="qunapplied"> |
| 895 |
<h3>qunapplied</h3> |
| 896 |
<p>print the patches not yet applied:</p> |
| 897 |
<pre class="literal-block"> |
| 898 |
hg qunapplied [-1] [-s] [PATCH] |
| 899 |
</pre> |
| 900 |
<p>Returns 0 on success.</p> |
| 901 |
<p>Options:</p> |
| 902 |
<table class="docutils option-list" frame="void" rules="none"> |
| 903 |
<col class="option" /> |
| 904 |
<col class="description" /> |
| 905 |
<tbody valign="top"> |
| 906 |
<tr><td class="option-group"> |
| 907 |
<kbd><span class="option">-1</span>, <span class="option">--first</span></kbd></td> |
| 908 |
<td>show only the first patch</td></tr> |
| 909 |
<tr><td class="option-group"> |
| 910 |
<kbd><span class="option">-s</span>, <span class="option">--summary</span></kbd></td> |
| 911 |
<td>print first line of patch header</td></tr> |
| 912 |
</tbody> |
| 913 |
</table> |
| 914 |
</div> |
| 915 |
</div> |
| 916 |
<div class="section" id="file-content-management"> |
| 917 |
<h2><a class="toc-backref" href="#contents">File content management</a></h2> |
| 918 |
<div class="section" id="qdiff"> |
| 919 |
<h3>qdiff</h3> |
| 920 |
<p>diff of the current patch and subsequent modifications:</p> |
| 921 |
<pre class="literal-block"> |
| 922 |
hg qdiff [OPTION]... [FILE]... |
| 923 |
</pre> |
| 924 |
<p>Shows a diff which includes the current patch as well as any |
| 925 |
changes which have been made in the working directory since the |
| 926 |
last refresh (thus showing what the current patch would become |
| 927 |
after a qrefresh).</p> |
| 928 |
<p>Use <a class="reference external" href="hg-diff.html"><tt class="docutils literal">hg diff</tt></a> if you only want to see the changes made since the |
| 929 |
last qrefresh, or <a class="reference external" href="hg-export.html"><tt class="docutils literal">hg export qtip</tt></a> if you want to see changes |
| 930 |
made by the current patch without including changes made since the |
| 931 |
qrefresh.</p> |
| 932 |
<p>Returns 0 on success.</p> |
| 933 |
<p>Options:</p> |
| 934 |
<table class="docutils option-list" frame="void" rules="none"> |
| 935 |
<col class="option" /> |
| 936 |
<col class="description" /> |
| 937 |
<tbody valign="top"> |
| 938 |
<tr><td class="option-group"> |
| 939 |
<kbd><span class="option">-a</span>, <span class="option">--text</span></kbd></td> |
| 940 |
<td>treat all files as text</td></tr> |
| 941 |
<tr><td class="option-group"> |
| 942 |
<kbd><span class="option">-g</span>, <span class="option">--git</span></kbd></td> |
| 943 |
<td>use git extended diff format (DEFAULT: diff.git)</td></tr> |
| 944 |
<tr><td class="option-group"> |
| 945 |
<kbd><span class="option">--binary</span></kbd></td> |
| 946 |
<td>generate binary diffs in git mode (default)</td></tr> |
| 947 |
<tr><td class="option-group"> |
| 948 |
<kbd><span class="option">--nodates</span></kbd></td> |
| 949 |
<td>omit dates from diff headers</td></tr> |
| 950 |
<tr><td class="option-group"> |
| 951 |
<kbd><span class="option">--noprefix</span></kbd></td> |
| 952 |
<td>omit a/ and b/ prefixes from filenames</td></tr> |
| 953 |
<tr><td class="option-group" colspan="2"> |
| 954 |
<kbd><span class="option">-p</span>, <span class="option">--show-function</span></kbd></td> |
| 955 |
</tr> |
| 956 |
<tr><td> </td><td>show which function each change is in (DEFAULT: diff.showfunc)</td></tr> |
| 957 |
<tr><td class="option-group"> |
| 958 |
<kbd><span class="option">--reverse</span></kbd></td> |
| 959 |
<td>produce a diff that undoes the changes</td></tr> |
| 960 |
<tr><td class="option-group" colspan="2"> |
| 961 |
<kbd><span class="option">-w</span>, <span class="option">--ignore-all-space</span></kbd></td> |
| 962 |
</tr> |
| 963 |
<tr><td> </td><td>ignore white space when comparing lines</td></tr> |
| 964 |
<tr><td class="option-group" colspan="2"> |
| 965 |
<kbd><span class="option">-b</span>, <span class="option">--ignore-space-change</span></kbd></td> |
| 966 |
</tr> |
| 967 |
<tr><td> </td><td>ignore changes in the amount of white space</td></tr> |
| 968 |
<tr><td class="option-group" colspan="2"> |
| 969 |
<kbd><span class="option">-B</span>, <span class="option">--ignore-blank-lines</span></kbd></td> |
| 970 |
</tr> |
| 971 |
<tr><td> </td><td>ignore changes whose lines are all blank</td></tr> |
| 972 |
<tr><td class="option-group" colspan="2"> |
| 973 |
<kbd><span class="option">-Z</span>, <span class="option">--ignore-space-at-eol</span></kbd></td> |
| 974 |
</tr> |
| 975 |
<tr><td> </td><td>ignore changes in whitespace at EOL</td></tr> |
| 976 |
<tr><td class="option-group" colspan="2"> |
| 977 |
<kbd><span class="option">-U</span>, <span class="option">--unified <var><NUM></var></span></kbd></td> |
| 978 |
</tr> |
| 979 |
<tr><td> </td><td>number of lines of context to show</td></tr> |
| 980 |
<tr><td class="option-group"> |
| 981 |
<kbd><span class="option">--stat</span></kbd></td> |
| 982 |
<td>output diffstat-style summary of changes</td></tr> |
| 983 |
<tr><td class="option-group"> |
| 984 |
<kbd><span class="option">--root <var><DIR></var></span></kbd></td> |
| 985 |
<td>produce diffs relative to subdirectory</td></tr> |
| 986 |
<tr><td class="option-group" colspan="2"> |
| 987 |
<kbd><span class="option">-I</span>, <span class="option">--include <var><PATTERN[+]></var></span></kbd></td> |
| 988 |
</tr> |
| 989 |
<tr><td> </td><td>include names matching the given patterns</td></tr> |
| 990 |
<tr><td class="option-group" colspan="2"> |
| 991 |
<kbd><span class="option">-X</span>, <span class="option">--exclude <var><PATTERN[+]></var></span></kbd></td> |
| 992 |
</tr> |
| 993 |
<tr><td> </td><td>exclude names matching the given patterns</td></tr> |
| 994 |
</tbody> |
| 995 |
</table> |
| 996 |
<p>[+] marked option can be specified multiple times</p> |
| 997 |
</div> |
| 998 |
</div> |
| 999 |
<div class="section" id="change-import-export"> |
| 1000 |
<h2><a class="toc-backref" href="#contents">Change import/export</a></h2> |
| 1001 |
<div class="section" id="qimport"> |
| 1002 |
<h3>qimport</h3> |
| 1003 |
<p>import a patch or existing changeset:</p> |
| 1004 |
<pre class="literal-block"> |
| 1005 |
hg qimport [-e] [-n NAME] [-f] [-g] [-P] [-r REV]... [FILE]... |
| 1006 |
</pre> |
| 1007 |
<p>The patch is inserted into the series after the last applied |
| 1008 |
patch. If no patches have been applied, qimport prepends the patch |
| 1009 |
to the series.</p> |
| 1010 |
<p>The patch will have the same name as its source file unless you |
| 1011 |
give it a new one with -n/--name.</p> |
| 1012 |
<p>You can register an existing patch inside the patch directory with |
| 1013 |
the -e/--existing flag.</p> |
| 1014 |
<p>With -f/--force, an existing patch of the same name will be |
| 1015 |
overwritten.</p> |
| 1016 |
<p>An existing changeset may be placed under mq control with -r/--rev |
| 1017 |
(e.g. qimport --rev . -n patch will place the current revision |
| 1018 |
under mq control). With -g/--git, patches imported with --rev will |
| 1019 |
use the git diff format. See the diffs help topic for information |
| 1020 |
on why this is important for preserving rename/copy information |
| 1021 |
and permission changes. Use <a class="reference external" href="hg-qfinish.html"><tt class="docutils literal">hg qfinish</tt></a> to remove changesets |
| 1022 |
from mq control.</p> |
| 1023 |
<p>To import a patch from standard input, pass - as the patch file. |
| 1024 |
When importing from standard input, a patch name must be specified |
| 1025 |
using the --name flag.</p> |
| 1026 |
<p>To import an existing patch while renaming it:</p> |
| 1027 |
<pre class="literal-block"> |
| 1028 |
hg qimport -e existing-patch -n new-name |
| 1029 |
</pre> |
| 1030 |
<p>Returns 0 if import succeeded.</p> |
| 1031 |
<p>Options:</p> |
| 1032 |
<table class="docutils option-list" frame="void" rules="none"> |
| 1033 |
<col class="option" /> |
| 1034 |
<col class="description" /> |
| 1035 |
<tbody valign="top"> |
| 1036 |
<tr><td class="option-group"> |
| 1037 |
<kbd><span class="option">-e</span>, <span class="option">--existing</span></kbd></td> |
| 1038 |
<td>import file in patch directory</td></tr> |
| 1039 |
<tr><td class="option-group" colspan="2"> |
| 1040 |
<kbd><span class="option">-n</span>, <span class="option">--name <var><NAME></var></span></kbd></td> |
| 1041 |
</tr> |
| 1042 |
<tr><td> </td><td>name of patch file</td></tr> |
| 1043 |
<tr><td class="option-group"> |
| 1044 |
<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> |
| 1045 |
<td>overwrite existing files</td></tr> |
| 1046 |
<tr><td class="option-group" colspan="2"> |
| 1047 |
<kbd><span class="option">-r</span>, <span class="option">--rev <var><REV[+]></var></span></kbd></td> |
| 1048 |
</tr> |
| 1049 |
<tr><td> </td><td>place existing revisions under mq control</td></tr> |
| 1050 |
<tr><td class="option-group"> |
| 1051 |
<kbd><span class="option">-g</span>, <span class="option">--git</span></kbd></td> |
| 1052 |
<td>use git extended diff format</td></tr> |
| 1053 |
<tr><td class="option-group"> |
| 1054 |
<kbd><span class="option">-P</span>, <span class="option">--push</span></kbd></td> |
| 1055 |
<td>qpush after importing</td></tr> |
| 1056 |
</tbody> |
| 1057 |
</table> |
| 1058 |
<p>[+] marked option can be specified multiple times</p> |
| 1059 |
</div> |
| 1060 |
</div> |
| 1061 |
</div> |
| 1062 |
</div> |
| 1063 |
</body> |
| 1064 |
</html> |