hg-review/overview.html @ 15d3b832fdc5 default tip

cl-digraph: Update site.
author Steve Losh <steve@stevelosh.com>
date Wed, 21 Jun 2023 15:21:12 -0400
parents 4d3e09234d86
children (none)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Overview &mdash; hg-review vpre-alpha documentation</title>
    <link rel="stylesheet" href="_static/review.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     'pre-alpha',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="hg-review vpre-alpha documentation" href="index.html" />
    <link rel="next" title="Concepts" href="concepts.html" />
    <link rel="prev" title="hg-review documentation" href="index.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="concepts.html" title="Concepts"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="index.html" title="hg-review documentation"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">hg-review vpre-alpha documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="overview">
<h1>Overview<a class="headerlink" href="#overview" title="Permalink to this headline">¶</a></h1>
<p>Let&#8217;s get started using hg-review.  No matter how you want to use it, you need
to install it first.</p>
<div class="section" id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2>
<p>hg-review requires <a class="reference external" href="http://python.org">Python</a> 2.5 or later and <a class="reference external" href="http://hg-scm.org">Mercurial</a> 1.6 or later.</p>
<p>You probably have both of these requirements already, but if you encounter
problems you might want to check these first with <tt class="docutils literal"><span class="pre">python</span> <span class="pre">--version</span></tt> and
<tt class="docutils literal"><span class="pre">hg</span> <span class="pre">--version</span></tt>.</p>
<p>hg-review also depends on a couple of other things like <a class="reference external" href="http://flask.pocoo.org">Flask</a> and <a class="reference external" href="http://jinja.pocoo.org/2/">Jinja2</a>, but it
bundles these requirements so you don&#8217;t need to worry about them.</p>
<p>To install hg-review, first clone the extension somewhere:</p>
<div class="highlight-python"><pre>hg clone http://bitbucket.org/sjl/hg-review/</pre>
</div>
<p>Then add it to your <tt class="docutils literal"><span class="pre">~/.hgrc</span></tt> file:</p>
<div class="highlight-python"><pre>[extensions]
review = [path to]/hg-review/review/</pre>
</div>
</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&#8217;s also a <a class="reference external" href="cli.html"><em>command-line interface</em></a>, but it&#8217;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, and fire up the web ui:</p>
<div class="highlight-python"><pre>cd ~/src/someproject
hg review --web</pre>
</div>
<p>Once that&#8217;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>
documentation for a quick tour of how to use the web UI.</p>
</div>
<div class="section" id="projects-without-existing-code-reviews">
<h3>Projects without Existing Code Reviews<a class="headerlink" href="#projects-without-existing-code-reviews" title="Permalink to this headline">¶</a></h3>
<p>If you want to <em>start</em> using hg-review with a repository, you need to do a few
things to get it ready. You&#8217;ll want to end up with something like this:</p>
<div align="center" class="align-center"><img alt="hg-review basic structure diagram" class="align-center" src="_images/basic.png" /></div>
<p>First, create a public repository to hold the code review data. This repository
should be in a location that&#8217;s accessible by anyone that needs to see the
review data.</p>
<p>For example, if you&#8217;re working on an open-source project that&#8217;s hosted at
<a class="reference external" href="http://bitbucket.org/you/project/">http://bitbucket.org/you/project/</a> you should create a new repository for
the review data at <a class="reference external" href="http://bitbucket.org/you/project-review/">http://bitbucket.org/you/project-review/</a></p>
<p>Next you&#8217;ll need to initialize the review data in your project. <tt class="docutils literal"><span class="pre">cd</span></tt> into you
project&#8217;s directory and run:</p>
<div class="highlight-python"><pre>hg review --init --remote-path URL</pre>
</div>
<p>The <tt class="docutils literal"><span class="pre">URL</span></tt> should be the <em>public</em> URL of the review repo you just created.</p>
<p>This command will create a <em>local</em> review data repo for you in <tt class="docutils literal"><span class="pre">.hg/review</span></tt>,
as well as an <tt class="docutils literal"><span class="pre">.hgreview</span></tt> file in your project. You need to commit this
<tt class="docutils literal"><span class="pre">.hgreview</span></tt> file to your project with the command that hg-review suggested.</p>
<p>Don&#8217;t worry, this is the only time hg-review will make you commit something to
your project&#8217;s repository and clutter up its changelog.</p>
<p>Now you can get to work reviewing changesets with the web interface by
running <tt class="docutils literal"><span class="pre">hg</span> <span class="pre">review</span> <span class="pre">--web</span></tt> in your project.</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>
documentation for a quick tour of how to use the web UI.</p>
</div>
</div>
<div class="section" id="reporting-bugs">
<h2>Reporting Bugs<a class="headerlink" href="#reporting-bugs" title="Permalink to this headline">¶</a></h2>
<p>If you encounter any errors while using hg-review please <a class="reference external" href="http://bitbucket.org/sjl/hg-review/issues/">post a bug</a>.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h3><a href="index.html">Table Of Contents</a></h3>
            <ul>
<li><a class="reference external" href="#">Overview</a><ul>
<li><a class="reference external" href="#installation">Installation</a></li>
<li><a class="reference external" href="#usage">Usage</a><ul>
<li><a class="reference external" href="#projects-with-existing-code-reviews">Projects with Existing Code Reviews</a></li>
<li><a class="reference external" href="#projects-without-existing-code-reviews">Projects without Existing Code Reviews</a></li>
</ul>
</li>
<li><a class="reference external" href="#reporting-bugs">Reporting Bugs</a></li>
</ul>
</li>
</ul>

            <h4>Previous topic</h4>
            <p class="topless"><a href="index.html"
                                  title="previous chapter">hg-review documentation</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="concepts.html"
                                  title="next chapter">Concepts</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="_sources/overview.txt"
                     rel="nofollow">Show Source</a></li>
            </ul>
          <div id="searchbox" style="display: none">
            <h3>Quick search</h3>
              <form class="search" action="search.html" method="get">
                <input type="text" name="q" size="18" />
                <input type="submit" value="Go" />
                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
              </form>
              <p class="searchtip" style="font-size: 90%">
              Enter search terms or a module, class or function name.
              </p>
          </div>
          <script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="concepts.html" title="Concepts"
             >next</a> |</li>
        <li class="right" >
          <a href="index.html" title="hg-review documentation"
             >previous</a> |</li>
        <li><a href="index.html">hg-review vpre-alpha documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
      &copy; Copyright 2010, Steve Losh and contributors.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.7.
    </div>
  </body>
</html>