Sophie

Sophie

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

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>Revision Properties &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="up" title="Specifications" href="specifications.html" />
    <link rel="next" title="API Versioning" href="api-versioning.html" />
    <link rel="prev" title="Specifications" href="specifications.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="api-versioning.html" title="API Versioning"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="specifications.html" title="Specifications"
             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>

          <li><a href="specifications.html" accesskey="U">Specifications</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="revision-properties">
<h1>Revision Properties<a class="headerlink" href="#revision-properties" title="Permalink to this headline">¶</a></h1>
<p>Bazaar repositories support setting of a key/value pairs for each revision.
Applications can use these properties to store additional information
about the revision.</p>
<div class="section" id="usage">
<h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
<p>In general, revision properties are set by passing keyword argument
<tt class="docutils literal"><span class="pre">revprops</span></tt> to method <tt class="docutils literal"><span class="pre">MutableTree.commit</span></tt>. For example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">properties</span> <span class="o">=</span> <span class="p">{}</span>
<span class="n">properties</span><span class="p">[</span><span class="s">&#39;my-property&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s">&#39;test&#39;</span>
<span class="n">tree</span><span class="o">.</span><span class="n">commit</span><span class="p">(</span><span class="n">message</span><span class="p">,</span> <span class="n">revprops</span><span class="o">=</span><span class="n">properties</span><span class="p">)</span>
</pre></div>
</div>
<p>Properties can be retrieved via the attribute <tt class="docutils literal"><span class="pre">properties</span></tt> of
instances of the class <tt class="docutils literal"><span class="pre">Revision</span></tt>:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">if</span> <span class="s">&#39;my-property&#39;</span> <span class="ow">in</span> <span class="n">revision</span><span class="o">.</span><span class="n">properties</span><span class="p">:</span>
    <span class="n">my_property</span> <span class="o">=</span> <span class="n">revision</span><span class="o">.</span><span class="n">properties</span><span class="p">[</span><span class="s">&#39;my-property&#39;</span><span class="p">]</span>
    <span class="o">...</span>
</pre></div>
</div>
</div>
<div class="section" id="well-known-properties">
<h2>Well-known properties<a class="headerlink" href="#well-known-properties" title="Permalink to this headline">¶</a></h2>
<p>At the moment, three standardized revision properties are recognized and used
by bzrlib:</p>
<blockquote>
<div><ul class="simple">
<li><tt class="docutils literal"><span class="pre">authors</span></tt> - Authors of the change. This value is a &#8220;\n&#8221; separated set
of values in the same format as the committer-id. This property can be
set by passing a list to the keyword argument <tt class="docutils literal"><span class="pre">authors</span></tt> of the function
<tt class="docutils literal"><span class="pre">MutableTree.commit</span></tt>.</li>
<li><tt class="docutils literal"><span class="pre">author</span></tt> - Single author of the change. This property is deprecated in
favour of <tt class="docutils literal"><span class="pre">authors</span></tt>. It should no longer be set by any code, but will
still be read. It is ignored if <tt class="docutils literal"><span class="pre">authors</span></tt> is set in the same revision.</li>
<li><tt class="docutils literal"><span class="pre">branch-nick</span></tt> - Nickname of the branch. This can be specified by the user,
but it defaults to the colocated branch name or the branch&#8217;s directory name.
The value is set automatically in <tt class="docutils literal"><span class="pre">MutableTree.commit</span></tt>.</li>
<li><tt class="docutils literal"><span class="pre">bugs</span></tt> - A list of bug URLs and their statuses. The list is separated
by the new-line character (\n) and each entry is in format
&#8216;&lt;URL&gt; &lt;status&gt;&#8217;. Currently, bzrlib uses only status &#8216;fixed&#8217;. See
<a class="reference external" href="../en/user-guide/index.html#bug-trackers">Bug Trackers</a> for more details about using this feature.</li>
</ul>
</div></blockquote>
</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="#">Revision Properties</a><ul>
<li><a class="reference internal" href="#usage">Usage</a></li>
<li><a class="reference internal" href="#well-known-properties">Well-known properties</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="specifications.html"
                        title="previous chapter">Specifications</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="api-versioning.html"
                        title="next chapter">API Versioning</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/revision-properties.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="api-versioning.html" title="API Versioning"
             >next</a></li>
        <li class="right" >
          <a href="specifications.html" title="Specifications"
             >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>

          <li><a href="specifications.html" >Specifications</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>