bos@559: <!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
bos@559: 
bos@559: <appendix id="chap:mqref">
bos@572:   <?dbhtml filename="mercurial-queues-reference.html"?>
bos@559:   <title>Mercurial Queues reference</title>
bos@559: 
bos@559:   <sect1 id="sec:mqref:cmdref">
bos@559:     <title>MQ command reference</title>
bos@559: 
bos@584:     <para id="x_5e8">For an overview of the commands provided by MQ, use the
bos@559:       command <command role="hg-cmd">hg help mq</command>.</para>
bos@559: 
bos@559:     <sect2>
bos@559:       <title><command role="hg-ext-mq">qapplied</command>&emdash;print
bos@559: 	applied patches</title>
bos@559: 
bos@584:       <para id="x_5e9">The <command role="hg-ext-mq">qapplied</command> command
bos@559: 	prints the current stack of applied patches.  Patches are
bos@559: 	printed in oldest-to-newest order, so the last patch in the
bos@559: 	list is the <quote>top</quote> patch.</para>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2>
bos@559:       <title><command role="hg-ext-mq">qcommit</command>&emdash;commit
bos@559: 	changes in the queue repository</title>
bos@559: 
bos@584:       <para id="x_5ea">The <command role="hg-ext-mq">qcommit</command> command
bos@559: 	commits any outstanding changes in the <filename
bos@559: 	  role="special" class="directory">.hg/patches</filename>
bos@559: 	repository.  This command only works if the <filename
bos@559: 	  role="special" class="directory">.hg/patches</filename>
bos@559: 	directory is a repository, i.e. you created the directory
bos@559: 	using <command role="hg-cmd">hg qinit <option
bos@559: 	    role="hg-ext-mq-cmd-qinit-opt">-c</option></command> or
bos@559: 	ran <command role="hg-cmd">hg init</command> in the directory
bos@559: 	after running <command
bos@559: 	  role="hg-ext-mq">qinit</command>.</para>
bos@559: 
bos@584:       <para id="x_5eb">This command is shorthand for <command role="hg-cmd">hg
bos@559: 	  commit --cwd .hg/patches</command>.</para>
bos@580:     </sect2>
bos@580:     <sect2>
bos@580: 	<title><command
bos@559: 	  role="hg-ext-mq">qdelete</command>&emdash;delete a patch
bos@559: 	from the <filename role="special">series</filename>
dongsheng@651: 	file</title>
bos@559: 
bos@584:       <para id="x_5ec">The <command role="hg-ext-mq">qdelete</command> command
bos@559: 	removes the entry for a patch from the <filename
bos@559: 	  role="special">series</filename> file in the <filename
bos@559: 	  role="special" class="directory">.hg/patches</filename>
bos@559: 	directory.  It does not pop the patch if the patch is already
bos@559: 	applied.  By default, it does not delete the patch file; use
bos@559: 	the <option role="hg-ext-mq-cmd-qdel-opt">-f</option> option
bos@559: 	to do that.</para>
bos@559: 
bos@584:       <para id="x_5ed">Options:</para>
bos@584:       <itemizedlist>
bos@584: 	<listitem><para id="x_5ee"><option
bos@559: 	      role="hg-ext-mq-cmd-qdel-opt">-f</option>: Delete the
bos@559: 	    patch file.</para>
bos@559: 	</listitem></itemizedlist>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2>
bos@559:       <title><command role="hg-ext-mq">qdiff</command>&emdash;print a
bos@559: 	diff of the topmost applied patch</title>
bos@559: 
bos@584:       <para id="x_5ef">The <command role="hg-ext-mq">qdiff</command> command
bos@559: 	prints a diff of the topmost applied patch. It is equivalent
bos@559: 	to <command role="hg-cmd">hg diff -r-2:-1</command>.</para>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2>
bos@701:       <title><command role="hg-ext-mq">qfold</command>&emdash;move
bos@701: 	applied patches into repository history</title>
bos@701: 
bos@702:       <para id="x_72d">The <command>hg qfinish</command> command converts the
bos@701: 	specified applied patches into permanent changes by moving
bos@701: 	them out of MQ's control so that they will be treated as
bos@701: 	normal repository history.</para>
bos@701:     </sect2>
bos@701: 
bos@701:     <sect2>
bos@559:       <title><command role="hg-ext-mq">qfold</command>&emdash;merge
bos@559: 	(<quote>fold</quote>) several patches into one</title>
bos@559: 
bos@584:       <para id="x_5f0">The <command role="hg-ext-mq">qfold</command> command
bos@559: 	merges multiple patches into the topmost applied patch, so
bos@559: 	that the topmost applied patch makes the union of all of the
bos@559: 	changes in the patches in question.</para>
bos@559: 
bos@584:       <para id="x_5f1">The patches to fold must not be applied; <command
bos@559: 	  role="hg-ext-mq">qfold</command> will exit with an error if
bos@559: 	any is.  The order in which patches are folded is significant;
bos@559: 	<command role="hg-cmd">hg qfold a b</command> means
bos@559: 	<quote>apply the current topmost patch, followed by
bos@559: 	  <literal>a</literal>, followed by
bos@559: 	  <literal>b</literal></quote>.</para>
bos@559: 
bos@584:       <para id="x_5f2">The comments from the folded patches are appended to the
bos@559: 	comments of the destination patch, with each block of comments
bos@559: 	separated by three asterisk
bos@559: 	(<quote><literal>*</literal></quote>) characters.  Use the
bos@559: 	<option role="hg-ext-mq-cmd-qfold-opt">-e</option> option to
bos@559: 	edit the commit message for the combined patch/changeset after
bos@559: 	the folding has completed.</para>
bos@559: 
bos@584:       <para id="x_5f3">Options:</para>
bos@584:       <itemizedlist>
bos@584: 	<listitem><para id="x_5f4"><option
bos@559: 	      role="hg-ext-mq-cmd-qfold-opt">-e</option>: Edit the
bos@559: 	    commit message and patch description for the newly folded
bos@559: 	    patch.</para>
bos@559: 	</listitem>
bos@584: 	<listitem><para id="x_5f5"><option
bos@559: 	      role="hg-ext-mq-cmd-qfold-opt">-l</option>: Use the
bos@559: 	    contents of the given file as the new commit message and
bos@559: 	    patch description for the folded patch.</para>
bos@559: 	</listitem>
bos@584: 	<listitem><para id="x_5f6"><option
bos@559: 	      role="hg-ext-mq-cmd-qfold-opt">-m</option>: Use the
bos@559: 	    given text as the new commit message and patch description
bos@559: 	    for the folded patch.</para>
bos@559: 	</listitem></itemizedlist>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2>
bos@559:       <title><command
bos@559: 	  role="hg-ext-mq">qheader</command>&emdash;display the
bos@559: 	header/description of a patch</title>
bos@559: 
bos@584:       <para id="x_5f7">The <command role="hg-ext-mq">qheader</command> command
bos@559: 	prints the header, or description, of a patch.  By default, it
bos@559: 	prints the header of the topmost applied patch. Given an
bos@559: 	argument, it prints the header of the named patch.</para>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2>
bos@559:       <title><command role="hg-ext-mq">qimport</command>&emdash;import
bos@559: 	a third-party patch into the queue</title>
bos@559: 
bos@584:       <para id="x_5f8">The <command role="hg-ext-mq">qimport</command> command
bos@559: 	adds an entry for an external patch to the <filename
bos@559: 	  role="special">series</filename> file, and copies the patch
bos@559: 	into the <filename role="special"
bos@559: 	  class="directory">.hg/patches</filename> directory.  It adds
bos@559: 	the entry immediately after the topmost applied patch, but
bos@559: 	does not push the patch.</para>
bos@559: 
bos@584:       <para id="x_5f9">If the <filename role="special"
bos@559: 	  class="directory">.hg/patches</filename> directory is a
bos@559: 	repository, <command role="hg-ext-mq">qimport</command>
bos@559: 	automatically does an <command role="hg-cmd">hg add</command>
bos@559: 	of the imported patch.</para>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2>
bos@559:       <title><command role="hg-ext-mq">qinit</command>&emdash;prepare
bos@559: 	a repository to work with MQ</title>
bos@559: 
bos@584:       <para id="x_5fa">The <command role="hg-ext-mq">qinit</command> command
bos@559: 	prepares a repository to work with MQ.  It creates a directory
bos@559: 	called <filename role="special"
bos@559: 	  class="directory">.hg/patches</filename>.</para>
bos@559: 
bos@584:       <para id="x_5fb">Options:</para>
bos@584:       <itemizedlist>
bos@584: 	<listitem><para id="x_5fc"><option
bos@559: 	      role="hg-ext-mq-cmd-qinit-opt">-c</option>: Create
bos@559: 	    <filename role="special"
bos@559: 	      class="directory">.hg/patches</filename> as a repository
bos@559: 	    in its own right.  Also creates a <filename
bos@559: 	      role="special">.hgignore</filename> file that will
bos@559: 	    ignore the <filename role="special">status</filename>
bos@559: 	    file.</para>
bos@559: 	</listitem></itemizedlist>
bos@559: 
bos@584:       <para id="x_5fd">When the <filename role="special"
bos@559: 	  class="directory">.hg/patches</filename> directory is a
bos@559: 	repository, the <command role="hg-ext-mq">qimport</command>
bos@559: 	and <command role="hg-ext-mq">qnew</command> commands
bos@559: 	automatically <command role="hg-cmd">hg add</command> new
bos@559: 	patches.</para>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2>
bos@559:       <title><command role="hg-ext-mq">qnew</command>&emdash;create a
bos@559: 	new patch</title>
bos@559: 
bos@584:       <para id="x_5fe">The <command role="hg-ext-mq">qnew</command> command
bos@559: 	creates a new patch.  It takes one mandatory argument, the
bos@559: 	name to use for the patch file.  The newly created patch is
bos@559: 	created empty by default.  It is added to the <filename
bos@559: 	  role="special">series</filename> file after the current
bos@559: 	topmost applied patch, and is immediately pushed on top of
bos@559: 	that patch.</para>
bos@559: 
bos@584:       <para id="x_5ff">If <command role="hg-ext-mq">qnew</command> finds modified
bos@559: 	files in the working directory, it will refuse to create a new
bos@559: 	patch unless the <option
bos@559: 	  role="hg-ext-mq-cmd-qnew-opt">-f</option> option is used
bos@672: 	(see below).  This behavior allows you to <command
bos@559: 	  role="hg-ext-mq">qrefresh</command> your topmost applied
bos@559: 	patch before you apply a new patch on top of it.</para>
bos@559: 
bos@584:       <para id="x_600">Options:</para>
bos@584:       <itemizedlist>
bos@584: 	<listitem><para id="x_601"><option
bos@559: 	      role="hg-ext-mq-cmd-qnew-opt">-f</option>: Create a new
bos@559: 	    patch if the contents of the working directory are
bos@559: 	    modified.  Any outstanding modifications are added to the
bos@559: 	    newly created patch, so after this command completes, the
bos@559: 	    working directory will no longer be modified.</para>
bos@559: 	</listitem>
bos@584: 	<listitem><para id="x_602"><option
bos@559: 	      role="hg-ext-mq-cmd-qnew-opt">-m</option>: Use the given
bos@559: 	    text as the commit message. This text will be stored at
bos@559: 	    the beginning of the patch file, before the patch
bos@559: 	    data.</para>
bos@559: 	</listitem></itemizedlist>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2>
bos@559:       <title><command role="hg-ext-mq">qnext</command>&emdash;print
bos@559: 	the name of the next patch</title>
bos@559: 
bos@584:       <para id="x_603">The <command role="hg-ext-mq">qnext</command> command
bos@559: 	prints the name name of the next patch in the <filename
bos@559: 	  role="special">series</filename> file after the topmost
bos@559: 	applied patch.  This patch will become the topmost applied
bos@559: 	patch if you run <command
bos@559: 	  role="hg-ext-mq">qpush</command>.</para>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2>
bos@559:       <title><command role="hg-ext-mq">qpop</command>&emdash;pop
bos@559: 	patches off the stack</title>
bos@559: 
bos@584:       <para id="x_604">The <command role="hg-ext-mq">qpop</command> command
bos@559: 	removes applied patches from the top of the stack of applied
bos@559: 	patches.  By default, it removes only one patch.</para>
bos@559: 
bos@584:       <para id="x_605">This command removes the changesets that represent the
bos@559: 	popped patches from the repository, and updates the working
bos@559: 	directory to undo the effects of the patches.</para>
bos@559: 
bos@584:       <para id="x_606">This command takes an optional argument, which it uses as
bos@559: 	the name or index of the patch to pop to.  If given a name, it
bos@559: 	will pop patches until the named patch is the topmost applied
bos@559: 	patch.  If given a number, <command
bos@559: 	  role="hg-ext-mq">qpop</command> treats the number as an
bos@559: 	index into the entries in the series file, counting from zero
bos@559: 	(empty lines and lines containing only comments do not count).
bos@559: 	It pops patches until the patch identified by the given index
bos@559: 	is the topmost applied patch.</para>
bos@559: 
bos@584:       <para id="x_607">The <command role="hg-ext-mq">qpop</command> command does
bos@559: 	not read or write patches or the <filename
bos@559: 	  role="special">series</filename> file.  It is thus safe to
bos@559: 	<command role="hg-ext-mq">qpop</command> a patch that you have
bos@559: 	removed from the <filename role="special">series</filename>
bos@559: 	file, or a patch that you have renamed or deleted entirely.
bos@559: 	In the latter two cases, use the name of the patch as it was
bos@559: 	when you applied it.</para>
bos@559: 
bos@584:       <para id="x_608">By default, the <command role="hg-ext-mq">qpop</command>
bos@559: 	command will not pop any patches if the working directory has
bos@672: 	been modified.  You can override this behavior using the
bos@559: 	<option role="hg-ext-mq-cmd-qpop-opt">-f</option> option,
bos@559: 	which reverts all modifications in the working
bos@559: 	directory.</para>
bos@559: 
bos@584:       <para id="x_609">Options:</para>
bos@584:       <itemizedlist>
bos@584: 	<listitem><para id="x_60a"><option
bos@559: 	      role="hg-ext-mq-cmd-qpop-opt">-a</option>: Pop all
bos@559: 	    applied patches.  This returns the repository to its state
bos@559: 	    before you applied any patches.</para>
bos@559: 	</listitem>
bos@584: 	<listitem><para id="x_60b"><option
bos@559: 	      role="hg-ext-mq-cmd-qpop-opt">-f</option>: Forcibly
bos@559: 	    revert any modifications to the working directory when
bos@559: 	    popping.</para>
bos@559: 	</listitem>
bos@584: 	<listitem><para id="x_60c"><option
bos@559: 	      role="hg-ext-mq-cmd-qpop-opt">-n</option>: Pop a patch
bos@559: 	    from the named queue.</para>
bos@559: 	</listitem></itemizedlist>
bos@559: 
bos@584:       <para id="x_60d">The <command role="hg-ext-mq">qpop</command> command
bos@559: 	removes one line from the end of the <filename
bos@559: 	  role="special">status</filename> file for each patch that it
bos@559: 	pops.</para>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2>
bos@559:       <title><command role="hg-ext-mq">qprev</command>&emdash;print
bos@559: 	the name of the previous patch</title>
bos@559: 
bos@584:       <para id="x_60e">The <command role="hg-ext-mq">qprev</command> command
bos@559: 	prints the name of the patch in the <filename
bos@559: 	  role="special">series</filename> file that comes before the
bos@559: 	topmost applied patch. This will become the topmost applied
bos@559: 	patch if you run <command
bos@559: 	  role="hg-ext-mq">qpop</command>.</para>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2 id="sec:mqref:cmd:qpush">
bos@559:       <title><command role="hg-ext-mq">qpush</command>&emdash;push
bos@559: 	patches onto the stack</title>
bos@559: 
bos@584:       <para id="x_60f">The <command role="hg-ext-mq">qpush</command> command adds
bos@559: 	patches onto the applied stack.  By default, it adds only one
bos@559: 	patch.</para>
bos@559: 
bos@584:       <para id="x_610">This command creates a new changeset to represent each
bos@559: 	applied patch, and updates the working directory to apply the
bos@559: 	effects of the patches.</para>
bos@559: 
bos@584:       <para id="x_611">The default data used when creating a changeset are as
bos@559: 	follows:</para>
bos@559:       <itemizedlist>
bos@584: 	<listitem><para id="x_612">The commit date and time zone are the current
bos@559: 	    date and time zone.  Because these data are used to
bos@559: 	    compute the identity of a changeset, this means that if
bos@559: 	    you <command role="hg-ext-mq">qpop</command> a patch and
bos@559: 	    <command role="hg-ext-mq">qpush</command> it again, the
bos@559: 	    changeset that you push will have a different identity
bos@559: 	    than the changeset you popped.</para>
bos@559: 	</listitem>
bos@584: 	<listitem><para id="x_613">The author is the same as the default used by
bos@559: 	    the <command role="hg-cmd">hg commit</command>
bos@559: 	    command.</para>
bos@559: 	</listitem>
bos@584: 	<listitem><para id="x_614">The commit message is any text from the patch
bos@559: 	    file that comes before the first diff header.  If there is
bos@559: 	    no such text, a default commit message is used that
bos@559: 	    identifies the name of the patch.</para>
bos@559: 	</listitem></itemizedlist>
bos@701:       <para id="x_615">If a patch contains a Mercurial patch header,
bos@701: 	the information in the patch header overrides these
bos@559: 	defaults.</para>
bos@559: 
bos@584:       <para id="x_616">Options:</para>
bos@584:       <itemizedlist>
bos@584: 	<listitem><para id="x_617"><option
bos@559: 	      role="hg-ext-mq-cmd-qpush-opt">-a</option>: Push all
bos@559: 	    unapplied patches from the <filename
bos@559: 	      role="special">series</filename> file until there are
bos@559: 	    none left to push.</para>
bos@559: 	</listitem>
bos@584: 	<listitem><para id="x_618"><option
bos@559: 	      role="hg-ext-mq-cmd-qpush-opt">-l</option>: Add the name
bos@559: 	    of the patch to the end of the commit message.</para>
bos@559: 	</listitem>
bos@584: 	<listitem><para id="x_619"><option
bos@559: 	      role="hg-ext-mq-cmd-qpush-opt">-m</option>: If a patch
bos@559: 	    fails to apply cleanly, use the entry for the patch in
bos@559: 	    another saved queue to compute the parameters for a
bos@559: 	    three-way merge, and perform a three-way merge using the
bos@559: 	    normal Mercurial merge machinery.  Use the resolution of
bos@559: 	    the merge as the new patch content.</para>
bos@559: 	</listitem>
bos@584: 	<listitem><para id="x_61a"><option
bos@559: 	      role="hg-ext-mq-cmd-qpush-opt">-n</option>: Use the
bos@559: 	    named queue if merging while pushing.</para>
bos@559: 	</listitem></itemizedlist>
bos@559: 
bos@584:       <para id="x_61b">The <command role="hg-ext-mq">qpush</command> command
bos@559: 	reads, but does not modify, the <filename
bos@559: 	  role="special">series</filename> file.  It appends one line
bos@559: 	to the <command role="hg-cmd">hg status</command> file for
bos@559: 	each patch that it pushes.</para>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2>
bos@559:       <title><command
bos@559: 	  role="hg-ext-mq">qrefresh</command>&emdash;update the
bos@559: 	topmost applied patch</title>
bos@559: 
bos@584:       <para id="x_61c">The <command role="hg-ext-mq">qrefresh</command> command
bos@559: 	updates the topmost applied patch.  It modifies the patch,
bos@559: 	removes the old changeset that represented the patch, and
bos@559: 	creates a new changeset to represent the modified
bos@559: 	patch.</para>
bos@559: 
bos@584:       <para id="x_61d">The <command role="hg-ext-mq">qrefresh</command> command
bos@559: 	looks for the following modifications:</para>
bos@559:       <itemizedlist>
bos@584: 	<listitem><para id="x_61e">Changes to the commit message, i.e. the text
bos@559: 	    before the first diff header in the patch file, are
bos@559: 	    reflected in the new changeset that represents the
bos@559: 	    patch.</para>
bos@559: 	</listitem>
bos@584: 	<listitem><para id="x_61f">Modifications to tracked files in the working
bos@559: 	    directory are added to the patch.</para>
bos@559: 	</listitem>
bos@584: 	<listitem><para id="x_620">Changes to the files tracked using <command
bos@559: 	      role="hg-cmd">hg add</command>, <command
bos@559: 	      role="hg-cmd">hg copy</command>, <command
bos@559: 	      role="hg-cmd">hg remove</command>, or <command
bos@559: 	      role="hg-cmd">hg rename</command>.  Added files and copy
bos@559: 	    and rename destinations are added to the patch, while
bos@559: 	    removed files and rename sources are removed.</para>
bos@559: 	</listitem></itemizedlist>
bos@559: 
bos@584:       <para id="x_621">Even if <command role="hg-ext-mq">qrefresh</command>
bos@559: 	detects no changes, it still recreates the changeset that
bos@559: 	represents the patch.  This causes the identity of the
bos@559: 	changeset to differ from the previous changeset that
bos@559: 	identified the patch.</para>
bos@559: 
bos@584:       <para id="x_622">Options:</para>
bos@584:       <itemizedlist>
bos@584: 	<listitem><para id="x_623"><option
bos@559: 	      role="hg-ext-mq-cmd-qrefresh-opt">-e</option>: Modify
bos@559: 	    the commit and patch description, using the preferred text
bos@559: 	    editor.</para>
bos@559: 	</listitem>
bos@584: 	<listitem><para id="x_624"><option
bos@559: 	      role="hg-ext-mq-cmd-qrefresh-opt">-m</option>: Modify
bos@559: 	    the commit message and patch description, using the given
bos@559: 	    text.</para>
bos@559: 	</listitem>
bos@584: 	<listitem><para id="x_625"><option
bos@559: 	      role="hg-ext-mq-cmd-qrefresh-opt">-l</option>: Modify
bos@559: 	    the commit message and patch description, using text from
bos@559: 	    the given file.</para>
bos@559: 	</listitem></itemizedlist>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2>
bos@559:       <title><command role="hg-ext-mq">qrename</command>&emdash;rename
bos@559: 	a patch</title>
bos@559: 
bos@584:       <para id="x_626">The <command role="hg-ext-mq">qrename</command> command
bos@559: 	renames a patch, and changes the entry for the patch in the
bos@559: 	<filename role="special">series</filename> file.</para>
bos@559: 
bos@584:       <para id="x_627">With a single argument, <command
bos@559: 	  role="hg-ext-mq">qrename</command> renames the topmost
bos@559: 	applied patch.  With two arguments, it renames its first
bos@559: 	argument to its second.</para>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2>
bos@559:       <title><command role="hg-ext-mq">qseries</command>&emdash;print
bos@559: 	the entire patch series</title>
bos@559: 
bos@584:       <para id="x_62a">The <command role="hg-ext-mq">qseries</command> command
bos@559: 	prints the entire patch series from the <filename
bos@559: 	  role="special">series</filename> file.  It prints only patch
bos@559: 	names, not empty lines or comments.  It prints in order from
bos@559: 	first to be applied to last.</para>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2>
bos@559:       <title><command role="hg-ext-mq">qtop</command>&emdash;print the
bos@559: 	name of the current patch</title>
bos@559: 
bos@584:       <para id="x_62b">The <command role="hg-ext-mq">qtop</command> prints the
bos@559: 	name of the topmost currently applied patch.</para>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2>
bos@559:       <title><command
bos@559: 	  role="hg-ext-mq">qunapplied</command>&emdash;print patches
bos@559: 	not yet applied</title>
bos@559: 
bos@584:       <para id="x_62c">The <command role="hg-ext-mq">qunapplied</command> command
bos@559: 	prints the names of patches from the <filename
bos@559: 	  role="special">series</filename> file that are not yet
bos@559: 	applied.  It prints them in order from the next patch that
bos@559: 	will be pushed to the last.</para>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2>
bos@559:       <title><command role="hg-cmd">hg strip</command>&emdash;remove a
bos@559: 	revision and descendants</title>
bos@559: 
bos@584:       <para id="x_62d">The <command role="hg-cmd">hg strip</command> command
bos@559: 	removes a revision, and all of its descendants, from the
bos@559: 	repository.  It undoes the effects of the removed revisions
bos@559: 	from the repository, and updates the working directory to the
bos@559: 	first parent of the removed revision.</para>
bos@559: 
bos@584:       <para id="x_62e">The <command role="hg-cmd">hg strip</command> command
bos@559: 	saves a backup of the removed changesets in a bundle, so that
bos@559: 	they can be reapplied if removed in error.</para>
bos@559: 
bos@584:       <para id="x_62f">Options:</para>
bos@584:       <itemizedlist>
bos@584: 	<listitem><para id="x_630"><option role="hg-opt-strip">-b</option>: Save
bos@559: 	    unrelated changesets that are intermixed with the stripped
bos@559: 	    changesets in the backup bundle.</para>
bos@559: 	</listitem>
bos@584: 	<listitem><para id="x_631"><option role="hg-opt-strip">-f</option>: If a
bos@701: 	    branch has multiple heads, remove all heads.</para>
bos@559: 	</listitem>
bos@584: 	<listitem><para id="x_632"><option role="hg-opt-strip">-n</option>: Do
bos@559: 	    not save a backup bundle.</para>
bos@559: 	</listitem></itemizedlist>
bos@559: 
bos@559:     </sect2>
bos@559:   </sect1>
bos@559:   <sect1>
bos@559:     <title>MQ file reference</title>
bos@559: 
bos@559:     <sect2>
bos@559:       <title>The <filename role="special">series</filename>
bos@559: 	file</title>
bos@559: 
bos@584:       <para id="x_633">The <filename role="special">series</filename> file
bos@559: 	contains a list of the names of all patches that MQ can apply.
bos@559: 	It is represented as a list of names, with one name saved per
bos@559: 	line.  Leading and trailing white space in each line are
bos@559: 	ignored.</para>
bos@559: 
bos@584:       <para id="x_634">Lines may contain comments.  A comment begins with the
bos@559: 	<quote><literal>#</literal></quote> character, and extends to
bos@559: 	the end of the line.  Empty lines, and lines that contain only
bos@559: 	comments, are ignored.</para>
bos@559: 
bos@584:       <para id="x_635">You will often need to edit the <filename
bos@559: 	  role="special">series</filename> file by hand, hence the
bos@559: 	support for comments and empty lines noted above.  For
bos@559: 	example, you can comment out a patch temporarily, and <command
bos@559: 	  role="hg-ext-mq">qpush</command> will skip over that patch
bos@559: 	when applying patches.  You can also change the order in which
bos@559: 	patches are applied by reordering their entries in the
bos@559: 	<filename role="special">series</filename> file.</para>
bos@559: 
bos@584:       <para id="x_636">Placing the <filename role="special">series</filename>
bos@559: 	file under revision control is also supported; it is a good
bos@559: 	idea to place all of the patches that it refers to under
bos@559: 	revision control, as well.  If you create a patch directory
bos@559: 	using the <option role="hg-ext-mq-cmd-qinit-opt">-c</option>
bos@559: 	option to <command role="hg-ext-mq">qinit</command>, this will
bos@559: 	be done for you automatically.</para>
bos@559: 
bos@559:     </sect2>
bos@559:     <sect2>
bos@559:       <title>The <filename role="special">status</filename>
bos@559: 	file</title>
bos@559: 
bos@584:       <para id="x_637">The <filename role="special">status</filename> file
bos@559: 	contains the names and changeset hashes of all patches that MQ
bos@559: 	currently has applied.  Unlike the <filename
bos@559: 	  role="special">series</filename> file, this file is not
bos@559: 	intended for editing.  You should not place this file under
bos@559: 	revision control, or modify it in any way.  It is used by MQ
bos@559: 	strictly for internal book-keeping.</para>
bos@559: 
bos@559:     </sect2>
bos@559:   </sect1>
bos@559: </appendix>
bos@559: 
bos@559: <!--
bos@559: local variables: 
bos@559: sgml-parent-document: ("00book.xml" "book" "appendix")
bos@559: end:
bos@559: -->