Sophie

Sophie

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

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>Diverged Branches &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 Reference" href="index.html" />
    <link rel="next" title="End of Line Conversion" href="eol-help.html" />
    <link rel="prev" title="Criss-Cross" href="criss-cross-help.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="eol-help.html" title="End of Line Conversion"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="criss-cross-help.html" title="Criss-Cross"
             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 Reference</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="diverged-branches">
<h1>Diverged Branches<a class="headerlink" href="#diverged-branches" title="Permalink to this headline">¶</a></h1>
<p>When Bazaar tries to push one branch onto another, it requires that the
destination branch must be ready to receive the source branch.  If this isn&#8217;t
the case, then we say that the branches have <tt class="docutils literal"><span class="pre">diverged</span></tt>.  Branches are
considered diverged if the destination branch&#8217;s most recent commit is one that
has not been merged (directly or indirectly) by the source branch.  To recover
from diverged branches, one must merge the missing revisions into the source
branch.</p>
<p>This situation commonly arises when using a centralized workflow with local
commits.  If someone else has committed new work to the mainline since your
last pull and you have local commits that have not yet been pushed to the
mainline, then your local branch and the mainline have diverged.</p>
<div class="section" id="discovering-what-has-diverged">
<h2>Discovering What Has Diverged<a class="headerlink" href="#discovering-what-has-diverged" title="Permalink to this headline">¶</a></h2>
<p>The <tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">missing</span></tt> command is used to find out what revisions are in another
branch that are not present in the current branch, and vice-versa.  It shows a
summary of  which extra revisions exist in each branch.  If you want to see the
precise effects of those revisions, you can use <tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">diff</span> <span class="pre">--old=other_branch</span></tt>
to show the differences between other_branch and your current branch.</p>
</div>
<div class="section" id="a-solution">
<h2>A Solution<a class="headerlink" href="#a-solution" title="Permalink to this headline">¶</a></h2>
<p>The solution is to merge the revisions from the mainline into your local
branch.  To do so, use <tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">merge</span></tt> to get the new revisions from the
mainline.  This merge may result in conflicts if the other developer&#8217;s changes
overlap with your changes.  These conflicts should be resolved before
continuing. After any conflicts have been resolved, or even if there were no
conflicts, Bazaar requires that you explicitly commit these new revisions
to your local branch.  This requirement gives you an opportunity to test the
resulting working tree for correctness, since the merged revisions could have
made arbitrary changes.  After testing, you should commit the merge using
<tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">commit</span></tt>.  This clears up the diverged branches situation.  Your local
branch can now be pushed to the mainline.</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="#">Diverged Branches</a><ul>
<li><a class="reference internal" href="#discovering-what-has-diverged">Discovering What Has Diverged</a></li>
<li><a class="reference internal" href="#a-solution">A Solution</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="criss-cross-help.html"
                        title="previous chapter">Criss-Cross</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="eol-help.html"
                        title="next chapter">End of Line Conversion</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/user-reference/diverged-branches-help.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="eol-help.html" title="End of Line Conversion"
             >next</a></li>
        <li class="right" >
          <a href="criss-cross-help.html" title="Criss-Cross"
             >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 Reference</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>