Sophie

Sophie

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

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>Browsing history &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="Releasing a project" href="releasing_a_project.html" />
    <link rel="prev" title="Recording changes" href="recording_changes.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="releasing_a_project.html" title="Releasing a project"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="recording_changes.html" title="Recording 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="browsing-history">
<h1>Browsing history<a class="headerlink" href="#browsing-history" title="Permalink to this headline">¶</a></h1>
<div class="section" id="bzr-log">
<h2>bzr log<a class="headerlink" href="#bzr-log" title="Permalink to this headline">¶</a></h2>
<p>The <tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">log</span></tt> command shows a list of previous revisions.</p>
<p>As with <tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">diff</span></tt>, <tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">log</span></tt> supports the <tt class="docutils literal"><span class="pre">-r</span></tt> argument:</p>
<div class="highlight-python"><div class="highlight"><pre>% bzr log -r 1000..          # Revision 1000 and everything after it
% bzr log -r ..1000          # Everything up to and including r1000
% bzr log -r 1000..1100      # changes from 1000 to 1100
% bzr log -r 1000            # The changes in only revision 1000
</pre></div>
</div>
</div>
<div class="section" id="viewing-merged-revisions">
<h2>Viewing merged revisions<a class="headerlink" href="#viewing-merged-revisions" title="Permalink to this headline">¶</a></h2>
<p>As distributed VCS tools like Bazaar make merging much easier than
it is in central VCS tools, the history of a branch may often contain
lines of development splitting off the mainline and merging back
in at a later time. Technically, the relationship between the
numerous revision nodes is known as a Directed Acyclic Graph or
DAG for short.</p>
<p>In many cases, you typically want to see the mainline first and drill
down from there. The default behaviour of log is therefore to show
the mainline and indicate which revisions have nested merged revisions.
To explore the merged revisions for revision X, use the following command:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr log -n0 -rX
</pre></div>
</div>
<p>To see all revisions and all their merged revisions:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr log -n0
</pre></div>
</div>
<p>Note that the -n option is used to indicate the number of levels to display
where 0 means all. If that is too noisy, you can easily adjust the number
to only view down so far. For example, if your project is structured with
a top level gatekeeper merging changes from team gatekeepers, <tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">log</span></tt>
shows what the top level gatekeeper did while <tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">log</span> <span class="pre">-n2</span></tt> shows what
the team gatekeepers did. In the vast majority of cases though, <tt class="docutils literal"><span class="pre">-n0</span></tt>
is fine.</p>
</div>
<div class="section" id="tuning-the-output">
<h2>Tuning the output<a class="headerlink" href="#tuning-the-output" title="Permalink to this headline">¶</a></h2>
<p>The <tt class="docutils literal"><span class="pre">log</span></tt> command has several options that are useful for tuning
the output. These include:</p>
<blockquote>
<div><ul class="simple">
<li><tt class="docutils literal"><span class="pre">--forward</span></tt> presents the log in chronological order, i.e. the
most recent revisions are displayed last.</li>
<li>the <tt class="docutils literal"><span class="pre">--limit</span></tt> option controls the maximum number of revisions displayed.</li>
</ul>
</div></blockquote>
<p>See the online help for the log command or the User Reference for more
information on tuning the output.</p>
</div>
<div class="section" id="viewing-the-history-for-a-file">
<h2>Viewing the history for a file<a class="headerlink" href="#viewing-the-history-for-a-file" title="Permalink to this headline">¶</a></h2>
<p>It is often useful to filter the history so that it only
applies to a given file. To do this, provide the filename
to the <tt class="docutils literal"><span class="pre">log</span></tt> command like this:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr log foo.py
</pre></div>
</div>
</div>
<div class="section" id="viewing-an-old-version-of-a-file">
<h2>Viewing an old version of a file<a class="headerlink" href="#viewing-an-old-version-of-a-file" title="Permalink to this headline">¶</a></h2>
<p>To get the contents of a file at a given version, use the
<tt class="docutils literal"><span class="pre">cat</span></tt> command like this:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr cat -r X file
</pre></div>
</div>
<p>where <tt class="docutils literal"><span class="pre">X</span></tt> is the revision identifier and <tt class="docutils literal"><span class="pre">file</span></tt> is
the filename. This will send output to the standard output
stream so you&#8217;ll typically want to pipe the output through
a viewing tool (like <tt class="docutils literal"><span class="pre">less</span></tt> or <tt class="docutils literal"><span class="pre">more</span></tt>) or redirect it
like this:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr cat -r -2 foo.py | less
bzr cat -r 1 foo.py &gt; /tmp/foo-1st-version.py
</pre></div>
</div>
</div>
<div class="section" id="graphical-history-viewers">
<h2>Graphical history viewers<a class="headerlink" href="#graphical-history-viewers" title="Permalink to this headline">¶</a></h2>
<p>History browsing is one area where GUI tools really make life easier.
Bazaar has numerous plug-ins that provide this capability including
QBzr and bzr-gtk. See <a class="reference external" href="plugins.html">Using plugins</a> for details on how to install
these if they are not already installed.</p>
<p>To use the graphical viewer from QBzr:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr qlog
</pre></div>
</div>
<p>To use the graphical viewer from bzr-gtk:</p>
<div class="highlight-python"><div class="highlight"><pre>bzr viz
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">viz</span></tt> is actually a built-in alias for <tt class="docutils literal"><span class="pre">visualize</span></tt> so use the longer
command name if you prefer.</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="#">Browsing history</a><ul>
<li><a class="reference internal" href="#bzr-log">bzr log</a></li>
<li><a class="reference internal" href="#viewing-merged-revisions">Viewing merged revisions</a></li>
<li><a class="reference internal" href="#tuning-the-output">Tuning the output</a></li>
<li><a class="reference internal" href="#viewing-the-history-for-a-file">Viewing the history for a file</a></li>
<li><a class="reference internal" href="#viewing-an-old-version-of-a-file">Viewing an old version of a file</a></li>
<li><a class="reference internal" href="#graphical-history-viewers">Graphical history viewers</a></li>
</ul>
</li>
</ul>

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