Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > 27647990744ebd9cfe32398f37f67e20 > files > 2610

bzr-2.6.0-11.1.mga5.i586.rpm

<!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>Contributing to Bazaar &mdash; Bazaar 2.6.0 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '2.6.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="shortcut icon" href="_static/bzr.ico"/>

    <link rel="top" title="Bazaar 2.6.0 documentation" href="index.html" />
    <link rel="next" title="Bazaar Release Cycles" href="cycle.html" />
    <link rel="prev" title="Bazaar Developer Document Catalog" href="index.html" />
<link rel="stylesheet" href="_static/bzr-doc.css" type="text/css" />
 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="cycle.html" title="Bazaar Release Cycles"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="index.html" title="Bazaar Developer Document Catalog"
             accesskey="P">previous</a> |</li>
<li><a href="http://bazaar.canonical.com/">
    <img src="_static/bzr icon 16.png" /> Home</a>&nbsp;|&nbsp;</li>
<a href="http://doc.bazaar.canonical.com/en/">Documentation</a>&nbsp;|&nbsp;</li>

        <li><a href="index.html">Developer Document Catalog (2.6.0)</a> &raquo;</li>
 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="contributing-to-bazaar">
<h1>Contributing to Bazaar<a class="headerlink" href="#contributing-to-bazaar" title="Permalink to this headline">¶</a></h1>
<div class="section" id="talk-to-us">
<h2>Talk to us<a class="headerlink" href="#talk-to-us" title="Permalink to this headline">¶</a></h2>
<p>If you want to fix or improve something in Bazaar, we want to help you.
You can ask at any time for help, on the list, on irc, or through a merge
proposal on Launchpad.</p>
<p>In particular, the rostered
<a class="reference external" href="http://wiki.bazaar.canonical.com/PatchPilot">Patch Pilot</a>
is an experienced developer who will help you get your changes in, through
code review, advice, debugging, writing tests, or whatever it takes.</p>
<ul class="simple">
<li><a class="reference external" href="http://lists.ubuntu.com/mailman/listinfo/bazaar">Bazaar mailing list</a></li>
<li>IRC in channel <tt class="docutils literal"><span class="pre">#bzr</span></tt> on <tt class="docutils literal"><span class="pre">irc.ubuntu.com</span></tt></li>
</ul>
</div>
<div class="section" id="starting">
<h2>Starting<a class="headerlink" href="#starting" title="Permalink to this headline">¶</a></h2>
<p>Before starting on a change it&#8217;s a good idea to either file a bug, find a
relevant existing bug, or send a proposal to the list.  If there is a bug
you should set it to &#8220;In Progress&#8221; and if you wish assign it to yourself.</p>
<p>You might like to start with a bug tagged <a class="reference external" href="https://bugs.launchpad.net/bzr/+bugs?field.tag=easy">easy</a>.</p>
<p>If you are wondering if your understanding of the bug is correct, or if the
approach you have in mind is likely to work, feel to ask about it on the bug,
in <tt class="docutils literal"><span class="pre">#bzr</span></tt> or on the mailing list.</p>
</div>
<div class="section" id="making-a-branch">
<h2>Making a branch<a class="headerlink" href="#making-a-branch" title="Permalink to this headline">¶</a></h2>
<p>First, get a local copy of Bazaar:</p>
<div class="highlight-python"><div class="highlight"><pre>$ cd $HOME
$ bzr init-repo bzr
$ cd bzr
$ bzr branch lp:bzr bzr.dev
</pre></div>
</div>
<p>Now make your own branch; we recommend you include the bug number and also
a brief description:</p>
<div class="highlight-python"><div class="highlight"><pre>$ bzr branch bzr.dev 123456-status-speed
</pre></div>
</div>
<p>and go ahead and commit in there.  Normally you should fix only one bug or
closely-related cluster of bugs per branch, to make reviews and merges
flow more smoothly.</p>
<p>For bugs that exist in older supported branches of bzr like 2.0 or 2.1,
you might want to fix the bug there so it can go into a bugfix release,
ie</p>
<div class="highlight-python"><div class="highlight"><pre>$ bzr branch lp:bzr/2.1 bzr.2.1
$ bzr branch bzr.2.1 123458-2.1-status
</pre></div>
</div>
<p>You probably want this configuration in <tt class="docutils literal"><span class="pre">~/.bazaar/locations.conf</span></tt>:</p>
<div class="highlight-python"><div class="highlight"><pre>[/home/USER/bzr]
push_location = lp:~LAUNCHPAD_USER/bzr/
push_location:policy = appendpath
public_branch = http://bazaar.launchpad.net/~LAUNCHPAD_USER/bzr/
public_branch:policy = appendpath
</pre></div>
</div>
<p>with your local and Launchpad usernames inserted.</p>
</div>
<div class="section" id="publishing-your-changes">
<h2>Publishing your changes<a class="headerlink" href="#publishing-your-changes" title="Permalink to this headline">¶</a></h2>
<p>After you&#8217;ve locally committed your changes, the configuration above
should be enough that you can push them to Launchpad with a simple</p>
<div class="highlight-python"><div class="highlight"><pre>$ bzr push
</pre></div>
</div>
</div>
<div class="section" id="writing-tests">
<h2>Writing tests<a class="headerlink" href="#writing-tests" title="Permalink to this headline">¶</a></h2>
<p>We value test coverage and generally all changes should have or update a
test.  There is a powerful test framework but it can be hard to find the
right place to put your test.  Don&#8217;t hesitate to ask, or to propose a
merge that does not yet have tests.</p>
<p>Normally for command-line code you should look in
<tt class="docutils literal"><span class="pre">bzrlib.tests.blackbox</span></tt> and for library code in <tt class="docutils literal"><span class="pre">bzrlib.tests</span></tt>.  For
functions on an interface for which there are multiple implementations,
like <cite>Transport</cite>, look in <tt class="docutils literal"><span class="pre">bzrlib.tests.per_transport</span></tt>.</p>
<p>It&#8217;s a good idea to search the tests for something related to the thing
you&#8217;re changing and you may find a test you can modify or adapt.</p>
<p>To run the tests:</p>
<div class="highlight-python"><div class="highlight"><pre>$ ./bzr selftest
</pre></div>
</div>
<p>Normally the tests will skip if some library dependencies are not present.
On Ubuntu, you can install them with this command (you must have source
repositories enabled in Software Sources):</p>
<div class="highlight-python"><div class="highlight"><pre>$ sudo apt-get build-dep bzr
</pre></div>
</div>
<p>To build the binary extensions:</p>
<div class="highlight-python"><div class="highlight"><pre>$ make
</pre></div>
</div>
<p>For more information: <a class="reference external" href="testing.html">Testing Guide</a>.</p>
</div>
<div class="section" id="proposing-a-merge">
<h2>Proposing a merge<a class="headerlink" href="#proposing-a-merge" title="Permalink to this headline">¶</a></h2>
<p>Then propose a merge into bzr; for bzr 2.2 and later you can use the <tt class="docutils literal"><span class="pre">bzr</span>
<span class="pre">lp-propose-merge</span></tt> command.  In the comment for your merge proposal please
explain what you&#8217;re trying to do and why.  For <a class="reference external" href="https://code.launchpad.net/~ian-clatworthy/bzr/whats-new-in-2.1/+merge/19677">example</a>:</p>
<blockquote>
<div>As discussed on the mailing list, this patch adds a What&#8217;s New document
summarising the changes since 2.0.</div></blockquote>
<p>If you make additional changes to your branch you don&#8217;t need to resubmit;
they&#8217;ll automatically show up in the merge proposal.</p>
<ul class="simple">
<li><a class="reference external" href="http://help.launchpad.net/Code/Review">Launchpad Code Review Help</a>.</li>
</ul>
</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 internal" href="#">Contributing to Bazaar</a><ul>
<li><a class="reference internal" href="#talk-to-us">Talk to us</a></li>
<li><a class="reference internal" href="#starting">Starting</a></li>
<li><a class="reference internal" href="#making-a-branch">Making a branch</a></li>
<li><a class="reference internal" href="#publishing-your-changes">Publishing your changes</a></li>
<li><a class="reference internal" href="#writing-tests">Writing tests</a></li>
<li><a class="reference internal" href="#proposing-a-merge">Proposing a merge</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="index.html"
                        title="previous chapter">Bazaar Developer Document Catalog</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="cycle.html"
                        title="next chapter">Bazaar Release Cycles</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/contribution-quickstart.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" />
      <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="cycle.html" title="Bazaar Release Cycles"
             >next</a></li>
        <li class="right" >
          <a href="index.html" title="Bazaar Developer Document Catalog"
             >previous</a> |</li>
<li><a href="http://bazaar.canonical.com/">
    <img src="_static/bzr icon 16.png" /> Home</a>&nbsp;|&nbsp;</li>
<a href="http://doc.bazaar.canonical.com/en/">Documentation</a>&nbsp;|&nbsp;</li>

        <li><a href="index.html">Developer Document Catalog (2.6.0)</a> &raquo;</li>
 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009-2011 Canonical Ltd.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
  </body>
</html>