429b1794ba06
hg-review: Update documentation.
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Mon, 05 Jul 2010 23:33:29 -0400 |
parents | 3d3a3f9e8d6c |
children | ea24eb13e78b |
branches/tags | (none) |
files | hg-review/_sources/cli.txt hg-review/_sources/overview.txt hg-review/_sources/webui.txt hg-review/_static/review.css hg-review/_static/review.less hg-review/cli.html hg-review/index.html hg-review/overview.html hg-review/searchindex.js hg-review/webui.html |
Changes
--- a/hg-review/_sources/cli.txt Sat Jul 03 15:12:45 2010 -0400 +++ b/hg-review/_sources/cli.txt Mon Jul 05 23:33:29 2010 -0400 @@ -1,19 +1,253 @@ Command Line Interface ====================== -hg-review provides a command line interface. +hg-review provides a command line interface. Except for initializing the review +data, starting the web ui, and possibly some scripting, you'll probably want to +use the :doc:`web interface </webui>` for most tasks. + +When you enable the hg-review extension Mercurial will gain a new command: +``review``. This command on its own will display review data for a changeset, +but it also has several subcommands detailed below. + +You can always get help on a given topic right from the command line with +``hg help review`` or ``hg help review-topic``. + +.. _c-review: + +``review`` +---------- + +View code review data for a changeset. Usage:: + + hg review [-r REV] [-U CONTEXT] [--quiet] [FILE] + +Diffs of all changed files will be shown with comments inline. + +The line numbers printed are the ones that should be used to add line-level +comments. + +Options: + +``--unified VALUE`` + The number of lines of context to show for diffs in this changeset + (default: ``5``). + +``--rev VALUE`` + The revision to show (default: ``.``). -review ------- +``--quiet`` + Do not show diffs -- only show review-level comments and signoffs (default: + ``false``). + +``--verbose`` + Show the short identifier of each comment and signoff, mainly for use with + the :ref:`edit <c-edit>` subcommand (default: ``false``). + +``--debug`` + Show the full identifier of each comment and signoff, mainly for use with + the :ref:`edit <c-edit>` subcommand (default: ``false``). + +.. _c-init: + +``--init`` +---------- + +Initialize code review for a repository. Usage:: + + hg review --init --remote-path PATH + +When run for the first time in a project, it will do two things: + +* Create a new repository to hold the review data at ``.hg/review/``. + +* Create and ``hg add`` a ``.hgreview`` file in the current repository. You + will need to commit this file yourself with: ``hg commmit .hgreview -m + 'initialize code review data'`` + +The ``--remote-path`` option is required and specifies the path where the +canonical code review data for this project will live. This is the path that +will be cloned when someone else runs ``hg review --init`` on the project. + +Options: + +``--remote-path VALUE`` + The URL to the public code review data repository. + + +.. _c-comment: ``--comment`` ------------- +Add a code review comment for a changeset. Usage:: + + hg review --comment [-m MESSAGE] [--mdown] [-r REV] [-l LINES] [FILE] + +If no files are given the comment will be attached to the changeset as a whole. + +If one or more files are given but no lines are given, the comment will be +attached to each file as a whole. + +If a file is given and lines are given the comment will be attached to those +specific lines. Lines should be specified as a comma-separated list of line +numbers (as numbered in the output of "hg review"), such as ``3`` or ``2,3``. + +Options: + +``--rev VALUE`` + The revision to add a comment to (default: ``.``). + +``--lines VALUE`` + Comment on the given lines (specified as a comma-separated list of line + numbers) of the file (default: ``None``). + +``--message VALUE`` + Use ``VALUE`` as the comment instead of opening an editor (default: + ``None`` (i.e. "open an editor")). + +``--mdown`` + Use Markdown to format the comment (default: ``False``). + + +.. _c-signoff: + ``--signoff`` ------------- +Add a code review signoff for a changeset. Usage:: + + hg review --signoff [-m MESSAGE] [--mdown] [--yes | --no] [-r REV] + +The ``--yes`` and ``--no`` options can be used to indicate whether you think the +changeset is "good" or "bad". + +It's up to the collaborators of each individual project to decide exactly what +that means. If neither option is given the signoff will be marked as +"neutral". + +Options: + +``--rev VALUE`` + The revision to sign off on (default: ``.``). + +``--yes`` + Sign off as "yes" for the changeset (default: ``False`` (i.e. "neutral")). + +``--no`` + Sign off as "no" for the changeset (default: ``False`` (i.e. "neutral")). + +``--message VALUE`` + Use ``VALUE`` as the signoff message instead of opening an editor (default: + ``None`` (i.e. "open an editor")). + +``--mdown`` + Use Markdown to format the signoff message (default: ``False``). + + +.. _c-edit: + +``--edit`` +---------- + +Edit a comment or signoff. Usage:: + + hg review --edit IDENTIFIER [--yes | --no] [-m MESSAGE] [-l LINES] [--mdown] [FILE] + +Edit the comment or changeset with the given identifier. + +You can find the identifier of the item you would like to edit by running ``hg +review --verbose`` to display identifiers. + +Any other options given (such as ``--message``, ``--yes`` or filenames) will +replace the content of the item you edit. + +``--message VALUE`` + Replace the comment or signoff message with VALUE (default: ``None`` (i.e. + "open an editor")). + +``--mdown`` + Use Markdown to format the comment or signoff message (default: ``False`` + (i.e. "Use the same formatting the item already has)). + +``--lines`` + The line(s) of the file to comment on (default: ``None`` (i.e. "use the + same line the comment already has)). Returns an error if you're editing + a signoff or a review-level comment. + +``--yes`` + Change the signoff to state the the changeset is "good" (default: + ``False``). Returns an error if you are not editing a signoff. + +``--no`` + Change the signoff to state the the changeset is "bad" (default: + ``False``). Returns an error if you are not editing a signoff. + + +.. _c-check: + ``--check`` ----------- +Check the review status of a changeset. Usage:: + + hg review --check [-r REV] [--no-nos] [--yeses NUM] [--seen] + +Check that the given changeset "passes" the given tests of review status. If no +tests are given an error is returned. + +Tests are checked in the following order: + +- ``--no-nos`` +- ``--yeses`` +- ``--seen`` + +If any tests fail the command returns a status of 1 with a message describing +the failure on stderr, otherwise it returns 0 and prints nothing. + +``--rev VALUE`` + The revision to check (default: ``.``). + +``--no-nos`` + Ensure this revision does *not* have any signoffs of "no" (default: + ``False`` (i.e. "Don't perform this check")). + +``--yeses VALUE`` + Ensure this revision has at least ``VALUE`` signoffs of "yes" (default: + ``None`` (i.e. "Don't perform this check"). + +``--seen`` + Ensure this revision has at least one comment or signoff (default: + ``False`` (i.e. "Don't perform this check")). + + +.. _c-web: + ``--web`` --------- + +Start the web interface. Usage:: + + hg review --web [--read-only] [--allow-anon] [--address ADDRESS] [--port PORT] + +Visit http://localhost:8080/ (replace the port number if you specified +a different port) in a modern browser of your choice to use the web interface. + +Use ``Ctrl+C`` to stop the interface. + +Options: + +``--read-only`` + Make the web interface read-only; disallowing comments, signoffs, pushes + and pulls (default: ``False``). + +``--allow-anon`` + Allow anonymous comments on the web interface and set the username for + comments to an anonymous username (default: ``False`` (i.e. allow comments + and use your Mercurial username)). + +``--address VALUE`` + Run the web interface on the specified address (default: ``127.0.0.1``). + +``--port VALUE`` + Run the web interface on the specified port (default: ``8080``). +
--- a/hg-review/_sources/overview.txt Sat Jul 03 15:12:45 2010 -0400 +++ b/hg-review/_sources/overview.txt Mon Jul 05 23:33:29 2010 -0400 @@ -31,21 +31,25 @@ ----- The easiest way to work with hg-review is with the :doc:`web interface -</webui>`. There's also a command-line interface, but it's really easiest to -work with the web ui. +</webui>`. There's also a :doc:`command-line interface </cli>`, but it's +easiest to work with the web interface. Projects with Existing Code Reviews ''''''''''''''''''''''''''''''''''' -If you want to work with a repository that already has code review set up, all -you need to do is cd into that repository, run ``hg review --init`` to pull -down the review data, and then run ``hg review --web`` to fire up the web ui. +If you want to work with a repository that already has code review set up all +you need to do is cd into that repository, pull down the review data, and fire +up the web ui:: + + cd ~/src/someproject + hg review --init + hg review --web Once that's done you can visit http://localhost:8080/ in your browser to start reviewing. You should read over the :doc:`concepts </concepts>` documentation to make sure -you know how hg-review works, and the :doc:`web interface </webui>` +you know how hg-review works and the :doc:`web interface </webui>` documentation for a quick tour of how to use the web UI. Projects without Existing Code Reviews
--- a/hg-review/_sources/webui.txt Sat Jul 03 15:12:45 2010 -0400 +++ b/hg-review/_sources/webui.txt Mon Jul 05 23:33:29 2010 -0400 @@ -60,6 +60,9 @@ to provide a public interface. This will let people can comment easily without using the extension (or even cloning your project). +Initial Deployment +'''''''''''''''''' + You can use any WSGI server you like to provide a public instance of hg-review. Before you start you'll need to have Mercurial installed on your web server. @@ -74,13 +77,17 @@ hg clone http://bitbucket.org/sjl/hg-review/ -Grab a copy of your project and configure it to use the hg-review extension:: +Grab a copy of your project and configure it to use the hg-review extension as +well as the built-in `fetch +<http://mercurial.selenic.com/wiki/FetchExtension>`_ extension (to +automatically merge updates):: - hg clone http://bitbucket.org/you/yourproject/ + hg clone -U http://bitbucket.org/you/yourproject/ cd yourproject echo '[extensions]' >> .hg/hgrc echo 'review = /var/www/myproject-review-interface/hg-review/review' >> .hg/hgrc + echo 'fetch = ' >> .hg/hgrc Use hg-review to pull down the review data:: @@ -114,3 +121,43 @@ you do that depends on your WSGI server. A sample configuration file for `Gunicorn <http://gunicorn.org/>`_ is provided in ``contrib/deploy/gunicorn.conf.py``. + +Updating the Data +''''''''''''''''' + +You'll want to keep the review data for this interface current so users can see +all the latest comments and signoffs. + +To do this you simply need to pull in the main repository (to receive new +changesets in your project) and fetch in the review data repository (to receive +new comments and signoffs):: + + hg -R /var/www/myproject-review-interface/ pull + hg -R /var/www/myproject-review-interface/.hg/review fetch + +New comments and signoffs will be visible immediately -- you don't need to +restart your WSGI server. + +You'll probably want to set this up as a cron job or use a hook of some kind +to automate the updates. + +If you allow anonymous comments and want people that are using the extension +locally (instead of this public instance) to see these comments, you'll need to +*fetch and push* the review data repo as well:: + + hg -R /var/www/myproject-review-interface/.hg/review/ fetch + hg -R /var/www/myproject-review-interface/.hg/review/ push + +hg-review is designed to never encounter merge conflicts with its data, but +there's always the chance that someone has done something manually that could +cause a problem. + +If your interface doesn't seem to be receiving new comments/signoffs you'll +want to take a look at the review data repository to see what's wrong:: + + cd /var/www/myproject-review-interface/.hg/review + hg heads + +There should only ever be one head in this repository. If there are more you'll +need to merge them (and push back to your public review data repo so others +won't encounter the same problem).
--- a/hg-review/_static/review.css Sat Jul 03 15:12:45 2010 -0400 +++ b/hg-review/_static/review.css Mon Jul 05 23:33:29 2010 -0400 @@ -115,6 +115,59 @@ border: 0; padding: 0; } +.document .documentwrapper .bodywrapper .clear-code-effects { + border: none; + background: none; + padding: 0; + line-height: 1; +} +.document .documentwrapper .bodywrapper h1 tt.docutils.literal span.pre { + margin: 0 0 0.75em; + font-size: 2em; +} +.document .documentwrapper .bodywrapper h2 tt.docutils.literal span.pre { + margin: 0 0 1em; + font-size: 1.5em; +} +.document .documentwrapper .bodywrapper h3 tt.docutils.literal span.pre { + margin: 0 0 1.286em; + font-size: 1.167em; +} +.document .documentwrapper .bodywrapper h4 tt.docutils.literal span.pre { + margin: 0 0 1.5em; + font-size: 1em; +} +.document .documentwrapper .bodywrapper h5 tt.docutils.literal span.pre { + margin: 0 0 1.8em; + font-size: .834em; +} +.document .documentwrapper .bodywrapper h6 tt.docutils.literal span.pre { + margin: 0 0 2em; + font-size: .75em; +} +.document .documentwrapper .bodywrapper h1 tt.docutils.literal, +.document .documentwrapper .bodywrapper h2 tt.docutils.literal, +.document .documentwrapper .bodywrapper h3 tt.docutils.literal, +.document .documentwrapper .bodywrapper h4 tt.docutils.literal, +.document .documentwrapper .bodywrapper h5 tt.docutils.literal, +.document .documentwrapper .bodywrapper h6 tt.docutils.literal { + border: none; + background: none; + padding: 0; + line-height: 1; +} +.document .documentwrapper .bodywrapper h1 tt.docutils.literal span.pre, +.document .documentwrapper .bodywrapper h2 tt.docutils.literal span.pre, +.document .documentwrapper .bodywrapper h3 tt.docutils.literal span.pre, +.document .documentwrapper .bodywrapper h4 tt.docutils.literal span.pre, +.document .documentwrapper .bodywrapper h5 tt.docutils.literal span.pre, +.document .documentwrapper .bodywrapper h6 tt.docutils.literal span.pre { + font-weight: bold; + border: none; + background: none; + padding: 0; + line-height: 1; +} .document .sphinxsidebar { float: left; margin-left: -100%; @@ -136,6 +189,19 @@ .document .sphinxsidebar #searchbox .searchtip { display: none; } +.document .sphinxsidebar .sphinxsidebarwrapper h4 { + margin-bottom: 0; +} +.document .sphinxsidebar .sphinxsidebarwrapper h3:nth-of-type(2) { + display: none; +} +.document .sphinxsidebar .sphinxsidebarwrapper ul.this-page-menu { + display: none; +} +.document .sphinxsidebar .sphinxsidebarwrapper ul li a span.pre { + font-size: 14px; + line-height: 24px; +} .clearer { clear: both; } @@ -146,12 +212,3 @@ text-align: right; font-style: italic; } -.sphinxsidebar .sphinxsidebarwrapper h4 { - margin-bottom: 0; -} -.sphinxsidebar .sphinxsidebarwrapper h3:nth-of-type(2) { - display: none; -} -.sphinxsidebar .sphinxsidebarwrapper ul.this-page-menu { - display: none; -}
--- a/hg-review/_static/review.less Sat Jul 03 15:12:45 2010 -0400 +++ b/hg-review/_static/review.less Mon Jul 05 23:33:29 2010 -0400 @@ -119,6 +119,28 @@ padding: 0; } } + .clear-code-effects { + border: none; + background: none; + padding: 0; + line-height: 1; + } + h1 tt.docutils.literal span.pre { margin: 0 0 0.75em; font-size: 2em; } + h2 tt.docutils.literal span.pre { margin: 0 0 1em; font-size: 1.5em; } + h3 tt.docutils.literal span.pre { margin: 0 0 1.286em; font-size: 1.167em; } + h4 tt.docutils.literal span.pre { margin: 0 0 1.5em; font-size: 1em; } + h5 tt.docutils.literal span.pre { margin: 0 0 1.8em; font-size: .834em; } + h6 tt.docutils.literal span.pre { margin: 0 0 2em; font-size: .75em; } + h1, h2, h3, h4, h5, h6 { + tt.docutils.literal { + .clear-code-effects; + + span.pre { + font-weight: bold; + .clear-code-effects; + } + } + } } } .sphinxsidebar { @@ -146,6 +168,21 @@ display: none; } } + .sphinxsidebarwrapper { + h4 { + margin-bottom: 0; + } + h3:nth-of-type(2) { + display: none; + } + ul.this-page-menu { + display: none; + } + ul li a span.pre { + font-size: 14px; + line-height: 24px; + } + } } } .clearer { @@ -158,14 +195,3 @@ text-align: right; font-style: italic; } -.sphinxsidebar .sphinxsidebarwrapper { - h4 { - margin-bottom: 0; - } - h3:nth-of-type(2) { - display: none; - } - ul.this-page-menu { - display: none; - } -}
--- a/hg-review/cli.html Sat Jul 03 15:12:45 2010 -0400 +++ b/hg-review/cli.html Mon Jul 05 23:33:29 2010 -0400 @@ -47,21 +47,191 @@ <div class="section" id="command-line-interface"> <h1>Command Line Interface<a class="headerlink" href="#command-line-interface" title="Permalink to this headline">¶</a></h1> -<p>hg-review provides a command line interface.</p> +<p>hg-review provides a command line interface. Except for initializing the review +data, starting the web ui, and possibly some scripting, you’ll probably want to +use the <a class="reference external" href="webui.html"><em>web interface</em></a> for most tasks.</p> +<p>When you enable the hg-review extension Mercurial will gain a new command: +<tt class="docutils literal"><span class="pre">review</span></tt>. This command on its own will display review data for a changeset, +but it also has several subcommands detailed below.</p> +<p>You can always get help on a given topic right from the command line with +<tt class="docutils literal"><span class="pre">hg</span> <span class="pre">help</span> <span class="pre">review</span></tt> or <tt class="docutils literal"><span class="pre">hg</span> <span class="pre">help</span> <span class="pre">review-topic</span></tt>.</p> <div class="section" id="review"> -<h2>review<a class="headerlink" href="#review" title="Permalink to this headline">¶</a></h2> +<span id="c-review"></span><h2><tt class="docutils literal"><span class="pre">review</span></tt><a class="headerlink" href="#review" title="Permalink to this headline">¶</a></h2> +<p>View code review data for a changeset. Usage:</p> +<div class="highlight-python"><pre>hg review [-r REV] [-U CONTEXT] [--quiet] [FILE]</pre> +</div> +<p>Diffs of all changed files will be shown with comments inline.</p> +<p>The line numbers printed are the ones that should be used to add line-level +comments.</p> +<p>Options:</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">--unified</span> <span class="pre">VALUE</span></tt></dt> +<dd>The number of lines of context to show for diffs in this changeset +(default: <tt class="docutils literal"><span class="pre">5</span></tt>).</dd> +<dt><tt class="docutils literal"><span class="pre">--rev</span> <span class="pre">VALUE</span></tt></dt> +<dd>The revision to show (default: <tt class="docutils literal"><span class="pre">.</span></tt>).</dd> +<dt><tt class="docutils literal"><span class="pre">--quiet</span></tt></dt> +<dd>Do not show diffs – only show review-level comments and signoffs (default: +<tt class="docutils literal"><span class="pre">false</span></tt>).</dd> +<dt><tt class="docutils literal"><span class="pre">--verbose</span></tt></dt> +<dd>Show the short identifier of each comment and signoff, mainly for use with +the <a class="reference internal" href="#c-edit"><em>edit</em></a> subcommand (default: <tt class="docutils literal"><span class="pre">false</span></tt>).</dd> +<dt><tt class="docutils literal"><span class="pre">--debug</span></tt></dt> +<dd>Show the full identifier of each comment and signoff, mainly for use with +the <a class="reference internal" href="#c-edit"><em>edit</em></a> subcommand (default: <tt class="docutils literal"><span class="pre">false</span></tt>).</dd> +</dl> +</div> +<div class="section" id="init"> +<span id="c-init"></span><h2><tt class="docutils literal"><span class="pre">--init</span></tt><a class="headerlink" href="#init" title="Permalink to this headline">¶</a></h2> +<p>Initialize code review for a repository. Usage:</p> +<div class="highlight-python"><pre>hg review --init --remote-path PATH</pre> +</div> +<p>When run for the first time in a project, it will do two things:</p> +<ul class="simple"> +<li>Create a new repository to hold the review data at <tt class="docutils literal"><span class="pre">.hg/review/</span></tt>.</li> +<li>Create and <tt class="docutils literal"><span class="pre">hg</span> <span class="pre">add</span></tt> a <tt class="docutils literal"><span class="pre">.hgreview</span></tt> file in the current repository. You +will need to commit this file yourself with: <tt class="docutils literal"><span class="pre">hg</span> <span class="pre">commmit</span> <span class="pre">.hgreview</span> <span class="pre">-m</span> +<span class="pre">'initialize</span> <span class="pre">code</span> <span class="pre">review</span> <span class="pre">data'</span></tt></li> +</ul> +<p>The <tt class="docutils literal"><span class="pre">--remote-path</span></tt> option is required and specifies the path where the +canonical code review data for this project will live. This is the path that +will be cloned when someone else runs <tt class="docutils literal"><span class="pre">hg</span> <span class="pre">review</span> <span class="pre">--init</span></tt> on the project.</p> +<p>Options:</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">--remote-path</span> <span class="pre">VALUE</span></tt></dt> +<dd>The URL to the public code review data repository.</dd> +</dl> </div> <div class="section" id="comment"> -<h2><tt class="docutils literal"><span class="pre">--comment</span></tt><a class="headerlink" href="#comment" title="Permalink to this headline">¶</a></h2> +<span id="c-comment"></span><h2><tt class="docutils literal"><span class="pre">--comment</span></tt><a class="headerlink" href="#comment" title="Permalink to this headline">¶</a></h2> +<p>Add a code review comment for a changeset. Usage:</p> +<div class="highlight-python"><pre>hg review --comment [-m MESSAGE] [--mdown] [-r REV] [-l LINES] [FILE]</pre> +</div> +<p>If no files are given the comment will be attached to the changeset as a whole.</p> +<p>If one or more files are given but no lines are given, the comment will be +attached to each file as a whole.</p> +<p>If a file is given and lines are given the comment will be attached to those +specific lines. Lines should be specified as a comma-separated list of line +numbers (as numbered in the output of “hg review”), such as <tt class="docutils literal"><span class="pre">3</span></tt> or <tt class="docutils literal"><span class="pre">2,3</span></tt>.</p> +<p>Options:</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">--rev</span> <span class="pre">VALUE</span></tt></dt> +<dd>The revision to add a comment to (default: <tt class="docutils literal"><span class="pre">.</span></tt>).</dd> +<dt><tt class="docutils literal"><span class="pre">--lines</span> <span class="pre">VALUE</span></tt></dt> +<dd>Comment on the given lines (specified as a comma-separated list of line +numbers) of the file (default: <tt class="xref docutils literal"><span class="pre">None</span></tt>).</dd> +<dt><tt class="docutils literal"><span class="pre">--message</span> <span class="pre">VALUE</span></tt></dt> +<dd>Use <tt class="docutils literal"><span class="pre">VALUE</span></tt> as the comment instead of opening an editor (default: +<tt class="xref docutils literal"><span class="pre">None</span></tt> (i.e. “open an editor”)).</dd> +<dt><tt class="docutils literal"><span class="pre">--mdown</span></tt></dt> +<dd>Use Markdown to format the comment (default: <tt class="xref docutils literal"><span class="pre">False</span></tt>).</dd> +</dl> </div> <div class="section" id="signoff"> -<h2><tt class="docutils literal"><span class="pre">--signoff</span></tt><a class="headerlink" href="#signoff" title="Permalink to this headline">¶</a></h2> +<span id="c-signoff"></span><h2><tt class="docutils literal"><span class="pre">--signoff</span></tt><a class="headerlink" href="#signoff" title="Permalink to this headline">¶</a></h2> +<p>Add a code review signoff for a changeset. Usage:</p> +<div class="highlight-python"><pre>hg review --signoff [-m MESSAGE] [--mdown] [--yes | --no] [-r REV]</pre> +</div> +<p>The <tt class="docutils literal"><span class="pre">--yes</span></tt> and <tt class="docutils literal"><span class="pre">--no</span></tt> options can be used to indicate whether you think the +changeset is “good” or “bad”.</p> +<p>It’s up to the collaborators of each individual project to decide exactly what +that means. If neither option is given the signoff will be marked as +“neutral”.</p> +<p>Options:</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">--rev</span> <span class="pre">VALUE</span></tt></dt> +<dd>The revision to sign off on (default: <tt class="docutils literal"><span class="pre">.</span></tt>).</dd> +<dt><tt class="docutils literal"><span class="pre">--yes</span></tt></dt> +<dd>Sign off as “yes” for the changeset (default: <tt class="xref docutils literal"><span class="pre">False</span></tt> (i.e. “neutral”)).</dd> +<dt><tt class="docutils literal"><span class="pre">--no</span></tt></dt> +<dd>Sign off as “no” for the changeset (default: <tt class="xref docutils literal"><span class="pre">False</span></tt> (i.e. “neutral”)).</dd> +<dt><tt class="docutils literal"><span class="pre">--message</span> <span class="pre">VALUE</span></tt></dt> +<dd>Use <tt class="docutils literal"><span class="pre">VALUE</span></tt> as the signoff message instead of opening an editor (default: +<tt class="xref docutils literal"><span class="pre">None</span></tt> (i.e. “open an editor”)).</dd> +<dt><tt class="docutils literal"><span class="pre">--mdown</span></tt></dt> +<dd>Use Markdown to format the signoff message (default: <tt class="xref docutils literal"><span class="pre">False</span></tt>).</dd> +</dl> +</div> +<div class="section" id="edit"> +<span id="c-edit"></span><h2><tt class="docutils literal"><span class="pre">--edit</span></tt><a class="headerlink" href="#edit" title="Permalink to this headline">¶</a></h2> +<p>Edit a comment or signoff. Usage:</p> +<div class="highlight-python"><pre>hg review --edit IDENTIFIER [--yes | --no] [-m MESSAGE] [-l LINES] [--mdown] [FILE]</pre> +</div> +<p>Edit the comment or changeset with the given identifier.</p> +<p>You can find the identifier of the item you would like to edit by running <tt class="docutils literal"><span class="pre">hg</span> +<span class="pre">review</span> <span class="pre">--verbose</span></tt> to display identifiers.</p> +<p>Any other options given (such as <tt class="docutils literal"><span class="pre">--message</span></tt>, <tt class="docutils literal"><span class="pre">--yes</span></tt> or filenames) will +replace the content of the item you edit.</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">--message</span> <span class="pre">VALUE</span></tt></dt> +<dd>Replace the comment or signoff message with VALUE (default: <tt class="xref docutils literal"><span class="pre">None</span></tt> (i.e. +“open an editor”)).</dd> +<dt><tt class="docutils literal"><span class="pre">--mdown</span></tt></dt> +<dd>Use Markdown to format the comment or signoff message (default: <tt class="xref docutils literal"><span class="pre">False</span></tt> +(i.e. “Use the same formatting the item already has)).</dd> +<dt><tt class="docutils literal"><span class="pre">--lines</span></tt></dt> +<dd>The line(s) of the file to comment on (default: <tt class="xref docutils literal"><span class="pre">None</span></tt> (i.e. “use the +same line the comment already has)). Returns an error if you’re editing +a signoff or a review-level comment.</dd> +<dt><tt class="docutils literal"><span class="pre">--yes</span></tt></dt> +<dd>Change the signoff to state the the changeset is “good” (default: +<tt class="xref docutils literal"><span class="pre">False</span></tt>). Returns an error if you are not editing a signoff.</dd> +<dt><tt class="docutils literal"><span class="pre">--no</span></tt></dt> +<dd>Change the signoff to state the the changeset is “bad” (default: +<tt class="xref docutils literal"><span class="pre">False</span></tt>). Returns an error if you are not editing a signoff.</dd> +</dl> </div> <div class="section" id="check"> -<h2><tt class="docutils literal"><span class="pre">--check</span></tt><a class="headerlink" href="#check" title="Permalink to this headline">¶</a></h2> +<span id="c-check"></span><h2><tt class="docutils literal"><span class="pre">--check</span></tt><a class="headerlink" href="#check" title="Permalink to this headline">¶</a></h2> +<p>Check the review status of a changeset. Usage:</p> +<div class="highlight-python"><pre>hg review --check [-r REV] [--no-nos] [--yeses NUM] [--seen]</pre> +</div> +<p>Check that the given changeset “passes” the given tests of review status. If no +tests are given an error is returned.</p> +<p>Tests are checked in the following order:</p> +<ul class="simple"> +<li><tt class="docutils literal"><span class="pre">--no-nos</span></tt></li> +<li><tt class="docutils literal"><span class="pre">--yeses</span></tt></li> +<li><tt class="docutils literal"><span class="pre">--seen</span></tt></li> +</ul> +<p>If any tests fail the command returns a status of 1 with a message describing +the failure on stderr, otherwise it returns 0 and prints nothing.</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">--rev</span> <span class="pre">VALUE</span></tt></dt> +<dd>The revision to check (default: <tt class="docutils literal"><span class="pre">.</span></tt>).</dd> +<dt><tt class="docutils literal"><span class="pre">--no-nos</span></tt></dt> +<dd>Ensure this revision does <em>not</em> have any signoffs of “no” (default: +<tt class="xref docutils literal"><span class="pre">False</span></tt> (i.e. “Don’t perform this check”)).</dd> +<dt><tt class="docutils literal"><span class="pre">--yeses</span> <span class="pre">VALUE</span></tt></dt> +<dd>Ensure this revision has at least <tt class="docutils literal"><span class="pre">VALUE</span></tt> signoffs of “yes” (default: +<tt class="xref docutils literal"><span class="pre">None</span></tt> (i.e. “Don’t perform this check”).</dd> +<dt><tt class="docutils literal"><span class="pre">--seen</span></tt></dt> +<dd>Ensure this revision has at least one comment or signoff (default: +<tt class="xref docutils literal"><span class="pre">False</span></tt> (i.e. “Don’t perform this check”)).</dd> +</dl> </div> <div class="section" id="web"> -<h2><tt class="docutils literal"><span class="pre">--web</span></tt><a class="headerlink" href="#web" title="Permalink to this headline">¶</a></h2> +<span id="c-web"></span><h2><tt class="docutils literal"><span class="pre">--web</span></tt><a class="headerlink" href="#web" title="Permalink to this headline">¶</a></h2> +<p>Start the web interface. Usage:</p> +<div class="highlight-python"><pre>hg review --web [--read-only] [--allow-anon] [--address ADDRESS] [--port PORT]</pre> +</div> +<p>Visit <a class="reference external" href="http://localhost:8080/">http://localhost:8080/</a> (replace the port number if you specified +a different port) in a modern browser of your choice to use the web interface.</p> +<p>Use <tt class="docutils literal"><span class="pre">Ctrl+C</span></tt> to stop the interface.</p> +<p>Options:</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">--read-only</span></tt></dt> +<dd>Make the web interface read-only; disallowing comments, signoffs, pushes +and pulls (default: <tt class="xref docutils literal"><span class="pre">False</span></tt>).</dd> +<dt><tt class="docutils literal"><span class="pre">--allow-anon</span></tt></dt> +<dd>Allow anonymous comments on the web interface and set the username for +comments to an anonymous username (default: <tt class="xref docutils literal"><span class="pre">False</span></tt> (i.e. allow comments +and use your Mercurial username)).</dd> +<dt><tt class="docutils literal"><span class="pre">--address</span> <span class="pre">VALUE</span></tt></dt> +<dd>Run the web interface on the specified address (default: <tt class="docutils literal"><span class="pre">127.0.0.1</span></tt>).</dd> +<dt><tt class="docutils literal"><span class="pre">--port</span> <span class="pre">VALUE</span></tt></dt> +<dd>Run the web interface on the specified port (default: <tt class="docutils literal"><span class="pre">8080</span></tt>).</dd> +</dl> </div> </div> @@ -74,9 +244,11 @@ <h3><a href="index.html">Table Of Contents</a></h3> <ul> <li><a class="reference external" href="#">Command Line Interface</a><ul> -<li><a class="reference external" href="#review">review</a></li> +<li><a class="reference external" href="#review"><tt class="docutils literal"><span class="pre">review</span></tt></a></li> +<li><a class="reference external" href="#init"><tt class="docutils literal"><span class="pre">--init</span></tt></a></li> <li><a class="reference external" href="#comment"><tt class="docutils literal"><span class="pre">--comment</span></tt></a></li> <li><a class="reference external" href="#signoff"><tt class="docutils literal"><span class="pre">--signoff</span></tt></a></li> +<li><a class="reference external" href="#edit"><tt class="docutils literal"><span class="pre">--edit</span></tt></a></li> <li><a class="reference external" href="#check"><tt class="docutils literal"><span class="pre">--check</span></tt></a></li> <li><a class="reference external" href="#web"><tt class="docutils literal"><span class="pre">--web</span></tt></a></li> </ul>
--- a/hg-review/index.html Sat Jul 03 15:12:45 2010 -0400 +++ b/hg-review/index.html Mon Jul 05 23:33:29 2010 -0400 @@ -92,9 +92,11 @@ </ul> </li> <li class="toctree-l1"><a class="reference external" href="cli.html">Command Line Interface</a><ul> -<li class="toctree-l2"><a class="reference external" href="cli.html#review">review</a></li> +<li class="toctree-l2"><a class="reference external" href="cli.html#review"><tt class="docutils literal"><span class="pre">review</span></tt></a></li> +<li class="toctree-l2"><a class="reference external" href="cli.html#init"><tt class="docutils literal"><span class="pre">--init</span></tt></a></li> <li class="toctree-l2"><a class="reference external" href="cli.html#comment"><tt class="docutils literal"><span class="pre">--comment</span></tt></a></li> <li class="toctree-l2"><a class="reference external" href="cli.html#signoff"><tt class="docutils literal"><span class="pre">--signoff</span></tt></a></li> +<li class="toctree-l2"><a class="reference external" href="cli.html#edit"><tt class="docutils literal"><span class="pre">--edit</span></tt></a></li> <li class="toctree-l2"><a class="reference external" href="cli.html#check"><tt class="docutils literal"><span class="pre">--check</span></tt></a></li> <li class="toctree-l2"><a class="reference external" href="cli.html#web"><tt class="docutils literal"><span class="pre">--web</span></tt></a></li> </ul>
--- a/hg-review/overview.html Sat Jul 03 15:12:45 2010 -0400 +++ b/hg-review/overview.html Mon Jul 05 23:33:29 2010 -0400 @@ -67,17 +67,21 @@ </div> <div class="section" id="usage"> <h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2> -<p>The easiest way to work with hg-review is with the <a class="reference external" href="webui.html"><em>web interface</em></a>. There’s also a command-line interface, but it’s really easiest to -work with the web ui.</p> +<p>The easiest way to work with hg-review is with the <a class="reference external" href="webui.html"><em>web interface</em></a>. There’s also a <a class="reference external" href="cli.html"><em>command-line interface</em></a>, but it’s +easiest to work with the web interface.</p> <div class="section" id="projects-with-existing-code-reviews"> <h3>Projects with Existing Code Reviews<a class="headerlink" href="#projects-with-existing-code-reviews" title="Permalink to this headline">¶</a></h3> -<p>If you want to work with a repository that already has code review set up, all -you need to do is cd into that repository, run <tt class="docutils literal"><span class="pre">hg</span> <span class="pre">review</span> <span class="pre">--init</span></tt> to pull -down the review data, and then run <tt class="docutils literal"><span class="pre">hg</span> <span class="pre">review</span> <span class="pre">--web</span></tt> to fire up the web ui.</p> +<p>If you want to work with a repository that already has code review set up all +you need to do is cd into that repository, pull down the review data, and fire +up the web ui:</p> +<div class="highlight-python"><pre>cd ~/src/someproject +hg review --init +hg review --web</pre> +</div> <p>Once that’s done you can visit <a class="reference external" href="http://localhost:8080/">http://localhost:8080/</a> in your browser to start reviewing.</p> <p>You should read over the <a class="reference external" href="concepts.html"><em>concepts</em></a> documentation to make sure -you know how hg-review works, and the <a class="reference external" href="webui.html"><em>web interface</em></a> +you know how hg-review works and the <a class="reference external" href="webui.html"><em>web interface</em></a> documentation for a quick tour of how to use the web UI.</p> </div> <div class="section" id="projects-without-existing-code-reviews">
--- a/hg-review/searchindex.js Sat Jul 03 15:12:45 2010 -0400 +++ b/hg-review/searchindex.js Mon Jul 05 23:33:29 2010 -0400 @@ -1,1 +1,1 @@ -Search.setIndex({desctypes:{},terms:{all:[2,4,5],concept:[0,5,2],mile:5,hate:[],depend:[2,4],flask:2,init:[0,4,2],program:[7,5],under:7,sourc:2,fals:4,faq:7,offlin:5,affect:7,relev:4,disturb:[],did:5,list:5,"try":5,gut:5,quick:2,pleas:2,prevent:4,natur:5,sign:5,past:5,second:5,port:4,even:[4,5],index:[],what:[0,4],poke:0,section:4,abl:4,remain:5,access:[2,4],version:[2,7,5],"new":2,hgreview:2,"public":[2,4],can:[2,4,5],full:5,never:5,here:0,let:[2,4,5],address:4,locat:2,search:[],sjl:[0,4,2],opinion:5,chang:5,chanc:5,although:4,extra:4,backout:5,appli:5,modul:[],brought:5,api:[0,3],instal:[0,4,2],from:5,would:5,visit:[2,4],two:5,next:2,few:[2,4,5],live:4,recommend:5,decentr:5,type:5,tell:5,more:[0,4,5],peopl:[4,5],site_root:4,train:5,particular:5,hold:2,easiest:2,car:5,work:[2,7,5],histori:5,anon_us:4,whatev:5,learn:[0,7],purpos:5,root:5,control:5,distrubut:5,quickstart:0,indic:[],want:[0,7,4,2],alwai:5,goal:5,turn:5,anoth:5,read_onli:4,how:[2,7,4,5],anyon:[2,4],instead:[4,5],simpl:[0,5],isn:5,product:5,clone:[0,4,2],befor:[4,5],wrong:5,plane:5,embrac:5,mai:[],data:[0,5,4,3,2],practic:5,bind:4,inform:4,combin:4,allow:4,talk:5,help:5,over:2,move:5,approv:5,becaus:[4,5],top:5,held:5,hgrc:[0,4,2],perfect:5,write:5,fix:5,better:5,solitari:[],decad:5,might:[2,7,5],easier:5,them:[2,4,5],greater:5,thei:5,python:[0,3,2],initi:[0,2],jinja2:2,half:5,now:[0,4,2],choic:0,somewher:[0,2],name:4,anyth:[0,5],edit:[4,5],gerrit:5,separ:5,easili:4,mode:4,each:5,mean:5,idea:5,realli:[2,5],year:5,our:5,out:[0,5],accomplish:5,goe:5,content:[],got:[0,4],gunicorn:4,insid:5,ask:5,org:[0,4,2],care:[4,5],could:5,keep:5,thing:[2,5],perhap:5,place:0,perman:4,think:5,first:[0,5,4,2],onc:[2,4],sometim:4,alreadi:[0,2],done:2,open:[0,2],primari:5,ont:[],gpl:7,differ:5,script:4,interact:5,gpg:5,mkdir:4,system:5,mercuri:[0,5,7,4,2],store:5,listen:4,luckili:0,option:4,especi:5,tool:[0,5],copi:4,biggest:5,part:4,exactli:5,than:[0,5],serv:4,kind:5,provid:[5,1,4],structur:[0,5],provic:[],project:[2,4,5],matter:2,friend:5,were:5,toward:5,browser:[0,2],sai:5,viewer:4,ani:[2,7,4,5],myproject:4,have:[2,4,5],tabl:[],need:[0,5,4,2],seen:5,seem:5,built:4,also:[2,5],exampl:[2,4,5],take:[4,5],sure:2,distribut:[0,7,4,5],deploy:[0,4],track:5,licens:[0,7],most:[4,5],plai:0,deploi:4,everyth:4,don:[2,5],url:2,later:[2,7,5],doe:5,left:4,someth:[2,4],changeset:[2,5],wsgi:4,signoff:[0,5,1,4],hack:[0,6],find:5,impact:5,yoursit:4,onli:[2,4,5],layout:[0,6],configur:4,should:[2,7,4,5],local:[0,5,4,2],get:2,bear:5,repo:[2,4],made:4,report:[0,2],requir:2,enabl:0,remot:[2,5],integr:0,contain:5,grab:4,where:4,wrote:5,view:4,set:[2,4,5],see:[2,4],expertis:5,review:[0,1,2,4,5,6,7],behind:5,won:5,simplest:5,"import":4,awai:[0,5],experi:5,approach:5,extens:[0,4,2],both:2,howev:5,anon:4,instanc:4,com:4,comment:[0,5,1,4],simpli:5,point:4,overview:[0,2],period:5,path:[0,4,2],guid:0,reviewboard:5,code:[0,5,4,2],coupl:2,been:5,basic:[0,5],oth:[],fire:[2,4],thousand:5,atlassian:5,understand:5,"catch":5,impati:0,crucibl:5,look:[7,4,5],"while":[2,5],error:[2,5],anonym:4,advantag:5,readi:[0,2],worri:2,itself:[0,7,5],clutter:[2,5],uncom:4,conf:4,sever:5,develop:[0,5],welcom:[],author:[4,5],perform:0,suggest:2,make:[2,5],tour:2,same:[7,5],document:[0,6,2],http:[0,4,2],webserv:4,someon:5,hand:5,user:[0,5],whole:5,well:2,person:5,without:[2,4,5],command:[0,4,1,2],thi:[0,5,7,4,2],programm:[],model:5,usual:[],just:[2,5],when:[0,4,5],collabor:5,web:[0,4,1,2],easi:5,had:5,littl:5,add:[0,4,2],els:5,useless:5,applic:0,around:[0,5],format:[0,3],read:[2,4,5],know:[0,5,2],insert:4,like:[2,4,5],specif:5,changelog:2,server:[0,4,5],necessari:[4,5],popular:5,page:7,encount:2,www:4,right:0,often:5,some:[0,5],back:5,intern:5,sampl:4,home:[],avoid:5,though:5,definit:5,usernam:4,localhost:[0,4,2],refer:4,machin:5,creatur:[],run:[0,4,2],power:5,usag:[0,2],sacrif:5,host:2,repositori:[0,5,4,3,2],post:2,src:5,about:[2,7,5],central:5,unfortun:5,commit:[2,5],own:[0,5],pythonpath:4,within:5,down:[2,4],contrib:4,subvers:5,your:[0,5,4,2],manag:5,git:5,lof:[],log:5,wai:[2,5],support:5,start:[0,5,4,2],reli:5,interfac:[0,4,1,2],includ:[4,5],lot:5,"var":4,hei:5,"function":5,form:5,bundl:2,neutral:5,yourproject:[4,5],line:[0,5,4,1,2],"true":4,bug:[0,2],pull:[2,4,5],rietveld:5,possibl:5,"default":4,allow_anon_com:4,below:4,problem:[2,5],creat:[2,7,4,5],doesn:5,exist:[2,5],file:[0,5,4,3,2],check:[0,1,2],probabl:[2,4],echo:4,googl:[],titl:4,tip:[],other:[0,5,4,2],normal:[4,5],test:[0,6],you:[0,5,7,4,2],nice:4,meaning:[],ago:5,bitbucket:[0,4,2],directori:[0,5,4,2],time:2,push:[4,5]},titles:["hg-review documentation","Command Line Interface","Overview","API","Web Interface","Concepts","Hacking hg-review","Licensing"],modules:{},descrefs:{},filenames:["index","cli","overview","dev","webui","concepts","hacking","licensing"]}) \ No newline at end of file +Search.setIndex({desctypes:{},terms:{all:[2,5,1,4],concept:[0,5,2],mile:5,follow:1,hate:[],decid:1,depend:[2,4],flask:2,init:[0,4,1,2],program:[7,5],under:7,sourc:2,fals:[1,4],faq:7,offlin:5,failur:1,affect:7,relev:4,disturb:[],level:1,did:5,list:[1,5],"try":5,item:1,stderr:1,gut:5,quick:2,pleas:2,prevent:4,natur:5,sign:[1,5],past:5,second:5,design:4,pass:1,port:[1,4],even:[4,5],index:[],what:[0,1,4],poke:0,section:4,abl:4,remain:5,current:[1,4],delet:[],version:[2,7,5],"new":[2,1,4],hgreview:[2,1],ever:4,"public":[2,1,4],can:[2,5,1,4],full:[1,5],never:[4,5],here:0,let:[2,4,5],address:[1,4],layout:[0,6],valu:1,search:[],sjl:[0,4,2],action:[],opinion:5,chang:[1,5],chanc:[4,5],repositori:[0,1,2,3,4,5],extra:4,backout:5,appli:5,modul:[],brought:5,filenam:1,api:[0,3],visibl:4,instal:[0,4,2],yourself:1,from:[1,5],describ:1,would:[1,5],visit:[2,1,4],two:[1,5],next:2,few:[2,4,5],live:[1,4],recommend:5,decentr:5,type:5,tell:5,more:[0,5,1,4],peopl:[4,5],site_root:4,train:5,particular:5,hold:[2,1],easiest:2,none:1,someproject:2,left:4,car:5,work:[2,7,5],histori:5,anon_us:4,whatev:5,learn:[0,7],purpos:5,root:5,fetch:4,control:5,distrubut:5,quickstart:0,share:[],indic:1,topic:1,want:[0,7,4,1,2],unfortun:5,alwai:[5,1,4],goal:5,thing:[2,1,5],anoth:5,write:5,how:[2,7,4,5],anyon:[2,4],instead:[5,1,4],simpl:[0,5],perman:4,product:5,subcommand:1,clone:[0,4,1,2],befor:[4,5],wrong:[4,5],plane:5,embrac:5,mai:[],data:[0,1,2,3,4,5],"short":1,practic:5,bind:4,caus:4,inform:4,combin:4,allow:[1,4],order:1,talk:5,help:[1,5],over:2,move:5,approv:5,becaus:[4,5],top:5,held:5,comma:1,hgrc:[0,4,2],mainli:1,perfect:5,read_onli:4,fix:5,better:5,solitari:[],window:[],restart:4,commmit:1,decad:5,main:4,might:[2,7,5],easier:5,them:[2,4,5],good:1,"return":1,greater:5,thei:5,python:[0,3,2],initi:[0,4,1,2],jinja2:2,half:5,now:[0,4,2],choic:[0,1],somewher:[0,2],name:4,anyth:[0,5],edit:[0,5,1,4],gerrit:5,separ:[1,5],easili:4,mode:4,each:[1,5],debug:1,updat:4,mean:[1,5],replac:1,individu:1,idea:5,realli:5,ensur:1,year:5,our:5,out:[0,5],shown:1,accomplish:5,goe:5,rev:1,content:1,print:1,got:[0,4],gunicorn:4,insid:5,given:1,ask:5,org:[0,4,2],care:[4,5],launch:[],could:[4,5],keep:[4,5],turn:5,perhap:5,place:0,isn:5,think:[1,5],first:[0,5,4,1,2],mdown:1,onc:[2,4],number:1,sometim:4,hook:4,alreadi:[0,1,2],done:[2,4],least:1,open:[0,1,2],primari:5,ont:[],gpl:7,differ:[1,5],script:[1,4],interact:5,gpg:5,mkdir:4,system:5,messag:1,mercuri:[0,1,2,4,5,7],attach:1,store:5,listen:4,luckili:0,option:[1,4],especi:5,tool:[0,5],copi:4,specifi:1,"var":4,part:4,exactli:[1,5],than:[0,5],serv:4,cron:4,kind:[4,5],provid:[5,1,4],structur:[0,5],provic:[],project:[2,5,1,4],matter:2,friend:5,were:5,toward:5,browser:[0,1,2],sai:5,viewer:4,modern:1,ani:[2,5,7,1,4],myproject:4,have:[2,5,1,4],tabl:[],need:[0,5,4,1,2],seen:[1,5],seem:[4,5],built:4,also:[2,1,5],exampl:[2,4,5],take:[4,5],noth:1,sure:2,distribut:[0,7,4,5],deploy:[0,4],track:5,licens:[0,7],glog:[],most:[5,1,4],plai:0,deploi:4,everyth:4,don:[2,5,1,4],url:[2,1],later:[2,7,5],doe:[1,5],latest:4,someth:[2,4],changeset:[2,5,1,4],wsgi:4,signoff:[0,5,1,4],show:1,text:[],verbos:1,hack:[0,6],find:[1,5],impact:5,yoursit:4,onli:[2,5,1,4],locat:2,configur:4,state:1,should:[2,5,7,1,4],local:[0,5,4,2],get:[2,1],stop:1,bear:5,autom:4,repo:[2,4],rietveld:5,report:[0,2],awai:[0,5],requir:[2,1],enabl:[0,1],remot:[2,1,5],bad:1,integr:0,contain:5,grab:4,where:[1,4],wrote:5,view:[1,4],set:[2,5,1,4],see:[2,4],num:1,fail:1,expertis:5,statu:1,review:[0,1,2,4,5,6,7],behind:5,won:[4,5],simplest:5,"import":4,neither:1,experi:5,approach:5,parent:[],disallow:1,extens:[0,4,1,2],job:4,both:2,howev:5,quiet:1,tour:2,instanc:4,context:1,com:4,comment:[0,5,1,4],markdown:1,simpli:[4,5],point:4,overview:[0,2],period:5,path:[0,4,1,2],diff:1,guid:0,reviewboard:5,code:[0,5,4,1,2],coupl:2,been:5,mark:1,interpret:[],basic:[0,5],immedi:4,oth:[],fire:[2,4],thousand:5,atlassian:5,understand:5,"catch":5,impati:0,those:1,crucibl:5,look:[7,4,5],"while":[2,5],unifi:1,error:[2,1,5],anonym:[1,4],advantag:5,ctrl:1,readi:[0,2],canon:1,worri:2,itself:[0,7,5],clutter:[2,5],uncom:4,conf:4,revis:1,sever:[1,5],develop:[0,5],welcom:[],author:[4,5],perform:[0,1],suggest:2,make:[2,1,5],anon:[1,4],same:[5,7,1,4],document:[0,6,2],conflict:4,http:[0,4,1,2],webserv:4,yese:1,someon:[5,1,4],hand:5,user:[0,4,5],task:1,off:1,whole:[1,5],well:[2,4],person:5,without:[2,4,5],command:[0,4,1,2],thi:[0,1,2,4,5,7],programm:[],model:5,usual:[],identifi:1,just:[2,5],tip:[],collabor:[1,5],web:[0,4,1,2],easi:5,had:5,except:1,littl:5,add:[0,4,1,2],els:[1,5],useless:5,applic:0,around:[0,5],format:[0,1,3],read:[2,5,1,4],know:[0,5,2],insert:4,like:[2,5,1,4],specif:[1,5],changelog:2,manual:4,server:[0,4,5],necessari:[4,5],popular:5,output:1,page:7,encount:[2,4],www:4,right:[0,1],often:5,some:[0,5,1,4],back:[4,5],intern:5,sampl:4,home:[],avoid:5,though:5,definit:5,usernam:[1,4],localhost:[0,4,1,2],refer:4,machin:5,creatur:[],run:[0,4,1,2],power:5,usag:[0,1,2],sacrif:5,host:2,although:4,post:2,src:[2,5],about:[2,7,5],central:5,manag:5,includ:[4,5],commit:[2,1,5],own:[0,1,5],pythonpath:4,within:5,automat:4,down:[2,4],contrib:4,subvers:5,your:[0,5,4,1,2],merg:4,git:5,lof:[],log:5,wai:[2,5],support:5,start:[0,5,4,1,2],reli:5,interfac:[0,4,1,2],editor:1,lot:5,biggest:5,hei:5,"function":5,head:4,form:5,forc:[],bundl:2,neutral:[1,5],yourproject:[4,5],gain:1,line:[0,5,4,1,2],inlin:1,"true":4,bug:[0,2],pull:[2,5,1,4],made:4,possibl:[1,5],whether:1,access:[2,4],allow_anon_com:4,displai:1,below:[1,4],otherwis:1,problem:[2,4,5],creat:[2,5,7,1,4],doesn:[4,5],exist:[2,5],file:[0,1,2,3,4,5],check:[0,1,2],probabl:[2,1,4],echo:4,googl:[],titl:4,when:[0,5,1,4],detail:1,"default":[1,4],other:[0,5,4,1,2],normal:[4,5],test:[0,6,1],you:[0,1,2,4,5,7],nice:4,meaning:[],ago:5,bitbucket:[0,4,2],receiv:4,directori:[0,5,4,2],time:[2,1],push:[5,1,4]},titles:["hg-review documentation","Command Line Interface","Overview","API","Web Interface","Concepts","Hacking hg-review","Licensing"],modules:{},descrefs:{},filenames:["index","cli","overview","dev","webui","concepts","hacking","licensing"]}) \ No newline at end of file
--- a/hg-review/webui.html Sat Jul 03 15:12:45 2010 -0400 +++ b/hg-review/webui.html Mon Jul 05 23:33:29 2010 -0400 @@ -92,6 +92,8 @@ <p>Although hg-review is built for <em>distributed</em> code review it’s sometimes nice to provide a public interface. This will let people can comment easily without using the extension (or even cloning your project).</p> +<div class="section" id="initial-deployment"> +<h3>Initial Deployment<a class="headerlink" href="#initial-deployment" title="Permalink to this headline">¶</a></h3> <p>You can use any WSGI server you like to provide a public instance of hg-review. Before you start you’ll need to have Mercurial installed on your web server.</p> <p>Once you’ve got Mercurial running on the server you’ll need to clone copies of @@ -103,12 +105,15 @@ <p>Then grab a copy of hg-review:</p> <div class="highlight-python"><pre>hg clone http://bitbucket.org/sjl/hg-review/</pre> </div> -<p>Grab a copy of your project and configure it to use the hg-review extension:</p> -<div class="highlight-python"><pre>hg clone http://bitbucket.org/you/yourproject/ +<p>Grab a copy of your project and configure it to use the hg-review extension as +well as the built-in <a class="reference external" href="http://mercurial.selenic.com/wiki/FetchExtension">fetch</a> extension (to +automatically merge updates):</p> +<div class="highlight-python"><pre>hg clone -U http://bitbucket.org/you/yourproject/ cd yourproject echo '[extensions]' >> .hg/hgrc -echo 'review = /var/www/myproject-review-interface/hg-review/review' >> .hg/hgrc</pre> +echo 'review = /var/www/myproject-review-interface/hg-review/review' >> .hg/hgrc +echo 'fetch = ' >> .hg/hgrc</pre> </div> <p>Use hg-review to pull down the review data:</p> <div class="highlight-python"><pre>hg review --init</pre> @@ -141,6 +146,39 @@ <a class="reference external" href="http://gunicorn.org/">Gunicorn</a> is provided in <tt class="docutils literal"><span class="pre">contrib/deploy/gunicorn.conf.py</span></tt>.</p> </div> +<div class="section" id="updating-the-data"> +<h3>Updating the Data<a class="headerlink" href="#updating-the-data" title="Permalink to this headline">¶</a></h3> +<p>You’ll want to keep the review data for this interface current so users can see +all the latest comments and signoffs.</p> +<p>To do this you simply need to pull in the main repository (to receive new +changesets in your project) and fetch in the review data repository (to receive +new comments and signoffs):</p> +<div class="highlight-python"><pre>hg -R /var/www/myproject-review-interface/ pull +hg -R /var/www/myproject-review-interface/.hg/review fetch</pre> +</div> +<p>New comments and signoffs will be visible immediately – you don’t need to +restart your WSGI server.</p> +<p>You’ll probably want to set this up as a cron job or use a hook of some kind +to automate the updates.</p> +<p>If you allow anonymous comments and want people that are using the extension +locally (instead of this public instance) to see these comments, you’ll need to +<em>fetch and push</em> the review data repo as well:</p> +<div class="highlight-python"><pre>hg -R /var/www/myproject-review-interface/.hg/review/ fetch +hg -R /var/www/myproject-review-interface/.hg/review/ push</pre> +</div> +<p>hg-review is designed to never encounter merge conflicts with its data, but +there’s always the chance that someone has done something manually that could +cause a problem.</p> +<p>If your interface doesn’t seem to be receiving new comments/signoffs you’ll +want to take a look at the review data repository to see what’s wrong:</p> +<div class="highlight-python"><pre>cd /var/www/myproject-review-interface/.hg/review +hg heads</pre> +</div> +<p>There should only ever be one head in this repository. If there are more you’ll +need to merge them (and push back to your public review data repo so others +won’t encounter the same problem).</p> +</div> +</div> </div> @@ -153,7 +191,11 @@ <ul> <li><a class="reference external" href="#">Web Interface</a><ul> <li><a class="reference external" href="#running-locally">Running Locally</a></li> -<li><a class="reference external" href="#deployment-to-a-server">Deployment to a Server</a></li> +<li><a class="reference external" href="#deployment-to-a-server">Deployment to a Server</a><ul> +<li><a class="reference external" href="#initial-deployment">Initial Deployment</a></li> +<li><a class="reference external" href="#updating-the-data">Updating the Data</a></li> +</ul> +</li> </ul> </li> </ul>