This file is indexed.

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

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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
<head>
<title>monotone documentation: Versions of files</title>

<meta name="description" content="monotone documentation: Versions of files">
<meta name="keywords" content="monotone documentation: Versions of files">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="General-Index.html#General-Index" rel="index" title="General Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Concepts.html#Concepts" rel="up" title="Concepts">
<link href="Versions-of-trees.html#Versions-of-trees" rel="next" title="Versions of trees">
<link href="Concepts.html#Concepts" rel="prev" title="Concepts">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>
<link rel="stylesheet" type="text/css" href="texinfo.css">


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Versions-of-files"></a>
<div class="header">
<p>
Next: <a href="Versions-of-trees.html#Versions-of-trees" accesskey="n" rel="next">Versions of trees</a>, Previous: <a href="Concepts.html#Concepts" accesskey="p" rel="prev">Concepts</a>, Up: <a href="Concepts.html#Concepts" accesskey="u" rel="up">Concepts</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="General-Index.html#General-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Versions-of-files-1"></a>
<h3 class="section">1.1 Versions of files</h3>

<p>Suppose you wish to modify a file <samp>file.txt</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 <em>parent</em>, and the new version is a
<em>child</em>, and that you have performed an <em>edit</em> 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.
</p>
<img src="figures/parent-child.png" alt="figures/parent-child">

<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 <small>SHA1</small>, of each version. The details of this
function are beyond the scope of this document; in summary, the <small>SHA1</small>
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 name="DOCF1" href="#FOOT1"><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.
</p>
<img src="figures/parent-child-names-hashes.png" alt="figures/parent-child-names-hashes">

<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 <small>SHA1</small>
value, which we will also refer to as their <em>file ID</em>. 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.
</p>
<img src="figures/parent-child-hashes.png" alt="figures/parent-child-hashes">

<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.
</p>
<img src="figures/three-versions.png" alt="figures/three-versions">

<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 <em>delta</em>.
</p>
<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.
</p>
<img src="figures/difference-between-versions.png" alt="figures/difference-between-versions">

<div class="footnote">
<hr>
<h4 class="footnotes-heading">Footnotes</h4>

<h3><a name="FOOT1" href="#DOCF1">(1)</a></h3>
<p>We
say <small>SHA1</small> values are &ldquo;unique&rdquo; here, when in fact there is a
small probability of two different versions having the same <small>SHA1</small>
value. This probability is very small, so we discount it.</p>
</div>
<hr>
<div class="header">
<p>
Next: <a href="Versions-of-trees.html#Versions-of-trees" accesskey="n" rel="next">Versions of trees</a>, Previous: <a href="Concepts.html#Concepts" accesskey="p" rel="prev">Concepts</a>, Up: <a href="Concepts.html#Concepts" accesskey="u" rel="up">Concepts</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="General-Index.html#General-Index" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>