Sophie

Sophie

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

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>Reviewing changes &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="Recording changes" href="recording_changes.html" />
    <link rel="prev" title="Controlling file registration" href="controlling_registration.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="recording_changes.html" title="Recording changes"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="controlling_registration.html" title="Controlling file registration"
             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="reviewing-changes">
<h1>Reviewing changes<a class="headerlink" href="#reviewing-changes" title="Permalink to this headline">¶</a></h1>
<div class="section" id="looking-before-you-leap">
<h2>Looking before you leap<a class="headerlink" href="#looking-before-you-leap" title="Permalink to this headline">¶</a></h2>
<p>Once you have completed some work, it&#8217;s a good idea to review your changes
prior to permanently recording it. This way, you can make sure you&#8217;ll be
committing what you intend to.</p>
<p>Two bzr commands are particularly useful here: <strong>status</strong> and <strong>diff</strong>.</p>
</div>
<div class="section" id="bzr-status">
<h2>bzr status<a class="headerlink" href="#bzr-status" title="Permalink to this headline">¶</a></h2>
<p>The <strong>status</strong> command tells you what changes have been made to the
working directory since the last revision:</p>
<div class="highlight-python"><div class="highlight"><pre>% bzr status
modified:
   foo
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">status</span></tt> hides &#8220;boring&#8221; files that are either unchanged or ignored.
The status command can optionally be given the name of some files or
directories to check.</p>
</div>
<div class="section" id="bzr-diff">
<h2>bzr diff<a class="headerlink" href="#bzr-diff" title="Permalink to this headline">¶</a></h2>
<p>The <strong>diff</strong> command shows the full text of changes to all files as a
standard unified diff.  This can be piped through many programs such as
&#8216;&#8217;patch&#8217;&#8216;, &#8216;&#8217;diffstat&#8217;&#8216;, &#8216;&#8217;filterdiff&#8217;&#8217; and &#8216;&#8217;colordiff&#8217;&#8216;:</p>
<div class="highlight-python"><div class="highlight"><pre>% bzr diff
=== added file &#39;hello.txt&#39;
--- hello.txt   1970-01-01 00:00:00 +0000
+++ hello.txt   2005-10-18 14:23:29 +0000
@@ -0,0 +1,1 @@
+hello world
</pre></div>
</div>
<p>With the <tt class="docutils literal"><span class="pre">-r</span></tt> option, the tree is compared to an earlier revision, or
the differences between two versions are shown:</p>
<div class="highlight-python"><div class="highlight"><pre>% bzr diff -r 1000..          # everything since r1000
% bzr diff -r 1000..1100      # changes from 1000 to 1100
</pre></div>
</div>
<p>To see the changes introduced by a single revision, you can use the <tt class="docutils literal"><span class="pre">-c</span></tt>
option to diff.</p>
<div class="highlight-python"><div class="highlight"><pre>% bzr diff -c 1000            # changes from r1000
                              # identical to -r999..1000
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">--diff-options</span></tt> option causes bzr to run the external diff program,
passing options.  For example:</p>
<div class="highlight-python"><div class="highlight"><pre>% bzr diff --diff-options --side-by-side foo
</pre></div>
</div>
<p>Some projects prefer patches to show a prefix at the start of the path
for old and new files.  The <tt class="docutils literal"><span class="pre">--prefix</span></tt> option can be used to provide
such a prefix.
As a shortcut, <tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">diff</span> <span class="pre">-p1</span></tt> produces a form that works with the
command <tt class="docutils literal"><span class="pre">patch</span> <span class="pre">-p1</span></tt>.</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="#">Reviewing changes</a><ul>
<li><a class="reference internal" href="#looking-before-you-leap">Looking before you leap</a></li>
<li><a class="reference internal" href="#bzr-status">bzr status</a></li>
<li><a class="reference internal" href="#bzr-diff">bzr diff</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="controlling_registration.html"
                        title="previous chapter">Controlling file registration</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="recording_changes.html"
                        title="next chapter">Recording changes</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/user-guide/reviewing_changes.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="recording_changes.html" title="Recording changes"
             >next</a></li>
        <li class="right" >
          <a href="controlling_registration.html" title="Controlling file registration"
             >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>