# HG changeset patch # User Steve Losh # Date 1276640364 14400 # Node ID b45f32cad5b8a0a99382f044ec84bdd779fdda70 # Parent 180ec11788d7639b28fe08f47790e06821ee36cf cli: fix help text to look better as rst diff -r 180ec11788d7 -r b45f32cad5b8 review/extension_ui.py --- a/review/extension_ui.py Tue Jun 15 17:59:00 2010 -0400 +++ b/review/extension_ui.py Tue Jun 15 18:19:24 2010 -0400 @@ -287,23 +287,23 @@ """code review changesets in the current repository To start using the review extension with a repository, you need to - initialize the code review data: + initialize the code review data:: hg help review-init - Once you've initialized it (and cloned the review data repo to a - place where others can get to it), you can start reviewing changesets. + Once you've initialized it (and cloned the review data repo to a place + where others can get to it) you can start reviewing changesets. See the following help topics if you want to use the command-line interface: - hg help review-review - hg help review-comment - hg help review-signoff - hg help review-check + - hg help review-review + - hg help review-comment + - hg help review-signoff + - hg help review-check - Once you've reviewed some changesets, don't forget to push your - comments and signoffs so other people can view them. + Once you've reviewed some changesets don't forget to push your comments and + signoffs so other people can view them. """ if opts.pop('web'): diff -r 180ec11788d7 -r b45f32cad5b8 review/helps.py --- a/review/helps.py Tue Jun 15 17:59:00 2010 -0400 +++ b/review/helps.py Tue Jun 15 18:19:24 2010 -0400 @@ -5,28 +5,26 @@ """ INIT = r""" -hg review --init --remote-path PATH - -Initialize code review for the current 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 Mercurial repository to hold the review data at .hg/review/ +- Create a new Mercurial 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.' +- 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'`` This repository contains code review data such as comments and signoffs. It is a normal Mercurial repository, so you can push and pull review data to and from other clones of it to share your comments and signoffs. -The --remote-path option is required, and specifies the path where the +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 +that will be cloned when someone else runs ``hg review --init`` on the project. -Examples: +Examples:: hg review --init --remote-path 'http://bitbucket.org/u/project-review' hg review --init --remote-path '../project-review' @@ -34,44 +32,43 @@ """ REVIEW = r""" -hg review [-r REV] [-U CONTEXT] [--quiet] [FILE] +USAGE: hg review [-r REV] [-U CONTEXT] [--quiet] [FILE] -Show code review information about a specific revision. Diffs of all -changed files will be shown, and the line numbers printed are the ones -that should be used with 'hg review --comment --lines LINES FILE'. +If no revision is given the current parent of the working directory will be +used. -If no revision is given, the current parent of the working directory -will be shown. +Diffs of all changed files will be shown with comments inline. The line numbers +printed are the ones that should be used with ``hg review --comment --lines +LINES FILE``. -The number of lines of context in diffs can be changed with the -U option. -If any FILEs are given, only those diffs will be shown. If --quiet is used +The number of lines of context in diffs can be changed with the ``-U`` option. +If any FILEs are given, only those diffs will be shown. If ``--quiet`` is used no diffs will be shown. -If --verbose is used the short identifier of each comment/signoff will -also be shown. +If ``--verbose`` is used the short identifier of each comment/signoff will also +be shown. -If --debug is used the full identifier of each comment/signoff will also -be shown. +If ``--debug`` is used the full identifier of each comment/signoff will also be +shown. """ COMMENT = r""" -hg review --comment -m MESSAGE [-r REV] [-l LINES] [FILE] +USAGE: hg review --comment -m MESSAGE [-r REV] [-l LINES] [FILE] -If no revision is given, the current parent of the working directory -will be used. +If no revision is given the current parent of the working directory will be +used. -If no FILEs are given, the comment will be attached to the changeset -as a whole. +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 the each file as a whole. +If one or more FILEs are given but no LINES are given, the comment will be +attached to the each file as a whole. -If a FILE is given and LINES is given the comment will be attached to -those specific lines. LINES should be a comma-separated list of line -numbers (as numbered in the output of 'hg review'), such as '3' or '2,3' +If a FILE is given and LINES are given the comment will be attached to those +specific lines. LINES should be a comma-separated list of line numbers (as +numbered in the output of ``hg review``), such as ``3`` or ``2,3``. -Examples: +Examples:: hg review --comment -m 'This changeset needs to go in branch X.' hg review --comment -m 'This file should just be deleted.' script.py @@ -80,20 +77,20 @@ """ SIGNOFF = r""" -hg review --signoff -m MESSAGE [--yes | --no] [-r REV] [--force] +USAGE: hg review --signoff -m MESSAGE [--yes | --no] [-r REV] [--force] -If no revision is given, the current parent of the working directory -will be used. +If no revision is given the current parent of the working directory will be +used. -The --yes and --no options can be used to indicate whether you think +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". +individual project to decide exactly what that means. If neither option is +given the signoff will be marked as "neutral". -If you've already signed off on a changeset, you can use --force to -overwrite your previous signoff with a new one. +If you've already signed off on a changeset you can use ``--force`` to replace +your previous signoff with a new one. -Examples: +Examples:: hg review --signoff -m 'I do not work on this part of the code.' hg review --signoff --yes -m 'Thanks, this change looks good.' @@ -103,10 +100,10 @@ """ CHECK = r""" -hg review --check [-r REV] [--no-nos] [--yeses NUM] [--seen] +USAGE: hg review --check [-r REV] [--no-nos] [--yeses NUM] [--seen] -If no revision is given, the current parent of the working directory -will be used. +If no revision is given the current parent of the working directory will be +used. Check that the changeset "passes" the given tests of review status. If no tests are given an error is returned. @@ -117,13 +114,13 @@ The following tests are available: - --no-nos ensures that there are not any "no" signoffs on the changeset. +- ``--no-nos`` ensures that there are not any "no" signoffs on the changeset. - --yeses NUM ensures that at least NUM people have signed off as "yes" on - the changeset. +- ``--yeses NUM`` ensures that at least NUM people have signed off as "yes" on + the changeset. - --seen ensures that someone has commented or signed off on the changeset, - and can be used to make sure someone has at least taken a look at it. Note - that a signoff of "no" will make this test succeed. +- ``--seen`` ensures that someone has commented or signed off on the changeset, + and can be used to make sure someone has at least taken a look at it. Note + that a signoff of "no" will make this test succeed. """