/usr/share/doc/monotone/html/Tree.html is in monotone-doc 1.1-7.
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 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>monotone documentation: Tree</title>
<meta name="description" content="monotone documentation: Tree">
<meta name="keywords" content="monotone documentation: Tree">
<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="Command-Reference.html#Command-Reference" rel="up" title="Command Reference">
<link href="Conflicts.html#Conflicts" rel="next" title="Conflicts">
<link href="Common-Options.html#Common-Options" rel="prev" title="Common Options">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
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">
<a name="Tree"></a>
<div class="header">
<p>
Next: <a href="Workspace.html#Workspace" accesskey="n" rel="next">Workspace</a>, Previous: <a href="Global-and-Common-Options.html#Global-and-Common-Options" accesskey="p" rel="prev">Global and Common Options</a>, Up: <a href="Command-Reference.html#Command-Reference" accesskey="u" rel="up">Command Reference</a> [<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="Tree-1"></a>
<h3 class="section">4.2 Tree</h3>
<dl compact="compact">
<dd><a name="mtn-checkout"></a></dd>
<dt><code>mtn checkout [--[no-]move-conflicting-paths] --revision=<var>id</var> <var>directory</var></code>
<a name="index-mtn-checkout-_005b_002d_002d_005bno_002d_005dmove_002dconflicting_002dpaths_005d-_002d_002drevision_003did-directory"></a>
</dt>
<dt><code>mtn checkout [--[no-]move-conflicting-paths] --branch=<var>branchname</var> <var>directory</var></code>
<a name="index-mtn-checkout-_005b_002d_002d_005bno_002d_005dmove_002dconflicting_002dpaths_005d-_002d_002dbranch_003dbranchname-directory"></a>
</dt>
<dt><code>mtn co</code>
<a name="index-mtn-co"></a>
</dt>
<dd><p><code>co</code> is an alias for <code>checkout</code>. See <a href="Selectors.html#Selectors">Selectors</a>.
</p>
<p>These commands copy a revision <var>id</var> out of your database,
recording the chosen revision (the <em>base revision</em>) in the file
<samp><var>directory</var>/_MTN/revision</samp>. These commands then copy every
file version listed in the revision’s manifest to paths under
<var>directory</var>.
</p>
<p>For example, if the revision’s manifest contains these entries:
</p>
<div class="smallexample">
<pre class="smallexample">dir ""
file "Makefile"
content [84e2c30a2571bd627918deee1e6613d34e64a29e]
file "include/hello.h"
content [c61af2e67eb9b81e46357bb3c409a9a53a7cdfc6]
file "src/hello.c"
content [97dfc6fd4f486df95868d85b4b81197014ae2a84]
</pre></div>
<p>Then the following files are created:
</p><div class="smallexample">
<pre class="smallexample"><var>directory</var>/
<var>directory</var>/Makefile
<var>directory</var>/include/hello.h
<var>directory</var>/src/hello.c
</pre></div>
<p>If you wish to <code>checkout</code> in the current directory, you can
supply the special name <samp>.</samp> (a single period) for
<var>directory</var>. When running <code>checkout</code> into an existing
directory, it is sometimes possible for <a href="Workspace-Collisions.html#Workspace-Collisions">Workspace Collisions</a> to
occur.
</p>
<p>If no <var>id</var> is provided, as in the latter two commands, you
<em>must</em> provide a <var>branchname</var>; monotone will attempt to infer
<var>id</var> as the unique head of <var>branchname</var> if it exists.
</p>
</dd>
<dt><code>mtn conflicts</code>
<a name="index-mtn-conflicts"></a>
</dt>
<dd><p>See <a href="Conflicts.html#Conflicts">Conflicts</a>
</p>
<a name="mtn-explicit_005fmerge"></a></dd>
<dt><code>mtn explicit_merge [--[no-]update] <var>id</var> <var>id</var> <var>destbranch</var></code>
<a name="index-mtn-explicit_005fmerge-_005b_002d_002d_005bno_002d_005dupdate_005d-id-id-destbranch"></a>
</dt>
<dd><p>See the online help for options. See <a href="Common-Options.html#g_t_002d_002dupdate">--update</a>. See <a href="Selectors.html#Selectors">Selectors</a>.
</p>
<p>This command merges exactly the two revision <var>id</var>s you give it, and places
the result in branch <var>destbranch</var>. It is useful when you need more
control over the merging process than <code>propagate</code> or <code>merge</code>
give you. For instance, if you have a branch with three heads, and you
only want to merge two of them, you can use this command. Or if you
have a branch with two heads, and you want to propagate one of them to
another branch, again, you can use this command.
</p>
<p><a href="Merge-Conflicts.html#Merge-Conflicts">Merge Conflicts</a> can occur.
</p>
</dd>
<dt><code>mtn heads [--branch=<var>branchname</var>]</code>
<a name="index-mtn-heads-_005b_002d_002dbranch_003dbranchname_005d"></a>
</dt>
<dd><p>This command lists the “heads” of <var>branchname</var> (defaults to the
current workspace).
</p>
<p>The “heads” of a branch is the set of revisions which are members of
the branch, but which have no descendants. These revisions are
generally the “newest” revisions committed by you or your
colleagues, at least in terms of ancestry. The heads of a branch may
not be the newest revisions, in terms of time, but synchronization of
computer clocks is not reliable, so monotone usually ignores time.
</p>
<a name="mtn-import"></a></dd>
<dt><code>mtn import --branch=<var>branch</var> [--message=<var>message</var>] [--[no-]dry-run] <var>dir</var></code>
<a name="index-mtn-import-_002d_002dbranch_003dbranch-_005b_002d_002dmessage_003dmessage_005d-_005b_002d_002d_005bno_002d_005ddry_002drun_005d-dir"></a>
</dt>
<dt><code>mtn import --revision=<var>revision</var> [--message=<var>message</var>] [--[no-]dry-run] <var>dir</var></code>
<a name="index-mtn-import-_002d_002drevision_003drevision-_005b_002d_002dmessage_003dmessage_005d-_005b_002d_002d_005bno_002d_005ddry_002drun_005d-dir"></a>
</dt>
<dd><p>See the online help for more options. See <a href="Selectors.html#Selectors">Selectors</a>.
</p>
<p>This command imports the contents of the given directory and commits it
to the head of the given branch or as a child of the given revision (and
consequently into the branch that revision resides in).
</p>
<p>If the given branch doesn’t exist, it is created automatically. If the
branch already exists, any missing files are dropped and any unknown
files are added before committing.
</p>
<p>If neither <samp>--message</samp> nor <samp>--message-file</samp> is given,
the Lua hook <code><a href="User-Defaults.html#edit_005fcomment">edit_comment</a></code> is called to provide a commit
comment, with text formatted as in <code><a href="Workspace.html#mtn-commit">mtn commit</a></code>.
</p>
<p>If <samp>--dry-run</samp> is given, no commit is done.
</p>
<p>Roughly speaking, <code>mtn import</code> does the following:
</p>
<div class="example">
<pre class="example">$ mtn setup <span class="roman">(with a twist)</span>
$ mtn drop --missing
$ mtn add --unknown
$ mtn commit
</pre></div>
<p>The twist with the <code>mtn setup</code> part is that it sets the parent
to be the given revision or the head of the given branch instead of the
null revision.
</p>
<a name="mtn-merge"></a></dd>
<dt><code>mtn merge [--branch=<var>branchname</var>] [--message <var>string</var>] [--message-file <var>filename</var>] [--[no-]update] [--resolve-conflicts]</code>
<a name="index-mtn-merge-_005b_002d_002dbranch_003dbranchname_005d-_005b_002d_002dmessage-string_005d-_005b_002d_002dmessage_002dfile-filename_005d-_005b_002d_002d_005bno_002d_005dupdate_005d-_005b_002d_002dresolve_002dconflicts_005d"></a>
</dt>
<dd><p>See the online help for more options. See <a href="Common-Options.html#g_t_002d_002dupdate">--update</a>.
</p>
<p>This command merges the “heads” of <var>branchname</var> (default the
branch of the current workspace), if there are multiple heads, and
commits the results to the database, marking the resulting merged
revision as a member of <var>branchname</var>. The merged revision will
contain each of the head revision IDs as ancestors.
</p>
<p>A commit message may be provided via <samp>--message <var>string</var></samp>
or <samp>--message-file <var>filename</var></samp>. A message stating the
revision ids that were merged will be prepended to any user commit
message.
</p>
<p>Merging is performed by repeated pairwise merges: two heads are
selected, then their least common ancestor is located in the ancestry
graph and these 3 revisions are provided to the built-in 3-way merge
algorithm. The process then repeats for each additional head, using
the result of each previous merge as an input to the next.
</p>
<p><a href="Merge-Conflicts.html#Merge-Conflicts">Merge Conflicts</a> for conflicts that can occur, and the use of
<code>--resolve-conflicts</code>.
</p>
</dd>
<dt><code>mtn merge_into_dir [--[no-]update] <var>sourcebranch</var> <var>destbranch</var> <var>dir</var></code>
<a name="index-mtn-merge_005finto_005fdir-_005b_002d_002d_005bno_002d_005dupdate_005d-sourcebranch-destbranch-dir"></a>
</dt>
<dd><p>This command takes a unique head from <var>sourcebranch</var> and merges it
into a unique head of <var>destbranch</var>, as a directory. The resulting
revision is committed to <var>destbranch</var>. If either <var>sourcebranch</var> or
<var>destbranch</var> has multiple heads, <code>merge_into_dir</code> aborts, doing
nothing.
</p>
<p>The purpose of <code>merge_into_dir</code> is to permit a project to contain
another project in such a way that <code>propagate</code> can be used to keep
the contained project up-to-date. It is meant to replace the use of nested
checkouts in many circumstances.
</p>
<p>Note that <code>merge_into_dir</code> <em>does not</em> permit changes made to the
contained project in <var>destbranch</var> to be propagated back to
<var>sourcebranch</var>. Attempting this would lead to <var>sourcebranch</var> containing
both projects nested as in <var>destbranch</var> instead of only the project
originally in <var>sourcebranch</var>, which is almost certainly not what would be
intended.
</p>
<p><a href="Merge-Conflicts.html#Merge-Conflicts">Merge Conflicts</a> can occur. See <a href="Common-Options.html#g_t_002d_002dupdate">--update</a>.
</p>
<a name="mtn-merge_005finto_005fworkspace"></a></dd>
<dt><code>mtn merge_into_workspace [--[no]-move-conflicting-paths] <var>revision</var></code>
<a name="index-mtn-merge_005finto_005fworkspace-_005b_002d_002d_005bno_005d_002dmove_002dconflicting_002dpaths_005d-revision"></a>
</dt>
<dd><p>Merges <var>revision</var> (see <a href="Selectors.html#Selectors">Selectors</a>) into the current
workspace; the result is not committed to the database. There can be
no pending changes in the current workspace. The workspace’s selected
branch is not changed.
</p>
<p>When a later commit is done, both <var>revision</var> and the workspace’s
base revision will be recorded as parents.
</p>
<p><a href="Merge-Conflicts.html#Merge-Conflicts">Merge Conflicts</a> and <a href="Workspace-Collisions.html#Workspace-Collisions">Workspace Collisions</a> can occur.
</p>
</dd>
<dt><code>mtn migrate_workspace [<var>directory</var>]</code>
<a name="index-mtn-migrate_005fworkspace-_005bdirectory_005d"></a>
</dt>
<dd><p>Migrates a workspace directory’s metadata to the latest format.
</p>
<p>If no directory is given, defaults to the current workspace.
</p>
<p>This may be needed when upgrading to a new version of monotone.
</p>
</dd>
<dt><code>mtn propagate <var>sourcebranch</var> <var>destbranch</var> [--message <var>string</var>] [--message-file <var>filename</var>]</code>
<a name="index-mtn-propagate-sourcebranch-destbranch-_005b_002d_002dmessage-string_005d-_005b_002d_002dmessage_002dfile-filename_005d"></a>
</dt>
<dd><p>See online help for more options. See <a href="Common-Options.html#Common-Options">Common Options</a>.
</p>
<p>This command takes a unique head from <var>sourcebranch</var> and merges it
with a unique head of <var>destbranch</var>, using the least common
ancestor of the two heads for a 3-way merge. The resulting revision is
committed to <var>destbranch</var>. If
either <var>sourcebranch</var> or <var>destbranch</var> has multiple heads,
<code>propagate</code> aborts, doing nothing.
</p>
<p>A commit message may be provided via <samp>--message <var>string</var></samp>
or <samp>--message-file <var>filename</var></samp>. A message stating the
source and target branches will be prepended to any user commit
message.
</p>
<p>The purpose of <code>propagate</code> is to copy all the changes on
<var>sourcebranch</var>, since the last <code>propagate</code>, to
<var>destbranch</var>. This command supports the idea of making separate
branches for medium-length development activities, such as
maintenance branches for stable software releases, trivial bug fix
branches, public contribution branches, or branches devoted to the
development of a single module within a larger project.
</p>
<p><a href="Merge-Conflicts.html#Merge-Conflicts">Merge Conflicts</a> can occur.
</p>
</dd>
<dt><code>mtn refresh_inodeprints</code>
<a name="index-mtn-refresh_005finodeprints"></a>
</dt>
<dd><p>This command puts the current workspace into <a href="Inodeprints.html#Inodeprints">Inodeprints</a> mode,
if it was not already, and forces a full inodeprints cache refresh.
After running this command, you are guaranteed that your workspace is
in inodeprints mode, and that the inodeprints cache is accurate and up
to date.
</p>
<a name="mtn-setup"></a></dd>
<dt><code>mtn setup --branch <var>branchname</var> [--db <var>database</var>] [<var>directory</var>]</code>
<a name="index-mtn-setup-_002d_002dbranch-branchname-_005b_002d_002ddb-database_005d-_005bdirectory_005d"></a>
</dt>
<dd><p>This command prepares <var>directory</var> (default current directory) as a
monotone workspace, by creating and populating the <samp>_MTN</samp>
directory with basic information.
</p>
<p>If no database is given, the configured default database is created or
re-used (see <a href="User-Defaults.html#get_005fdefault_005fdatabase_005falias">get_default_database_alias</a> for more details). Both
settings, branch and database name, will be placed in the
<samp>_MTN/options</samp> file.
</p>
<p>This can be used with an empty directory to start a new blank project,
or within an existing directory full of files, prior to using
<code>mtn commit</code>.
</p>
<p>On Windows, workspaces cannot be located in the root directory of a
device; for example, <samp>d:/</samp> is an invalid directory for a workspace.
</p></dd>
</dl>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">• <a href="Conflicts.html#Conflicts" accesskey="1">Conflicts</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
</table>
<hr>
<div class="header">
<p>
Next: <a href="Workspace.html#Workspace" accesskey="n" rel="next">Workspace</a>, Previous: <a href="Global-and-Common-Options.html#Global-and-Common-Options" accesskey="p" rel="prev">Global and Common Options</a>, Up: <a href="Command-Reference.html#Command-Reference" accesskey="u" rel="up">Command Reference</a> [<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>
|