docs/overview.rst @ bdfacbcf700e default tip
Friendlier patch urls & mimetype Replace /changeset/<revset>/patch/ by /changeset/<revset>.patch and set the mimetype to text/x-diff. This helps the browser opening the right application thanks to the mimetype, and the application to better guess the file type thanks to the '.patch' extension
| author | Christophe de Vienne <christophe@cdevienne.info> | 
|---|---|
| date | Fri, 19 Aug 2016 18:58:14 +0200 | 
| parents | e5cc5cf29c7e | 
| children | (none) | 
Overview ======== Let's get started using hg-review. No matter how you want to use it, you need to install it first. Installation ------------ hg-review requires `Python <http://python.org>`_ 2.5 or later and `Mercurial <http://hg-scm.org>`_ 1.6 or later. You probably have both of these requirements already, but if you encounter problems you might want to check these first with ``python --version`` and ``hg --version``. hg-review also depends on a couple of other things like `Flask <http://flask.pocoo.org>`_ and `Jinja2 <http://jinja.pocoo.org/2/>`_, but it bundles these requirements so you don't need to worry about them. To install hg-review, first clone the extension somewhere:: hg clone http://bitbucket.org/sjl/hg-review/ Then add it to your ``~/.hgrc`` file:: [extensions] review = [path to]/hg-review/review/ TortoiseHG ~~~~~~~~~~ People using TortoiseHG on Windows platforms need to update the tortoisehg `library.zip`. This is easily done by running the `contrib\\windows\\update_tortoisehg_libs.py` script. Do to that, you need to have python 2.7 installed:: python contrib\windows\update_tortoisehg_libs.py Usage ----- The easiest way to work with hg-review is with the :doc:`web interface </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, and fire up the web ui:: cd ~/src/someproject 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>` documentation for a quick tour of how to use the web UI. Projects without Existing Code Reviews '''''''''''''''''''''''''''''''''''''' If you want to *start* using hg-review with a repository, you need to do a few things to get it ready. You'll want to end up with something like this: .. image:: /_static/basic.png :alt: hg-review basic structure diagram :align: center First, create a public repository to hold the code review data. This repository should be in a location that's accessible by anyone that needs to see the review data. For example, if you're working on an open-source project that's hosted at http://bitbucket.org/you/project/ you should create a new repository for the review data at http://bitbucket.org/you/project-review/ Next you'll need to initialize the review data in your project. ``cd`` into you project's directory and run:: hg review --init --remote-path URL The ``URL`` should be the *public* URL of the review repo you just created. This command will create a *local* review data repo for you in ``.hg/review``, as well as an ``.hgreview`` file in your project. You need to commit this ``.hgreview`` file to your project with the command that hg-review suggested. Don't worry, this is the only time hg-review will make you commit something to your project's repository and clutter up its changelog. Now you can get to work reviewing changesets with the web interface by running ``hg review --web`` in your project. You should read over the :doc:`concepts </concepts>` documentation to make sure you know how hg-review works, and the :doc:`web interface </webui>` documentation for a quick tour of how to use the web UI. Reporting Bugs -------------- If you encounter any errors while using hg-review please `post a bug <http://bitbucket.org/sjl/hg-review/issues/>`_.