Sophie

Sophie

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

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>Configuring 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="up" title="Bazaar User Guide" href="index.html" />
    <link rel="next" title="Using aliases" href="using_aliases.html" />
    <link rel="prev" title="Getting help" href="getting_help.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="using_aliases.html" title="Using aliases"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="getting_help.html" title="Getting help"
             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">Table of Contents (2.6.0)</a> &raquo;</li>

          <li><a href="index.html" accesskey="U">Bazaar User Guide</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="configuring-bazaar">
<h1>Configuring Bazaar<a class="headerlink" href="#configuring-bazaar" title="Permalink to this headline">¶</a></h1>
<div class="section" id="telling-bazaar-about-yourself">
<h2>Telling Bazaar about yourself<a class="headerlink" href="#telling-bazaar-about-yourself" title="Permalink to this headline">¶</a></h2>
<p>One function of a version control system is to keep track of who changed
what.  In a decentralized system, that requires an identifier for each
author that is globally unique.  Most people already have one of these: an
email address. Bazaar is smart enough to automatically generate an email
address by looking up your username and hostname. If you don&#8217;t like the
guess that Bazaar makes, then use the <tt class="docutils literal"><span class="pre">whoami</span></tt> command to set the
identifier you want:</p>
<div class="highlight-python"><div class="highlight"><pre>% bzr whoami &quot;Your Name &lt;email@example.com&gt;&quot;
</pre></div>
</div>
<p>If <tt class="docutils literal"><span class="pre">whoami</span></tt> is used without an argument, the current value is displayed.</p>
</div>
<div class="section" id="using-a-network-proxy">
<h2>Using a network proxy<a class="headerlink" href="#using-a-network-proxy" title="Permalink to this headline">¶</a></h2>
<p>If your network requires that you use an HTTP proxy for outbound
connections, you must set the <tt class="docutils literal"><span class="pre">http_proxy</span></tt> variable.  If the proxy is
also required for https connections, you need to set <tt class="docutils literal"><span class="pre">https_proxy</span></tt> too.
If you need these and don&#8217;t have them set, you may find that connections
to Launchpad or other external servers fail or time out.</p>
<p>On Unix you typically want to set these in <tt class="docutils literal"><span class="pre">/etc/environment</span></tt> or
<tt class="docutils literal"><span class="pre">~/.bash_profile</span></tt> and on Windows in the user profile.</p>
<div class="highlight-python"><div class="highlight"><pre>http_proxy=http://proxy.example.com:3128/
https_proxy=http://proxy.example.com:3128/
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">no_proxy</span></tt> variable can be set to a comma-separated list of hosts
which shouldn&#8217;t be reached by the proxy.  (See
&lt;<a class="reference external" href="http://docs.python.org/library/urllib.html">http://docs.python.org/library/urllib.html</a>&gt; for more details.)</p>
</div>
<div class="section" id="various-ways-to-configure">
<h2>Various ways to configure<a class="headerlink" href="#various-ways-to-configure" title="Permalink to this headline">¶</a></h2>
<p>As shown in the example above, there are various ways to
configure Bazaar, they all share some common properties though.
An option has:</p>
<ul class="simple">
<li>a name which is generally a valid python identifier,</li>
<li>a value which is a string. In some cases, Bazaar will be able
to recognize special values like &#8216;True&#8217;, &#8216;False&#8217; to infer a
boolean type, but basically, as a user, you will always specify
a value as a string.</li>
</ul>
<p>Options are grouped in various contexts so the option name
uniquely identifies it in this context. When needed, options can
be made persistent by recording them in a configuration file.</p>
</div>
<div class="section" id="configuration-files">
<h2>Configuration files<a class="headerlink" href="#configuration-files" title="Permalink to this headline">¶</a></h2>
<p>Configuration files are located in <tt class="docutils literal"><span class="pre">$HOME/.bazaar</span></tt> on Unix and
<tt class="docutils literal"><span class="pre">C:\Documents</span> <span class="pre">and</span> <span class="pre">Settings\&lt;username&gt;\Application</span> <span class="pre">Data\Bazaar\2.0</span></tt> on
Windows. There are three primary configuration files in this location:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">bazaar.conf</span></tt> describes default configuration options,</li>
<li><tt class="docutils literal"><span class="pre">locations.conf</span></tt> describes configuration information for
specific branch locations,</li>
<li><tt class="docutils literal"><span class="pre">authentication.conf</span></tt> describes credential information for
remote servers.</li>
</ul>
<p>Each branch can also contain a configuration file that sets values specific
to that branch. This file is found at <tt class="docutils literal"><span class="pre">.bzr/branch/branch.conf</span></tt> within the
branch. This file is visible to <strong>all users of a branch</strong>. If you wish to
override one of the values for a branch with a setting that is specific to you,
then you can do so in <tt class="docutils literal"><span class="pre">locations.conf</span></tt>.</p>
<p>Here is sample content of <tt class="docutils literal"><span class="pre">bazaar.conf</span></tt> after setting an email address using
the <tt class="docutils literal"><span class="pre">whoami</span></tt> command:</p>
<div class="highlight-python"><div class="highlight"><pre>[DEFAULT]
email = Your Name &lt;email@example.com&gt;
</pre></div>
</div>
<p>For further details on the syntax and configuration settings supported, see
<a class="reference external" href="../user-reference/index.html#configuration-settings">Configuration Settings</a>
in the Bazaar User Reference.</p>
</div>
<div class="section" id="looking-at-the-active-configuration">
<h2>Looking at the active configuration<a class="headerlink" href="#looking-at-the-active-configuration" title="Permalink to this headline">¶</a></h2>
<p>To look at all the currently defined options, you can use the following
command:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr config
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">bzr</span></tt> implements some rules to decide where to get the value of a
configuration option.</p>
<p>The current policy is to examine the existing configurations files in a
given order for matching definitions.</p>
<blockquote>
<div><ul class="simple">
<li><tt class="docutils literal"><span class="pre">locations.conf</span></tt> is searched first for a section whose name matches the
location considered (working tree, branch or remote branch),</li>
<li>the current <tt class="docutils literal"><span class="pre">branch.conf</span></tt> is searched next,</li>
<li><tt class="docutils literal"><span class="pre">bazaar.conf</span></tt> is searched next,</li>
<li>finally, some options can have default values generally defined in the
code itself and not displayed by <tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">config</span></tt> (see <a class="reference external" href="../user-reference/index.html#configuration-settings">Configuration
Settings</a>).</li>
</ul>
</div></blockquote>
<p>This is better understood by using <tt class="docutils literal"><span class="pre">`bzr</span> <span class="pre">config</span></tt> with no arguments, which
will display some output of the form:</p>
<div class="highlight-python"><div class="highlight"><pre>locations:
  post_commit_to = commits@example.com
  news_merge_files = NEWS
branch:
  parent_location = bzr+ssh://bazaar.launchpad.net/+branch/bzr/
  nickname = config-modify
  push_location = bzr+ssh://bazaar.launchpad.net/~vila/bzr/config-modify/
bazaar:
  debug_flags = hpss,
</pre></div>
</div>
<p>Each configuration file is associated with a given scope whose name is
displayed before each set of defined options.</p>
<p>If you need to look at a specific option, you can use:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr config &lt;option&gt;
</pre></div>
</div>
<p>This will display only the option value and is intended to be used in
scripts.</p>
</div>
<div class="section" id="modifying-the-active-configuration">
<h2>Modifying the active configuration<a class="headerlink" href="#modifying-the-active-configuration" title="Permalink to this headline">¶</a></h2>
<p>To set an option to a given value use:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr config opt=value
</pre></div>
</div>
<p>An option value can reference another option by enclosing it in curly
braces:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr config opt={other_opt}/subdir
</pre></div>
</div>
<p>If <tt class="docutils literal"><span class="pre">other_opt</span></tt> is set to <tt class="docutils literal"><span class="pre">'root</span></tt>, <tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">config</span> <span class="pre">opt</span></tt> will display:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">root</span><span class="o">/</span><span class="n">subdir</span>
</pre></div>
</div>
<p>Note that when <tt class="docutils literal"><span class="pre">--all</span></tt> is used, the references are left as-is to better
reflect the content of the config files and make it easier to organize them:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr config --all .*opt

bazaar:
  [DEFAULT]
  opt = {other_opt}/subdir
  other_opt = root
</pre></div>
</div>
<p>To remove an option use:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr config --remove opt
</pre></div>
</div>
</div>
<div class="section" id="rule-based-preferences">
<h2>Rule-based preferences<a class="headerlink" href="#rule-based-preferences" title="Permalink to this headline">¶</a></h2>
<p>Some commands and plugins provide custom processing on files matching
certain patterns. Per-user rule-based preferences are defined in
<tt class="docutils literal"><span class="pre">BZR_HOME/rules</span></tt>.</p>
<p>For further information on how rules are searched and the detailed syntax of
the relevant files, see <a class="reference external" href="../user-reference/index.html#rules">Rules</a>
in the Bazaar User Reference.</p>
</div>
<div class="section" id="escaping-command-lines">
<h2>Escaping command lines<a class="headerlink" href="#escaping-command-lines" title="Permalink to this headline">¶</a></h2>
<p>When you give a program name or command line in configuration, you can quote
to include special characters or whitespace.  The same rules are used across
all platforms.</p>
<p>The rules are: strings surrounded by double-quotes are interpreted as single
&#8220;words&#8221; even if they contain whitespace, and backslash may be used to quote
quotation marks.  For example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">BZR_EDITOR</span><span class="o">=</span><span class="s">&quot;C:\Program Files\My Editor\myeditor.exe&quot;</span>
</pre></div>
</div>
</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="#">Configuring Bazaar</a><ul>
<li><a class="reference internal" href="#telling-bazaar-about-yourself">Telling Bazaar about yourself</a></li>
<li><a class="reference internal" href="#using-a-network-proxy">Using a network proxy</a></li>
<li><a class="reference internal" href="#various-ways-to-configure">Various ways to configure</a></li>
<li><a class="reference internal" href="#configuration-files">Configuration files</a></li>
<li><a class="reference internal" href="#looking-at-the-active-configuration">Looking at the active configuration</a></li>
<li><a class="reference internal" href="#modifying-the-active-configuration">Modifying the active configuration</a></li>
<li><a class="reference internal" href="#rule-based-preferences">Rule-based preferences</a></li>
<li><a class="reference internal" href="#escaping-command-lines">Escaping command lines</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="getting_help.html"
                        title="previous chapter">Getting help</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="using_aliases.html"
                        title="next chapter">Using aliases</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/user-guide/configuring_bazaar.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="using_aliases.html" title="Using aliases"
             >next</a></li>
        <li class="right" >
          <a href="getting_help.html" title="Getting help"
             >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">Table of Contents (2.6.0)</a> &raquo;</li>

          <li><a href="index.html" >Bazaar User Guide</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>