Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > 4d3e035d9e975b827326563d291f989a > files > 3140

bzr-2.7.0-6.mga7.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="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Reviewing changes &#8212; Bazaar 2.7.0 documentation</title>
    <link rel="stylesheet" href="../_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></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>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    
    <link rel="shortcut icon" href="../_static/bzr.ico"/>
    <link rel="search" title="Search" href="../search.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" role="navigation" aria-label="related navigation">
      <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 class="nav-item nav-item-0"><a href="../index.html">Table of Contents (2.7.0)</a> &#187;</li>

          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Bazaar User Guide</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <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’s a good idea to review your changes
prior to permanently recording it. This way, you can make sure you’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-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">bzr</span> <span class="n">status</span>
<span class="n">modified</span><span class="p">:</span>
   <span class="n">foo</span>
</pre></div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">bzr</span> <span class="pre">status</span></code> hides “boring” 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
‘’patch’‘, ‘’diffstat’‘, ‘’filterdiff’’ and ‘’colordiff’‘:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">bzr</span> <span class="n">diff</span>
<span class="o">===</span> <span class="n">added</span> <span class="n">file</span> <span class="s1">&#39;hello.txt&#39;</span>
<span class="o">---</span> <span class="n">hello</span><span class="o">.</span><span class="n">txt</span>   <span class="mi">1970</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">01</span> <span class="mi">00</span><span class="p">:</span><span class="mi">00</span><span class="p">:</span><span class="mi">00</span> <span class="o">+</span><span class="mi">0000</span>
<span class="o">+++</span> <span class="n">hello</span><span class="o">.</span><span class="n">txt</span>   <span class="mi">2005</span><span class="o">-</span><span class="mi">10</span><span class="o">-</span><span class="mi">18</span> <span class="mi">14</span><span class="p">:</span><span class="mi">23</span><span class="p">:</span><span class="mi">29</span> <span class="o">+</span><span class="mi">0000</span>
<span class="o">@@</span> <span class="o">-</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span> <span class="o">+</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span> <span class="o">@@</span>
<span class="o">+</span><span class="n">hello</span> <span class="n">world</span>
</pre></div>
</div>
<p>With the <code class="docutils literal notranslate"><span class="pre">-r</span></code> option, the tree is compared to an earlier revision, or
the differences between two versions are shown:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">bzr</span> <span class="n">diff</span> <span class="o">-</span><span class="n">r</span> <span class="mf">1000.</span><span class="o">.</span>          <span class="c1"># everything since r1000</span>
<span class="o">%</span> <span class="n">bzr</span> <span class="n">diff</span> <span class="o">-</span><span class="n">r</span> <span class="mf">1000.</span><span class="o">.</span><span class="mi">1100</span>      <span class="c1"># changes from 1000 to 1100</span>
</pre></div>
</div>
<p>To see the changes introduced by a single revision, you can use the <code class="docutils literal notranslate"><span class="pre">-c</span></code>
option to diff.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">bzr</span> <span class="n">diff</span> <span class="o">-</span><span class="n">c</span> <span class="mi">1000</span>            <span class="c1"># changes from r1000</span>
                              <span class="c1"># identical to -r999..1000</span>
</pre></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">--diff-options</span></code> option causes bzr to run the external diff program,
passing options.  For example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">bzr</span> <span class="n">diff</span> <span class="o">--</span><span class="n">diff</span><span class="o">-</span><span class="n">options</span> <span class="o">--</span><span class="n">side</span><span class="o">-</span><span class="n">by</span><span class="o">-</span><span class="n">side</span> <span class="n">foo</span>
</pre></div>
</div>
<p>Some projects prefer patches to show a prefix at the start of the path
for old and new files.  The <code class="docutils literal notranslate"><span class="pre">--prefix</span></code> option can be used to provide
such a prefix.
As a shortcut, <code class="docutils literal notranslate"><span class="pre">bzr</span> <span class="pre">diff</span> <span class="pre">-p1</span></code> produces a form that works with the
command <code class="docutils literal notranslate"><span class="pre">patch</span> <span class="pre">-p1</span></code>.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <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>
  <div role="note" aria-label="source link">
    <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>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <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>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <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 class="nav-item nav-item-0"><a href="../index.html">Table of Contents (2.7.0)</a> &#187;</li>

          <li class="nav-item nav-item-1"><a href="index.html" >Bazaar User Guide</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2009-2011 Canonical Ltd.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.4.
    </div>
  </body>
</html>