This file is indexed.

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

<h3 class="section">4.4 Network</h3>

     <dl>
<dt><samp><span class="command">mtn serve [--bind=[</span><var>address</var><span class="command">][:</span><var>port</var><span class="command">]]</span></samp><a name="index-mtn-serve-_005b_002d_002dbind_003d_005b_0040var_007baddress_007d_005d_005b_003a_0040var_007bport_007d_005d_005d-91"></a><dt><samp><span class="command">mtn pull [--[no-]set-default] [--[no-]dry-run] [</span><var>uri</var><span class="command">]</span></samp><a name="index-mtn-pull-_005b_002d_002d_005bno_002d_005dset_002ddefault_005d-_005b_002d_002d_005bno_002d_005ddry_002drun_005d-_005b_0040var_007buri_007d_005d-92"></a><dt><samp><span class="command">mtn push [--[no-]set-default] [--[no-]dry-run] [--keys-to-push=</span><var>key</var><span class="command">] [</span><var>uri</var><span class="command">]</span></samp><a name="index-mtn-push-_005b_002d_002d_005bno_002d_005dset_002ddefault_005d-_005b_002d_002d_005bno_002d_005ddry_002drun_005d-_005b_002d_002dkeys_002dto_002dpush_003d_0040var_007bkey_007d_005d-_005b_0040var_007buri_007d_005d-93"></a><dt><samp><span class="command">mtn sync [--[no-]set-default] [--[no-]dry-run] [--keys-to-push=</span><var>key</var><span class="command">] [</span><var>uri</var><span class="command">]</span></samp><a name="index-mtn-sync-_005b_002d_002d_005bno_002d_005dset_002ddefault_005d-_005b_002d_002d_005bno_002d_005ddry_002drun_005d-_005b_002d_002dkeys_002dto_002dpush_003d_0040var_007bkey_007d_005d-_005b_0040var_007buri_007d_005d-94"></a><dt><samp><span class="command">mtn pull [--[no-]set-default] [</span><var>address</var><span class="command">] [</span><var>glob</var><span class="command"> [...] [--exclude=</span><var>exclude-glob</var><span class="command">]]] </span><strong>deprecated</strong></samp><a name="index-mtn-pull-_005b_002d_002d_005bno_002d_005dset_002ddefault_005d-_005b_0040var_007baddress_007d_005d-_005b_0040var_007bglob_007d-_005b_002e_002e_002e_005d-_005b_002d_002dexclude_003d_0040var_007bexclude_002dglob_007d_005d_005d_005d-_0040strong_007bdeprecated_007d-95"></a><dt><samp><span class="command">mtn push [--[no-]set-default] [--keys-to-push=</span><var>key</var><span class="command">] [</span><var>address</var><span class="command">] [</span><var>glob</var><span class="command"> [...] [--exclude=</span><var>exclude-glob</var><span class="command">]]] </span><strong>deprecated</strong></samp><a name="index-mtn-push-_005b_002d_002d_005bno_002d_005dset_002ddefault_005d-_005b_002d_002dkeys_002dto_002dpush_003d_0040var_007bkey_007d_005d-_005b_0040var_007baddress_007d_005d-_005b_0040var_007bglob_007d-_005b_002e_002e_002e_005d-_005b_002d_002dexclude_003d_0040var_007bexclude_002dglob_007d_005d_005d_005d-_0040strong_007bdeprecated_007d-96"></a><dt><samp><span class="command">mtn sync [--[no-]set-default] [--keys-to-push=</span><var>key</var><span class="command">] [</span><var>address</var><span class="command">] [</span><var>glob</var><span class="command"> [...] [--exclude=</span><var>exclude-glob</var><span class="command">]]] </span><strong>deprecated</strong></samp><a name="index-mtn-sync-_005b_002d_002d_005bno_002d_005dset_002ddefault_005d-_005b_002d_002dkeys_002dto_002dpush_003d_0040var_007bkey_007d_005d-_005b_0040var_007baddress_007d_005d-_005b_0040var_007bglob_007d-_005b_002e_002e_002e_005d-_005b_002d_002dexclude_003d_0040var_007bexclude_002dglob_007d_005d_005d_005d-_0040strong_007bdeprecated_007d-97"></a><dd>See the online help for more options. See <a href="_002d_002dupdate.html#g_t_002d_002dupdate">&ndash;update</a>.

     <p>These commands operate the &ldquo;netsync&rdquo; protocol built into
