This file is indexed.

/usr/share/doc/monotone/html/Versions-of-files.html is in monotone-doc 1.0-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
<html lang="en">
<head>
<title>Versions of files - monotone documentation</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="monotone documentation">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Concepts.html#Concepts" title="Concepts">
<link rel="prev" href="Concepts.html#Concepts" title="Concepts">
<link rel="next" href="Versions-of-trees.html#Versions-of-trees" title="Versions of trees">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
<link rel="stylesheet" type="text/css" href="texinfo.css">
</head>
<body>
<div class="node">
<a name="Versions-of-files"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Versions-of-trees.html#Versions-of-trees">Versions of trees</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Concepts.html#Concepts">Concepts</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Concepts.html#Concepts">Concepts</a>
<hr>
</div>

<h3 class="section">1.1 Versions of files</h3>

<p>Suppose you wish to modify a file <samp><span class="file">file.txt</span></samp> on your
computer. You begin with one <i>version</i> of the file, load it into
an editor, make some changes, and save the file again. Doing so
produces a new <i>version</i> of the file. We will say that the older
version of the file was a <dfn>parent</dfn>, and the new version is a
<dfn>child</dfn>, and that you have performed an <dfn>edit</dfn> between the
parent and the child. We may draw the relationship between parent and
child using a graph, where the arrow in the graph indicates the
direction of the edit, from parent to child.

<div class="block-image"><img src="figures/parent-child.png" alt="figures/parent-child.png"></div>

<p>We may want to identify the parent and the child precisely, for sake
of reference. To do so, we will compute a <i>cryptographic hash
function</i>, called <span class="sc">sha1</span>, of each version. The details of this
function are beyond the scope of this document; in summary, the <span class="sc">sha1</span>
function takes a version of a file and produces a short string of 20
bytes, which we will use to uniquely identify the version<a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a>.  Now our
graph does not refer to some &ldquo;abstract&rdquo; parent and child, but rather
to the exact edit we performed between a specific parent and a
specific child.

<div class="block-image"><img src="figures/parent-child-names-hashes.png" alt="figures/parent-child-names-hashes.png"></div>

<p>When dealing with versions of files, we will dispense with writing out
&ldquo;file names&rdquo;, and identify versions <i>purely</i> by their <span class="sc">sha1</span>
value, which we will also refer to as their <dfn>file ID</dfn>. Using IDs
alone will often help us accommodate the fact that people often wish
to call files by different names. So now our graph of parent and child
is just a relationship between two versions, only identified by ID.

<div class="block-image"><img src="figures/parent-child-hashes.png" alt="figures/parent-child-hashes.png"></div>

<p>Version control systems, such as monotone, are principally concerned
with the storage and management of <i>multiple</i> versions of some files. 
One way to store multiple versions of a file is, literally, to save a
separate <i>complete</i> copy of the file, every time you make a
change. When necessary, monotone will save complete copies of your
files, compressed with the <code>zlib</code> compression format.

<div class="block-image"><img src="figures/three-versions.png" alt="figures/three-versions.png"></div>

<p>Often we find that successive versions of a file are very similar to
one another, so storing multiple complete copies is a waste of
space. In these cases, rather than store <i>complete</i> copies of each
version of a file, we store a compact description of only the
<i>changes</i> which are made between versions. Such a description of
changes is called a <dfn>delta</dfn>.

<p>Storing deltas between files is, practically speaking, as good as
storing complete versions of files. It lets you undo changes from a
new version, by applying the delta backwards, and lets your friends
change their old version of the file into the new version, by applying
the delta forwards. Deltas are usually smaller than full files, so
when possible monotone stores deltas, using a modified <code>xdelta</code>
format. The details of this format are beyond the scope of this
document.

<div class="block-image"><img src="figures/difference-between-versions.png" alt="figures/difference-between-versions.png"></div>

<div class="footnote">
<hr>
<h4>Footnotes</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small> We
say <span class="sc">sha1</span> values are &ldquo;unique&rdquo; here, when in fact there is a
small probability of two different versions having the same <span class="sc">sha1</span>
value. This probability is very small, so we discount it.</p>

<hr></div>

</body></html>