This file is indexed.

/usr/share/doc/monotone/html/Adding-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
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<html lang="en">
<head>
<title>Adding 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="Tutorial.html#Tutorial" title="Tutorial">
<link rel="prev" href="Starting-a-New-Project.html#Starting-a-New-Project" title="Starting a New Project">
<link rel="next" href="Committing-Work.html#Committing-Work" title="Committing Work">
<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="Adding-Files"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Committing-Work.html#Committing-Work">Committing Work</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Starting-a-New-Project.html#Starting-a-New-Project">Starting a New Project</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Tutorial.html#Tutorial">Tutorial</a>
<hr>
</div>

<h3 class="section">2.6 Adding Files</h3>

<p>Next Jim decides to add some files to the project. He writes up
a file containing the prototypes for the JuiceBot 7:

<pre class="smallexample">$ mkdir include
$ cat &gt;include/jb.h
/* Standard JuiceBot hw interface */

#define FLOW_JUICE 0x1
#define POLL_JUICE 0x2
int spoutctl(int port, int cmd, void *x);

/* JuiceBot 7 API */

#define APPLE_SPOUT 0x7e
#define BANANA_SPOUT 0x7f
void dispense_apple_juice ();
void dispense_banana_juice ();
^D
</pre>
<p>Then adds a couple skeleton source files which he wants Abe and Beth
to fill in:

<pre class="smallexample">$ mkdir src
$ cat &gt;src/apple.c
#include "jb.h"

void
dispense_apple_juice()
{
  /* Fill this in please, Abe. */
}
^D
$ cat &gt;src/banana.c
#include "jb.h"

void
dispense_banana_juice()
{
  /* Fill this in please, Beth. */
}
^D
</pre>
<p>Now Jim tells monotone to add these files to its record of his
workspace.  He specifies one filename and one directory; monotone
recursively scans the directory and adds all its files.

<pre class="smallexample">$ mtn add -R include/jb.h src
mtn: adding include/jb.h to workspace manifest
mtn: adding src/apple.c to workspace manifest
mtn: adding src/banana.c to workspace manifest
</pre>
<p>This command produces a record of Jim's intentions in a special file
called <samp><span class="file">_MTN/revision</span></samp>, stored in the workspace. The file is plain
text:

<pre class="smallexample">$ cat _MTN/revision
format_version "1"

new_manifest [0000000000000000000000000000000000000002]

old_revision []

add_dir ""

add_dir "include"

add_dir "src"

add_file "include/jb.h"
 content [f6996ce2dfc5d32bda8b574c3e9ce75db8d55492]

add_file "src/apple.c"
 content [1ce885d2cc59842ff16785834391e864068fbc3c]

add_file "src/banana.c"
 content [ad88bbbb1b7507ddff26be67efd91d95e069afb6]
</pre>
<p>You will never have to look at this file, but it is nice to know that
it is there.

<p>Jim then gets up from his machine to get a coffee. When he returns
he has forgotten what he was doing. He asks monotone:

<pre class="smallexample">$ mtn status
----------------------------------------------------------------------
Revision: 493bda86628fd72c992eb56f73899db9ead3cf6f
Author:   jim@juicebot.co.jp
Date:     2004-10-26T02:53:08
Branch:   jp.co.juicebot.jb7

Changes

  added
  added    include
  added    src
  added    include/jb.h
  added    src/apple.c
  added    src/banana.c
</pre>
<p>The output of this command tells Jim that his edits, so far,
constitute only the addition of some files and directories.

<p>Jim wants to see the actual details of the files he added, however, so
he runs a command which prints out the revision <em>and</em> a GNU
&ldquo;unified diff&rdquo; of the patches involved in the changeset:

<pre class="smallexample">$ mtn diff
#
# old_revision []
#
# add_dir ""
#
# add_dir "include"
#
# add_dir "src"
#
# add_file "include/jb.h"
#  content [f6996ce2dfc5d32bda8b574c3e9ce75db8d55492]
#
# add_file "src/apple.c"
#  content [1ce885d2cc59842ff16785834391e864068fbc3c]
#
# add_file "src/banana.c"
#  content [ad88bbbb1b7507ddff26be67efd91d95e069afb6]
#
============================================================
--- include/jb.h        f6996ce2dfc5d32bda8b574c3e9ce75db8d55492
+++ include/jb.h        f6996ce2dfc5d32bda8b574c3e9ce75db8d55492
@ -0,0 +1,13 @
+/* Standard JuiceBot hw interface */
+
+#define FLOW_JUICE 0x1
+#define POLL_JUICE 0x2
+#define SET_INTR 0x3
+int spoutctl(int port, int cmd, void *x);
+
+/* JuiceBot 7 API */
+
+#define APPLE_SPOUT 0x7e
+#define BANANA_SPOUT 0x7f
+void dispense_apple_juice ();
+void dispense_banana_juice ();
============================================================
--- src/apple.c 1ce885d2cc59842ff16785834391e864068fbc3c
+++ src/apple.c 1ce885d2cc59842ff16785834391e864068fbc3c
@ -0,0 +1,7 @
+#include "jb.h"
+
+void
+dispense_apple_juice()
+{
+  /* Fill this in please, Abe. */
+}
============================================================
--- src/banana.c        ad88bbbb1b7507ddff26be67efd91d95e069afb6
+++ src/banana.c        ad88bbbb1b7507ddff26be67efd91d95e069afb6
@ -0,0 +1,7 @
+#include "jb.h"
+
+void
+dispense_banana_juice()
+{
+  /* Fill this in please, Beth. */
+}
</pre>
</body></html>