Sophie

Sophie

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

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>bzr-svn &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="Web browsing" href="web_browsing.html" />
    <link rel="prev" title="BzrTools" href="bzrtools_plugin.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="web_browsing.html" title="Web browsing"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="bzrtools_plugin.html" title="BzrTools"
             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="bzr-svn">
<h1>bzr-svn<a class="headerlink" href="#bzr-svn" title="Permalink to this headline">¶</a></h1>
<div class="section" id="overview">
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline">¶</a></h2>
<p>bzr-svn lets developers use Bazaar as their VCS client on projects
still using a central Subversion repository. Access to Subversion
repositories is largely transparent, i.e. you can use most <tt class="docutils literal"><span class="pre">bzr</span></tt>
commands directly on Subversion repositories exactly the same
as if you were using <tt class="docutils literal"><span class="pre">bzr</span></tt> on native Bazaar branches.</p>
<p>Many bzr-svn users create a local mirror of the central Subversion
trunk, work in local feature branches, and submit their
overall change back to Subversion when it is ready
to go. This lets them gain many of the advantages of distributed
VCS tools without interrupting existing team-wide processes and
tool integration hooks currently built on top of Subversion. Indeed,
this is a common interim step for teams looking to adopt Bazaar but
who are unable to do so yet for timing or non-technical reasons.</p>
<p>For installation instructions, see the bzr-svn home page:
<a class="reference external" href="http://wiki.bazaar.canonical.com/BzrForeignBranches/Subversion">http://wiki.bazaar.canonical.com/BzrForeignBranches/Subversion</a>.</p>
</div>
<div class="section" id="a-simple-example">
<h2>A simple example<a class="headerlink" href="#a-simple-example" title="Permalink to this headline">¶</a></h2>
<p>Here&#8217;s a simple example of how you can use bzr-svn to hack on a
GNOME project like <strong>beagle</strong>. Firstly, setup a local shared repository
for storing your branches in and checkout the trunk:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr init-repo beagle-repo
cd beagle-repo
bzr checkout svn+ssh://svn.gnome.org/svn/beagle/trunk beagle-trunk
</pre></div>
</div>
<p>Next, create a feature branch and hack away:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr branch beagle-trunk beagle-feature1
cd beagle-feature1
(hack, hack, hack)
bzr commit -m &quot;blah blah blah&quot;
(hack, hack, hack)
bzr commit -m &quot;blah blah blah&quot;
</pre></div>
</div>
<p>When the feature is cooked, refresh your trunk mirror and merge
your change:</p>
<div class="highlight-python"><div class="highlight"><pre>cd ../beagle-trunk
bzr update
bzr merge ../beagle-feature1
bzr commit -m &quot;Complete comment for SVN commit&quot;
</pre></div>
</div>
<p>As your trunk mirror is a checkout, committing to it implicitly
commits to the real Subversion trunk. That&#8217;s it!</p>
</div>
<div class="section" id="using-a-central-repository-mirror">
<h2>Using a central repository mirror<a class="headerlink" href="#using-a-central-repository-mirror" title="Permalink to this headline">¶</a></h2>
<p>For large projects, it often makes sense to tweak the recipe given above.
In particular, the initial checkout can get quite slow so you may wish
to import the Subversion repository into a Bazaar one once and for all
for your project, and then branch from that native Bazaar repository
instead. bzr-svn provides the <tt class="docutils literal"><span class="pre">svn-import</span></tt> command for doing this
repository-to-repository conversion. Here&#8217;s an example of how to use it:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr svn-import svn+ssh://svn.gnome.org/svn/beagle
</pre></div>
</div>
<p>Here&#8217;s the recipe from above updated to use a central Bazaar mirror:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr init-repo beagle-repo
cd beagle-repo
bzr branch bzr+ssh://bzr.gnome.org/beagle.bzr/trunk beagle-trunk
bzr branch beagle-trunk beagle-feature1
cd beagle-feature1
(hack, hack, hack)
bzr commit -m &quot;blah blah blah&quot;
(hack, hack, hack)
bzr commit -m &quot;blah blah blah&quot;
cd ../beagle-trunk
bzr pull
bzr merge ../beagle-feature1
bzr commit -m &quot;Complete comment for SVN commit&quot;
bzr push
</pre></div>
</div>
<p>In this case, committing to the trunk only commits the merge locally.
To commit back to the master Subversion trunk, an additional command
(<tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">push</span></tt>) is required.</p>
<p>Note: You&#8217;ll need to give <tt class="docutils literal"><span class="pre">pull</span></tt> and <tt class="docutils literal"><span class="pre">push</span></tt> the relevant URLs
the first time you use those commands in the trunk branch. After that,
bzr remembers them.</p>
<p>The final piece of the puzzle in this setup is to put scripts in
place to keep the central Bazaar mirror synchronized with the Subversion
one. This can be done by adding a cron job, using a Subversion hook,
or whatever makes sense in your environment.</p>
</div>
<div class="section" id="limitations-of-bzr-svn">
<h2>Limitations of bzr-svn<a class="headerlink" href="#limitations-of-bzr-svn" title="Permalink to this headline">¶</a></h2>
<p>Bazaar and Subversion are different tools with different capabilities
so there will always be some limited interoperability issues.
Here are some examples current as of bzr-svn 0.5.4:</p>
<blockquote>
<div><ul class="simple">
<li>Bazaar doesn&#8217;t support versioned properties</li>
<li>Bazaar doesn&#8217;t support tracking of file copies.</li>
</ul>
</div></blockquote>
<p>See the bzr-svn web page,
<a class="reference external" href="http://wiki.bazaar.canonical.com/BzrForeignBranches/Subversion">http://wiki.bazaar.canonical.com/BzrForeignBranches/Subversion</a>,
for the current list of constraints.</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 internal" href="#">bzr-svn</a><ul>
<li><a class="reference internal" href="#overview">Overview</a></li>
<li><a class="reference internal" href="#a-simple-example">A simple example</a></li>
<li><a class="reference internal" href="#using-a-central-repository-mirror">Using a central repository mirror</a></li>
<li><a class="reference internal" href="#limitations-of-bzr-svn">Limitations of bzr-svn</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="bzrtools_plugin.html"
                        title="previous chapter">BzrTools</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="web_browsing.html"
                        title="next chapter">Web browsing</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/user-guide/svn_plugin.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="web_browsing.html" title="Web browsing"
             >next</a></li>
        <li class="right" >
          <a href="bzrtools_plugin.html" title="BzrTools"
             >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>