monotone. This is a custom protocol for rapidly synchronizing two
monotone databases using a hash tree index. The protocol is &ldquo;peer to
peer&rdquo;, but requires one peer to listen for incoming connections (the
server) and the other peer (the client) to connect to the server. When
run with <samp><span class="option">--stdio</span></samp>, the server listens for a single connection
then terminates. When run with <samp><span class="option">--bind</span></samp>, or with neither
option, the server listens for TCP connections and serves them
continuously, until it is shut down.

     <p>The network <var>address</var> given to <samp><span class="command">serve</span></samp> as an argument to
<samp><span class="option">--bind</span></samp> should be a host name to listen on, optionally
followed by a colon and a port number. The default port number is
4691. If no <samp><span class="option">--bind</span></samp> option is given, the server listens on
port 4691 of every network interface.

     <p>If <samp><span class="command">serve</span></samp> is run with <samp><span class="option">--stdio</span></samp>, a single netsync
session is served over the <code>stdin</code> and <code>stdout</code> file
descriptors. If <samp><span class="option">--no-transport-auth</span></samp> is provided along with
<samp><span class="option">--stdio</span></samp>, transport authentication and access control mechanisms
are disabled. Only use <samp><span class="option">--no-transport-auth</span></samp> if you are certain
that the transport channel in use already provides sufficient
authentication and authorization facilities.

     <p>If <samp><span class="option">--dry-run</span></samp> is given, the connection is made, but no data is
transferred. Instead, a summary of what would be transferred is
output; the number of revisions, certs and keys that would be sent and
received. For sent revisions, the branch names are also output.

     <p>The <var>uri-or-address</var> arguments given to <samp><span class="command">push</span></samp>,
<samp><span class="command">pull</span></samp>, and <samp><span class="command">sync</span></samp> can be of two possible forms.

     <p>If the argument is an URI, the Lua hook
<a href="get_005fnetsync_005fconnect_005fcommand.html#get_005fnetsync_005fconnect_005fcommand">get_netsync_connect_command</a> may transform it into a connection
command, which is later executed as the transport channel for netsync. 
The URI itself consists of a connection scheme, an optional user (only
used for <code>ssh</code>-related transports), a host with an optional port
(which both might be optional as well, f.e. for the <code>file</code>
scheme), a path and a query part, which denotes one or more branches
and optionally also exclude patterns for the exchange:

     <p><a name="netsync-uri"></a>
     <pre class="smallexample">     &lt;scheme&gt;://[[&lt;user&gt;@]&lt;host&gt;[:&lt;port&gt;]][/&lt;path&gt;][?&lt;pattern&gt;[;-&lt;exclude-pattern&gt;[...]]]
</pre>
     <p>Valid examples of URIs monotone accepts are:

     <pre class="smallexample">     mtn://my.server:4690?my.branch
     mtn://my.server/project?my.other.branch*;-my.other.branch.test
     file:///path/to/database.mtn?my.branch
     ssh://joe@my.server/~/db.mtn?joes.branch
</pre>
     <p><code>file:</code> and <code>ssh:</code> are not supported on Windows native, but
they are supported on Windows Cygwin.

     <p>If the server has a multi-host setup, the path component of the URI
might be used to distinguish between different databases (please ask the
provider of the server for details).

     <p>For backward compatibility, if the argument is a simple hostname (with
no scheme, but with optional port number), monotone will default to
the <code>mtn:</code> URI scheme, i.e. use a TCP socket to the specified
host and port.  The <var>glob</var> parameters then indicate a set of
branches to exchange.  Multiple <var>glob</var> and <samp><span class="option">--exclude</span></samp>
options can be specified.  <strong>Important notice:</strong> This call syntax
is deprecated and subject to removal in future versions of monotone!

     <p>For both syntaxes, every branch which matches a <var>glob</var> or branch pattern
exactly, and does not match an <var>exclude-glob</var> or exclude pattern, will be
indexed and made available for synchronization.

     <p>For example, perhaps Bob and Alice wish to synchronize their
<code>net.venge.monotone.win32</code> and <code>net.venge.monotone.i18n</code>
branches. Supposing Alice's computer has hostname
<code>alice.someisp.com</code>, then Alice might run:

     <pre class="smallexample">     $ mtn --bind=alice.someisp.com serve
</pre>
     <p>And Bob might run

     <pre class="smallexample">     $ mtn sync "mtn://alice.someisp.com?net.venge.monotone*"
</pre>
     <p>When the operation completes, all branches matching
<code>net.venge.monotone*</code> will be synchronized between Alice and Bob's
databases.

     <p>The <samp><span class="command">pull</span></samp>, <samp><span class="command">push</span></samp>, and <samp><span class="command">sync</span></samp> commands only
