hg-prompt/documentation/keywords/index.html @ 75e16ecaa86d

hg-review: Update documentation.
author Steve Losh <steve@stevelosh.com>
date Tue, 15 Jun 2010 20:00:45 -0400
parents 383887c412c2
children abcf6f68470c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
    "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
      xmlns:dc="http://purl.org/dc/elements/1.1/"
      xmlns:foaf="http://xmlns.com/foaf/0.1/">
  
  <head>
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
    
    <title>
      hg-prompt » Keywords
    </title>
    
    <link rel="stylesheet" type="text/css" href="../../media/css/reset.css" media="screen, projection" />
    <link rel="stylesheet" type="text/css" href="../../media/css/layout.css" media="screen, projection" />
    <link rel="stylesheet" type="text/css" href="../../media/css/typography.css" media="screen, projection" />
    <link rel="stylesheet" type="text/css" href="../../media/css/pygments.css" media="screen, projection" />
  </head>
  
  <body>
    <div id="content">

      
        <div id="breadcrumbs">
          <p>
              
                
                  <a href="../../">index</a> &#187;
                
              
                
                  <a href="../">documentation</a> &#187;
                
              
                
                  keywords
                
              
          </p>
        </div> <!-- div#breadcrumbs -->
      
      
      
  <h1 id="keywords">Keywords</h1>
<p>There a number of keywords available.  If you have any suggestions for more please <a href="http://bitbucket.org/sjl/issues">let me know</a>.</p>
<p>Some of the keywords support filters.  These filters can be combined when it makes sense.  If in doubt, try it!</p>
<div class="toc">
<ul>
<li><a href="#keywords">Keywords</a><ul>
<li><a href="#bookmark">bookmark</a></li>
<li><a href="#branch">branch</a></li>
<li><a href="#incoming">incoming</a></li>
<li><a href="#node">node</a></li>
<li><a href="#outgoing">outgoing</a></li>
<li><a href="#patch">patch</a></li>
<li><a href="#patches">patches</a></li>
<li><a href="#rev">rev</a></li>
<li><a href="#root">root</a></li>
<li><a href="#status">status</a></li>
<li><a href="#tags">tags</a></li>
<li><a href="#task">task</a></li>
<li><a href="#tip">tip</a></li>
<li><a href="#update">update</a></li>
</ul>
</li>
</ul>
</div>
<h2 id="bookmark">bookmark</h2>
<dl>
<dd>Display the current bookmark (requires the <a href="http://mercurial.selenic.com/wiki/BookmarksExtension">bookmarks</a> extension).</dd>
</dl>
<h2 id="branch">branch</h2>
<dl>
<dd>
<p>Display the current branch.</p>
<dl>
<dt>|quiet</dt>
<dd>Display the current branch only if it is not the default branch.</dd>
</dl>
</dd>
</dl>
<h2 id="incoming">incoming</h2>
<dl>
<dd>
<p>Display nothing, but if the default path contains incoming changesets the 
extra text will be expanded.</p>
<p>For example: <code>{incoming changes{incoming}}</code> will expand to
<code>incoming changes</code> if there are changes, otherwise nothing.</p>
<p>Checking for incoming changesets is an expensive operation, so <code>hg-prompt</code> 
will cache the results in <code>.hg/prompt/cache/</code> and refresh them every 15 
minutes.</p>
<dl>
<dt>|count</dt>
<dd>Display the number of incoming changesets (if greater than 0).</dd>
</dl>
</dd>
</dl>
<h2 id="node">node</h2>
<dl>
<dd>
<p>Display the (full) changeset hash of the current parent.</p>
<dl>
<dt>|short</dt>
<dd>Display the hash as the short, 12-character form.</dd>
<dt>|merge</dt>
<dd>Display the hash of the changeset you're merging with.</dd>
</dl>
</dd>
</dl>
<h2 id="outgoing">outgoing</h2>
<dl>
<dd>
<p>Display nothing, but if the current repository contains outgoing 
changesets (to default) the extra text will be expanded.</p>
<p>For example: <code>{outgoing changes{outgoing}}</code> will expand to
<code>outgoing changes</code> if there are changes, otherwise nothing.</p>
<p>Checking for outgoing changesets is an expensive operation, so <code>hg-prompt</code> 
will cache the results in <code>.hg/prompt/cache/</code> and refresh them every 15 
minutes.</p>
<dl>
<dt>|count</dt>
<dd>Display the number of outgoing changesets (if greater than 0).</dd>
</dl>
</dd>
</dl>
<h2 id="patch">patch</h2>
<dl>
<dd>
<p>Display the topmost currently-applied patch (requires the <a href="http://mercurial.selenic.com/wiki/MqExtension">mq</a>
extension).</p>
<dl>
<dt>|count</dt>
<dd>Display the number of patches in the queue.</dd>
<dt>|applied</dt>
<dd>Display the number of currently applied patches in the queue.</dd>
<dt>|unapplied</dt>
<dd>Display the number of currently unapplied patches in the queue.</dd>
<dt>|quiet</dt>
<dd>Display a number only if there are any patches in the queue.</dd>
</dl>
</dd>
</dl>
<h2 id="patches">patches</h2>
<dl>
<dd>
<p>Display a list of the current patches in the queue.  It will look like
this:</p>
<div class="codehilite"><pre><span class="gp">$</span> hg prompt <span class="s1">&#39;{patches}&#39;</span>
<span class="go">bottom-patch -&gt; middle-patch -&gt; top-patch</span>
</pre></div>


