# HG changeset patch # User Steve Losh # Date 1278387209 14400 # Node ID 429b1794ba06792a0eb144bbef8e1500ba459213 # Parent 3d3a3f9e8d6c888aa41f9710ae81fec8c35b9b2c hg-review: Update documentation. diff -r 3d3a3f9e8d6c -r 429b1794ba06 hg-review/_sources/cli.txt --- 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 ` 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 ` subcommand (default: ``false``). + +``--debug`` + Show the full identifier of each comment and signoff, mainly for use with + the :ref:`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``). + diff -r 3d3a3f9e8d6c -r 429b1794ba06 hg-review/_sources/overview.txt --- 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 -`. There's also a command-line interface, but it's really easiest to -work with the web ui. +`. There's also a :doc:`command-line interface `, 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 ` documentation to make sure -you know how hg-review works, and the :doc:`web interface ` +you know how hg-review works and the :doc:`web interface ` documentation for a quick tour of how to use the web UI. Projects without Existing Code Reviews diff -r 3d3a3f9e8d6c -r 429b1794ba06 hg-review/_sources/webui.txt --- 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 +`_ 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 `_ 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). diff -r 3d3a3f9e8d6c -r 429b1794ba06 hg-review/_static/review.css --- 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; -} diff -r 3d3a3f9e8d6c -r 429b1794ba06 hg-review/_static/review.less --- 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; - } -} diff -r 3d3a3f9e8d6c -r 429b1794ba06 hg-review/cli.html --- 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 @@

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 web interface 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.

-

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: .).
+
--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 edit subcommand (default: false).
+
--debug
+
Show the full identifier of each comment and signoff, mainly for use with +the edit subcommand (default: false).
+
+
+
+

--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.
+
-

--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).
+
-

--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).
+
+
+
+

--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.
+
-

--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”)).
+
-

--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).
+
@@ -74,9 +244,11 @@

Table Of Contents

  • Command Line Interface diff -r 3d3a3f9e8d6c -r 429b1794ba06 hg-review/overview.html --- 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 @@

    Usage

    -

    The easiest way to work with hg-review is with the web interface. There’s also a command-line interface, but it’s really easiest to -work with the web ui.

    +

    The easiest way to work with hg-review is with the web interface. There’s also a command-line interface, 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 concepts documentation to make sure -you know how hg-review works, and the web interface +you know how hg-review works and the web interface documentation for a quick tour of how to use the web UI.

    diff -r 3d3a3f9e8d6c -r 429b1794ba06 hg-review/searchindex.js --- 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 diff -r 3d3a3f9e8d6c -r 429b1794ba06 hg-review/webui.html --- 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 @@

    Although hg-review is built for distributed 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).

    +
    +

    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.

    Once you’ve got Mercurial running on the server you’ll need to clone copies of @@ -103,12 +105,15 @@

    Then grab a copy of hg-review:

    hg clone http://bitbucket.org/sjl/hg-review/
    -

    Grab a copy of your project and configure it to use the hg-review extension:

    -
    hg clone http://bitbucket.org/you/yourproject/
    +

    Grab a copy of your project and configure it to use the hg-review extension as +well as the built-in fetch extension (to +automatically merge updates):

    +
    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 'review = /var/www/myproject-review-interface/hg-review/review' >> .hg/hgrc +echo 'fetch = ' >> .hg/hgrc

    Use hg-review to pull down the review data:

    hg review --init
    @@ -141,6 +146,39 @@ Gunicorn 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).

    +
    +
    @@ -153,7 +191,11 @@