Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates > by-pkgid > 27647990744ebd9cfe32398f37f67e20 > files > 3036

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>Resolving conflicts &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="Annotating changes" href="annotating_changes.html" />
    <link rel="prev" title="Merging changes" href="merging_changes.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="annotating_changes.html" title="Annotating changes"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="merging_changes.html" title="Merging changes"
             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="resolving-conflicts">
<h1>Resolving conflicts<a class="headerlink" href="#resolving-conflicts" title="Permalink to this headline">¶</a></h1>
<div class="section" id="workflow">
<h2>Workflow<a class="headerlink" href="#workflow" title="Permalink to this headline">¶</a></h2>
<p>Unlike some other tools that force you to resolve each conflict during
the merge process, Bazaar merges as much as it can and then reports the
conflicts. This can make conflict resolution easier because the contents
of the whole post-merge tree are available to help you decide how things
ought to be resolved. You may also wish to selectively run tests as you go
to confirm each resolution or group or resolutions is good.</p>
</div>
<div class="section" id="listing-conflicts">
<h2>Listing conflicts<a class="headerlink" href="#listing-conflicts" title="Permalink to this headline">¶</a></h2>
<p>As well as being reported by the <tt class="docutils literal"><span class="pre">merge</span></tt> command, the list of outstanding
conflicts may be displayed at any time by using the <tt class="docutils literal"><span class="pre">conflicts</span></tt>
command. It is also included as part of the output from the <tt class="docutils literal"><span class="pre">status</span></tt>
command.</p>
</div>
<div class="section" id="resolving-a-conflict">
<h2>Resolving a conflict<a class="headerlink" href="#resolving-a-conflict" title="Permalink to this headline">¶</a></h2>
<p>When a conflict is encountered, the <tt class="docutils literal"><span class="pre">merge</span></tt> command puts embedded
markers in each file showing the areas it couldn&#8217;t resolve. It also
creates 3 files for each file with a conflict:</p>
<blockquote>
<div><ul class="simple">
<li>foo.BASE</li>
<li>foo.THIS</li>
<li>foo.OTHER</li>
</ul>
</div></blockquote>
<p>where <tt class="docutils literal"><span class="pre">foo</span></tt> is the name of the conflicted file.
In many cases, you can resolve conflicts by simply manually editing
each file in question, fixing the relevant areas and removing the
conflict markers as you go.</p>
<p>After fixing all the files in conflict, and removing the markers,
ask Bazaar to mark them as resolved using the <tt class="docutils literal"><span class="pre">resolve</span></tt> command like this:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr resolve
</pre></div>
</div>
<p>Alternatively, after fixing each file, you can mark it as resolved
like this:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr resolve foo
</pre></div>
</div>
<p>Among other things, the <tt class="docutils literal"><span class="pre">resolve</span></tt> command cleans up the BASE,
THIS and OTHER files from your working tree.</p>
</div>
<div class="section" id="using-the-remerge-command">
<h2>Using the remerge command<a class="headerlink" href="#using-the-remerge-command" title="Permalink to this headline">¶</a></h2>
<p>In some cases, you may wish to try a different merge algorithm on a
given file. To do this, use the <tt class="docutils literal"><span class="pre">remerge</span></tt> command nominating
the file like this:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr remerge --weave foo
</pre></div>
</div>
<p>where <tt class="docutils literal"><span class="pre">foo</span></tt> is the file and <tt class="docutils literal"><span class="pre">weave</span></tt> is one of the available
merge algorithms. This algorithm is particularly useful when a
so-called <tt class="docutils literal"><span class="pre">criss-cross</span></tt> merge is detected, e.g. when two branches
merge the same thing then merge each other. See the online help for
<tt class="docutils literal"><span class="pre">criss-cross</span></tt> and <tt class="docutils literal"><span class="pre">remerge</span></tt> for further details.</p>
</div>
<div class="section" id="using-external-tools-to-resolve-conflicts">
<h2>Using external tools to resolve conflicts<a class="headerlink" href="#using-external-tools-to-resolve-conflicts" title="Permalink to this headline">¶</a></h2>
<p>If you have a GUI tool you like using to resolve conflicts, be sure
to install the <em>extmerge</em> plugin. Once installed, it can be used
like this:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr extmerge foo
</pre></div>
</div>
<p>where <tt class="docutils literal"><span class="pre">foo</span></tt> is the conflicted file. Rather than provide a list of
files to resolve, you can give the <tt class="docutils literal"><span class="pre">--all</span></tt> option to implicitly
specify all conflicted files.</p>
<p>The <tt class="docutils literal"><span class="pre">extmerge</span></tt> command uses the tool specified by the
<tt class="docutils literal"><span class="pre">external_merge</span></tt> setting in your <tt class="docutils literal"><span class="pre">bazaar.conf</span></tt> file.
If not set, it will look for some popular merge tools such
as <tt class="docutils literal"><span class="pre">kdiff3</span></tt> or <tt class="docutils literal"><span class="pre">opendiff</span></tt>, the latter being a command
line interface to the FileMerge utility in OS X.</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="#">Resolving conflicts</a><ul>
<li><a class="reference internal" href="#workflow">Workflow</a></li>
<li><a class="reference internal" href="#listing-conflicts">Listing conflicts</a></li>
<li><a class="reference internal" href="#resolving-a-conflict">Resolving a conflict</a></li>
<li><a class="reference internal" href="#using-the-remerge-command">Using the remerge command</a></li>
<li><a class="reference internal" href="#using-external-tools-to-resolve-conflicts">Using external tools to resolve conflicts</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="merging_changes.html"
                        title="previous chapter">Merging changes</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="annotating_changes.html"
                        title="next chapter">Annotating changes</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/user-guide/resolving_conflicts.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="annotating_changes.html" title="Annotating changes"
             >next</a></li>
        <li class="right" >
          <a href="merging_changes.html" title="Merging changes"
             >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>