Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 7e647d9940d31b34c253e6f71c416c4b > files > 2679

bzr-2.7.0-6.mga7.aarch64.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>Dirstate &#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="“bzr update” performance analysis" href="update.html" />
    <link rel="prev" title="Miscellaneous notes" href="miscellaneous-notes.html" />
<link rel="stylesheet" href="_static/bzr-doc.css" type="text/css" />
 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="update.html" title="“bzr update” performance analysis"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="miscellaneous-notes.html" title="Miscellaneous notes"
             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">Developer Document Catalog (2.7.0)</a> &#187;</li>

          <li class="nav-item nav-item-1"><a href="miscellaneous-notes.html" accesskey="U">Miscellaneous notes</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="dirstate">
<h1>Dirstate<a class="headerlink" href="#dirstate" title="Permalink to this headline">¶</a></h1>
<p>Don’t really need the hashes of the current versions - just knowing
whether they’ve changed or not will generally be enough - and just the
mtime and ctime of a point in time may be enough?</p>
<div class="section" id="dirblock-state">
<h2><code class="docutils literal notranslate"><span class="pre">_dirblock_state</span></code><a class="headerlink" href="#dirblock-state" title="Permalink to this headline">¶</a></h2>
<p>There are currently 4 levels that state can have.</p>
<blockquote>
<div><ol class="arabic simple">
<li>NOT_IN_MEMORY
The actual content blocks have not been read at all.</li>
<li>IN_MEMORY_UNMODIFIED
The content blocks have been read and are available for use. They have
not been changed at all versus what was written on disk when we read
them.</li>
<li>IN_MEMORY_HASH_MODIFIED
We have updated the in-memory state, but only to record the
sha1/symlink target value and the stat value that means this
information is ‘fresh’.</li>
<li>IN_MEMORY_MODIFIED
We have updated an actual record. (Parent lists, added a new file,
deleted something, etc.) In this state, we must always write out the
dirstate, or some user action will be lost.</li>
</ol>
</div></blockquote>
<div class="section" id="in-memory-hash-modified">
<h3>IN_MEMORY_HASH_MODIFIED<a class="headerlink" href="#in-memory-hash-modified" title="Permalink to this headline">¶</a></h3>
<p>This state is a bit special, so deserves its own topic.  If we are
IN_MEMORY_HASH_MODIFIED, we only write out the dirstate if enough records
have been updated. The idea is that if we would save future I/O by writing
an updated dirstate, then we should do so. The threshold for this is set
by “worth_saving_limit”. The default is that at least 10 entries must be
updated in order to consider the dirstate file worth updating.</p>
<p>Going one step further, newly added files, symlinks, and directory entries
updates are treated specially. We know that we will always stat all
entries in the tree so that we can observe <em>if</em> they have changed. In the
case of directories, all the information we know about them is just from
that stat value. There is no extra content to read. So an update directory
entry doesn’t cause us to update to IN_MEMORY_HASH_MODIFIED. However, if
there are other modifications worth saving, we will go ahead and save the
directory entry update at the same time.</p>
<p>Similarly, symlink targets are commonly stored in the inode entry
directly. So once we have stat’ed the symlink, we already have its target
information in memory. The one caveat is if we used to think an object was
a file, and it became a directory or symlink, then we will treat it as
worth saving.</p>
<p>In the case of newly added files, we never have to read their content to
know that they are different from the basis tree. So saving the updated
information also won’t save a future read.</p>
</div>
</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="#">Dirstate</a><ul>
<li><a class="reference internal" href="#dirblock-state"><code class="docutils literal notranslate"><span class="pre">_dirblock_state</span></code></a><ul>
<li><a class="reference internal" href="#in-memory-hash-modified">IN_MEMORY_HASH_MODIFIED</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="miscellaneous-notes.html"
                        title="previous chapter">Miscellaneous notes</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="update.html"
                        title="next chapter">“bzr update” performance analysis</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/dirstate.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="update.html" title="“bzr update” performance analysis"
             >next</a></li>
        <li class="right" >
          <a href="miscellaneous-notes.html" title="Miscellaneous notes"
             >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">Developer Document Catalog (2.7.0)</a> &#187;</li>

          <li class="nav-item nav-item-1"><a href="miscellaneous-notes.html" >Miscellaneous notes</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>