This file is indexed.

/usr/share/doc/monotone/html/Restrictions.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
<html lang="en">
<head>
<title>Restrictions - 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="Advanced-Uses.html#Advanced-Uses" title="Advanced Uses">
<link rel="prev" href="Selectors.html#Selectors" title="Selectors">
<link rel="next" href="Scripting.html#Scripting" title="Scripting">
<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="Restrictions"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Scripting.html#Scripting">Scripting</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Selectors.html#Selectors">Selectors</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Advanced-Uses.html#Advanced-Uses">Advanced Uses</a>
<hr>
</div>

<h3 class="section">3.3 Restrictions</h3>

<p>Several monotone commands accept optional <var>pathname...</var> arguments in
order to establish a &ldquo;restriction&rdquo;.  Restrictions are used to limit
the files and directories these commands examine for changes when
comparing the workspace to the revision it is based on. Restricting a
command to a specified set of files or directories simply ignores
changes to files or directories not included by the restriction.

<p>The following commands all support restrictions using optional
<var>pathname...</var> arguments:

     <ul>
<li><samp><span class="command">status</span></samp>
<li><samp><span class="command">diff</span></samp>
<li><samp><span class="command">revert</span></samp>
<li><samp><span class="command">commit</span></samp>
<li><samp><span class="command">list known</span></samp>
<li><samp><span class="command">list unknown</span></samp>
<li><samp><span class="command">list ignored</span></samp>
<li><samp><span class="command">list missing</span></samp>
<li><samp><span class="command">list changed</span></samp>
<li><samp><span class="command">log</span></samp>
</ul>

<p>Including either the old or new name of a renamed file or directory will
cause both names to be included in a restriction. If in doubt, the
<samp><span class="command">status</span></samp> command can be used to &ldquo;test&rdquo; a set of pathnames to
ensure that the expected files are included or excluded by a
restriction.

<p>Commands which support restrictions also support the
<samp><span class="option">--depth=</span><var>n</var> </samp> and <samp><span class="option">--exclude=</span><var>path</var></samp>
options. The value <var>n</var> given to <samp><span class="option">--depth</span></samp> specifies the
maximum number of directories to descend. For example, <var>n</var>=0
disables recursion, <var>n</var>=1 means descend at most one directory
below each specified path, and so on.  The <samp><span class="option">--depth</span></samp> value
applies individually to each path specified on the command line. The
value <var>path</var> given to <samp><span class="option">--exclude</span></samp> specifies a path that
should be excluded from the restriction. Multiple <samp><span class="option">--exclude</span></samp>
options may be specified to exclude several files or subdirectories.

<p>The <samp><span class="command">update</span></samp> command does not allow for updates to a
restricted set of files, which may be slightly different than other
version control systems. Partial updates don't really make sense in
monotone, as they would leave the workspace based on a revision that
doesn't exist in the database, starting an entirely new line of
development.

<p>In addition to including all of the explicitly specified paths and
excluding all of the paths specified with <samp><span class="option">--exclude</span></samp> options a
restriction also implicitly includes the parent directories of all
included paths. This is done to allow commands operating on newly
added files to succeed. For example, if a new directory <samp><span class="file">a</span></samp> is
added and a file <samp><span class="file">a/b</span></samp> is added to this directory restricting to
exactly <samp><span class="file">a/b</span></samp> will produce a meaningless state that doesn't
include the required parent directory <samp><span class="file">a</span></samp>.

<p>The implicit inclusion of required parent directories is done for all
of the commands listed above with the exception of
<samp><span class="command">revert</span></samp>. This is done to allow reverting the addition of
files in newly added or renamed directories without reverting the
directories themselves. If the parent directories were implicitly
included their addition or name changes would also be reverted.

<h3 class="heading">Subdirectory restrictions</h3>

<p>The restrictions facility also allows commands to operate from within
a subdirectory of the workspace.  By default, the <i>entire workspace</i>
is always examined for changes. However, specifying an explicit
<samp><span class="file">.</span></samp>  pathname to a command will restrict it to the current
subdirectory.  Note that this is quite different from other version
control systems and may seem somewhat surprising.

<p>The expectation is that requiring a single <samp><span class="file">.</span></samp> to restrict to the
current subdirectory should be simple to use. While the alternative,
defaulting to restricting to the current subdirectory, would require a
somewhat complicated <samp><span class="file">../../..</span></samp> sequence to remove the
restriction and operate on the whole tree.

<p>This default was chosen because monotone versions whole project trees
and generally expects to commit all changes in the workspace as a
single atomic unit. Other version control systems often version
individual files or directories and may not support atomic commits at
all.

<p>When working from within a subdirectory of the workspace all
paths specified to monotone commands must be relative to the current
subdirectory.

<h3 class="heading">Finding a workspace</h3>

<p>Monotone only stores a single <samp><span class="file">_MTN</span></samp> directory at the root of a
workspace. Because of this, a search is done to find the <samp><span class="file">_MTN</span></samp>
directory in case a command is executed from within a subdirectory of a
workspace. Before a command is executed, the search for a workspace
directory is done by traversing parent directories until an
<samp><span class="file">_MTN</span></samp> directory is found or the filesystem root is reached. Upon
finding an <samp><span class="file">_MTN</span></samp> directory, the <samp><span class="file">_MTN/options</span></samp> file is read for
default options. The <samp><span class="option">--root</span></samp> option may be used to stop the
search early, before reaching the root of the physical filesystem. The
<samp><span class="option">--no-workspace</span></samp> option may be used to prevent the search entirely.

<p>Many monotone commands don't require a workspace and will simply
proceed with no default options if no <samp><span class="file">_MTN</span></samp> directory is found. 
However, some monotone commands do require a workspace and will fail
if no <samp><span class="file">_MTN</span></samp> directory can be found.

<p>The <samp><span class="command">checkout</span></samp>, <samp><span class="command">clone</span></samp> and <samp><span class="command">setup</span></samp> commands
create a <i>new workspace</i> and initialize a new <samp><span class="file">_MTN/options</span></samp>
file based on their current option settings.

</body></html>