<dl>
<dt>|reverse</dt>
<dd>Display the patches in reverse order (i.e. topmost first).</dd>
<dt>|hide_applied</dt>
<dd>Do not display applied patches.</dd>
<dt>|hide_unapplied</dt>
<dd>Do not display unapplied patches.</dd>
<dt>|join(SEP)</dt>
<dd>Display SEP between each patch, instead of the default <code>-&gt;</code>.</dd>
<dt>|pre_applied(STRING)</dt>
<dd>Display STRING immediately before each applied patch.  Useful for
adding color codes.</dd>
<dt>|post_applied(STRING)</dt>
<dd>Display STRING immediately after each applied patch.  Useful for
resetting color codes.</dd>
<dt>|pre_unapplied(STRING)</dt>
<dd>Display STRING immediately before each unapplied patch.  Useful for
adding color codes.</dd>
<dt>|post_unapplied(STRING)</dt>
<dd>Display STRING immediately after each unapplied patch.  Useful for
resetting color codes.</dd>
</dl>
</dd>
</dl>
<h2 id="rev">rev</h2>
<dl>
<dd>
<p>Display the repository-local changeset number of the current parent.</p>
<dl>
<dt>|merge</dt>
<dd>Display the repository-local changeset number of the changeset you're
merging with.</dd>
</dl>
</dd>
</dl>
<h2 id="root">root</h2>
<dl>
<dd>
<p>Display the full path to the root of the current repository, without a 
trailing slash.</p>
<dl>
<dt>|basename</dt>
<dd>Display the directory name of the root of the current repository. For 
example, if the repository is in <code>/home/u/myrepo</code> then this keyword
would expand to <code>myrepo</code>.</dd>
</dl>
</dd>
</dl>
<h2 id="status">status</h2>
<dl>
<dd>
<p>Display <code>!</code> if the repository has any changed/added/removed files, 
otherwise <code>?</code> if it has any untracked (but not ignored) files, otherwise 
nothing.</p>
<dl>
<dt>|modified</dt>
<dd>Display <code>!</code> if the current repository contains files that have been 
modified, added, removed, or deleted, otherwise nothing.</dd>
<dt>|unknown</dt>
<dd>Display <code>?</code> if the current repository contains untracked files, 
otherwise nothing.</dd>
</dl>
</dd>
</dl>
<h2 id="tags">tags</h2>
<dl>
<dd>
<p>Display the tags of the current parent, separated by a space.</p>
<dl>
<dt>|SEP</dt>
<dd>Display the tags of the current parent, separated by <code>SEP</code>.</dd>
</dl>
</dd>
</dl>
<h2 id="task">task</h2>
<dl>
<dd>Display the current task (requires the <a href="http://bitbucket.org/alu/hgtasks/wiki/Home">tasks</a> extension).</dd>
</dl>
<h2 id="tip">tip</h2>
<dl>
<dd>
<p>Display the repository-local changeset number of the current tip.</p>
<dl>
<dt>|node</dt>
<dd>Display the (full) changeset hash of the current tip.</dd>
<dt>|short</dt>
<dd>Display a short form of the changeset hash of the current tip (must be 
used with the <strong>|node</strong> filter)</dd>
</dl>
</dd>
</dl>
<h2 id="update">update</h2>
<dl>
<dd>Display <code>^</code> if the current parent is not the tip of the current branch, 
otherwise nothing.  In effect, this lets you see if running <code>hg update</code> 
would do something.</dd>
</dl>

    
      <p id="footer">
        
          hg-prompt —
        
        Powered by <a href="http://bitbucket.org/zacharyvoase/markdoc">Markdoc</a>.
      </p>
    
    </div> <!-- div#content -->
  </body>
</html>