This file is indexed.

/usr/share/doc/monotone/html/Attribute-Handling.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!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: Attribute Handling</title>

<meta name="description" content="monotone documentation: Attribute Handling">
<meta name="keywords" content="monotone documentation: Attribute Handling">
<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="Hooks.html#Hooks" rel="up" title="Hooks">
<link href="GIT-Export-Hooks.html#GIT-Export-Hooks" rel="next" title="GIT Export Hooks">
<link href="Selector-Expansion.html#Selector-Expansion" rel="prev" title="Selector Expansion">
<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="Attribute-Handling"></a>
<div class="header">
<p>
Next: <a href="GIT-Export-Hooks.html#GIT-Export-Hooks" accesskey="n" rel="next">GIT Export Hooks</a>, Previous: <a href="Selector-Expansion.html#Selector-Expansion" accesskey="p" rel="prev">Selector Expansion</a>, Up: <a href="Hooks.html#Hooks" accesskey="u" rel="up">Hooks</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="Attribute-Handling-1"></a>
<h4 class="subsection">6.1.10 Attribute Handling</h4>

<p>Some files in a project are special; they may require different
handling (such as binary or structured files that should always be
manually merged &ndash; see <a href="Merge-Conflicts.html#File-Content-Conflict">File Content Conflict</a>), or they may
represent executable scripts or programs.
</p>
<p>Monotone allows each file (or directory) in a repository to carry
arbitrary <a href="File-Attributes.html#File-Attributes">File Attributes</a>.  Persistent attributes are stored in
each revision&rsquo;s manifest. The hooks in this section allow files to be
automatically recognised as having certain attributes at the time
they&rsquo;re added, and for custom triggers to be invoked on each file
according to its attributes when the workspace is changed.
</p>
<dl compact="compact">
<dd><a name="attr_005ffunctions"></a></dd>
<dt><code>attr_functions [<var>attribute</var>] (<var>filename</var>, <var>value</var>)</code>
<a name="index-attr_005ffunctions-_005battribute_005d-_0028filename_002c-value_0029"></a>
</dt>
<dd>
<p>This is not a hook function, but a <em>table</em> of hook functions,
indexed by <var>attribute</var>. Each entry in the table
<code>attr_functions</code> is a function taking a file name <var>filename</var>
and an attribute value <var>value</var>. The function should &ldquo;apply&rdquo; the
attribute to the file in the file system, possibly in a
platform-specific way.
</p>
<p>These hooks are called by any command that modifies workspace files,
including <code><a href="Workspace.html#mtn-revert">mtn revert</a></code>, <code><a href="Workspace.html#mtn-undrop">mtn undrop</a></code>,
<code><a href="Workspace.html#mtn-update">mtn update</a></code>, <code><a href="Tree.html#mtn-merge_005finto_005fworkspace">mtn merge_into_workspace</a></code>,
<code><a href="Workspace.html#mtn-pluck">mtn pluck</a></code>, <code><a href="Network.html#mtn-clone">mtn clone</a></code> and
<code><a href="Tree.html#mtn-checkout">mtn checkout</a></code>.
</p>
<p>When called to set an attribute, <var>value</var> is a string representing
the value of the attribute.
</p>
<p>When called to clear an attribute, <var>value</var> is <code>nil</code>.
</p>
<p>This facility can be used to extend monotone&rsquo;s understanding of files
with platform-specific attributes, such as permission bits, access
control lists, or special file types.
</p>
<p>By default, there is only one entry in this table, for the <code>mtn:execute</code>
attribute. It calls platform-specific functions to mark files as
executable or not. See <a href="Default-hooks.html#Default-hooks">Default hooks</a>.
</p>
<a name="attr_005finit_005ffunctions"></a></dd>
<dt><code>attr_init_functions [<var>attribute</var>] (<var>filename</var>)</code>
<a name="index-attr_005finit_005ffunctions-_005battribute_005d-_0028filename_0029"></a>
</dt>
<dd>
<p>This is not a hook function, but a <em>table</em> of hook
functions. Each entry in the table <code>attr_init_functions</code>, at
table entry <var>attribute</var>, is a function taking a file (or
directory) name <var>filename</var>. Each function returns <code>true</code> if
the attribute should be set on <var>filename</var>. This table of hook
functions is called once for each file during an <em>add</em>.
</p>
<p>By default, there are only two entries in this table, for the
<code>mtn:execute</code> and <code>mtn:manual_merge</code> attributes. Their
definition is:
</p>
<div class="smallexample">
<pre class="smallexample">attr_init_functions[&quot;mtn:execute&quot;] =
   function(filename)
      if (is_executable(filename)) then
        return &quot;true&quot;
      else
        return nil
      end
   end
attr_init_functions[&quot;mtn:manual_merge&quot;] =
   function(filename)
      if (binary_file(filename)) then
        return &quot;true&quot; -- binary files must be merged manually
      else
        return nil
      end
   end
</pre></div>

<p>The <code>binary_file</code> function is also defined as a Lua hook. See
<a href="Default-hooks.html#Default-hooks">Default hooks</a>.
</p>
</dd>
</dl>

<hr>
<div class="header">
<p>
Next: <a href="GIT-Export-Hooks.html#GIT-Export-Hooks" accesskey="n" rel="next">GIT Export Hooks</a>, Previous: <a href="Selector-Expansion.html#Selector-Expansion" accesskey="p" rel="prev">Selector Expansion</a>, Up: <a href="Hooks.html#Hooks" accesskey="u" rel="up">Hooks</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>