require you pass <var>uri</var> the first time you use one of them;
monotone will store this in the database and in the future default to
the same URI.  For instance, if Bob wants to <samp><span class="command">sync</span></samp> with Alice
again, he can simply run:

     <pre class="smallexample">     $ mtn sync
</pre>
     <p>Of course, he can still <samp><span class="command">sync</span></samp> with other people and other
branches by passing an URI, address or address plus globs on the command
line; this will not affect his default affinity for Alice.  If you ever
do want to change your defaults, simply pass the <samp><span class="option">--set-default</span></samp>
option when connecting to the server and branch pattern that you want to
make the new default.

     <p>The <samp><span class="command">serve</span></samp> command doesn't care about workspaces, so even if
you stand in one, you will have to give it the database to serve, the
server key to use and the key directory explicitly.

     <p>In the server, different permissions can be applied to each branch;
see <a href="get_005fnetsync_005fread_005fpermitted.html#get_005fnetsync_005fread_005fpermitted">get_netsync_read_permitted</a> and
<a href="get_005fnetsync_005fwrite_005fpermitted.html#get_005fnetsync_005fwrite_005fpermitted">get_netsync_write_permitted</a>.

     <p>If <samp><span class="option">--pid-file</span></samp> is specified, <samp><span class="command">serve</span></samp> will create the
specified file and record the process identifier of the server in the
file.  This file can then be read to identify specific monotone server
processes.

     <p>The syntax for patterns is very simple.  <code>*</code> matches 0 or more
arbitrary characters.  <code>?</code> matches exactly 1 arbitrary character
(you need to escape that with <code>%3F</code> in a URI). <code>{,}</code>
matches alternatives; <code>{foo,bar,baz}</code> matches &ldquo;foo&rdquo;, or
&ldquo;bar&rdquo;, or &ldquo;baz&rdquo;.  These can be combined arbitrarily.  A backslash
(<code>\</code>) escapes these special characters, to match exactly that
character; this might be useful in case someone, for some odd
reason, decides to put a &ldquo;*&rdquo; into their branch name.

     <p><a name="mtn-clone"></a><br><dt><samp><span class="command">mtn clone </span><var>uri</var><span class="command"> [--branch=</span><var>branchname</var><span class="command">] [--revision=</span><var>rev</var><span class="command">] [</span><var>directory</var><span class="command">]</span></samp><a name="index-mtn-clone-_0040var_007buri_007d-_005b_002d_002dbranch_003d_0040var_007bbranchname_007d_005d-_005b_002d_002drevision_003d_0040var_007brev_007d_005d-_005b_0040var_007bdirectory_007d_005d-98"></a><dt><samp><span class="command">mtn clone </span><var>address</var><span class="command">[:</span><var>port</var><span class="command">] </span><var>branchname</var><span class="command"> [</span><var>directory</var><span class="command">] </span><strong>deprecated</strong></samp><a name="index-mtn-clone-_0040var_007baddress_007d_005b_003a_0040var_007bport_007d_005d-_0040var_007bbranchname_007d-_005b_0040var_007bdirectory_007d_005d-_0040strong_007bdeprecated_007d-99"></a><dd><samp><span class="command">clone</span></samp> is a helper command that performs the roles of a
number of other commands all at once.  First, it constructs a new
database. If no database is given, the configured default database is
created or re-used (see <a href="get_005fdefault_005fdatabase_005falias.html#get_005fdefault_005fdatabase_005falias">get_default_database_alias</a> for more
details; <samp><span class="file">~/.monotone/default.mtn</span></samp> by default). Then it populates
this database by <samp><span class="command">pull</span></samp>ing any data which match the branch
pattern in the <var>uri</var> argument from the remote database.

     <p>The branch pattern must specify a single branch; <samp><span class="command">clone</span></samp> uses
that to determine which branch to checkout.

     <p>Finally, <samp><span class="command">clone</span></samp> copies the files out of the newly created
database into a local directory, just as <samp><span class="command">checkout</span></samp> would.  If
no <var>directory</var> is given, the <var>branchname</var> is used as
directory. If <samp><span class="option">--revision</span></samp> is given, that revision must be on
the specified branch, and is checked out; otherwise the head of the
branch is checked out.

     <p><strong>Important notice:</strong> The <var>address</var>[:<var>port</var>] <var>branchname</var>
call syntax is deprecated and subject to removal in future versions of monotone!

</dl>

</body></html>