/usr/share/doc/monotone/html/Tree.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 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 | <html lang="en">
<head>
<title>Tree - 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="Global-and-Common-Options.html#Global-and-Common-Options" title="Global and Common Options">
<link rel="next" href="Workspace.html#Workspace" title="Workspace">
<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="Tree"></a>
<p>
Next: <a rel="next" accesskey="n" href="Workspace.html#Workspace">Workspace</a>,
Previous: <a rel="previous" accesskey="p" href="Global-and-Common-Options.html#Global-and-Common-Options">Global and Common Options</a>,
Up: <a rel="up" accesskey="u" href="Command-Reference.html#Command-Reference">Command Reference</a>
<hr>
</div>
<h3 class="section">4.2 Tree</h3>
<dl>
<a name="mtn-checkout"></a><dt><samp><span class="command">mtn checkout [--[no-]move-conflicting-paths] --revision=</span><var>id</var> <var>directory</var></samp><a name="index-mtn-checkout-_005b_002d_002d_005bno_002d_005dmove_002dconflicting_002dpaths_005d-_002d_002drevision_003d_0040var_007bid_007d-_0040var_007bdirectory_007d-39"></a><dt><samp><span class="command">mtn checkout [--[no-]move-conflicting-paths] --branch=</span><var>branchname</var> <var>directory</var></samp><a name="index-mtn-checkout-_005b_002d_002d_005bno_002d_005dmove_002dconflicting_002dpaths_005d-_002d_002dbranch_003d_0040var_007bbranchname_007d-_0040var_007bdirectory_007d-40"></a><dt><samp><span class="command">mtn co</span></samp><a name="index-mtn-co-41"></a><dd><samp><span class="command">co</span></samp> is an alias for <samp><span class="command">checkout</span></samp>
<p>These commands copy a revision <var>id</var> out of your database,
recording the chosen revision (the <dfn>base revision</dfn>) in the file
<samp><var>directory</var><span class="file">/_MTN/revision</span></samp>. These commands then copy every
file version listed in the revision's manifest to paths under
<var>directory</var>.
<p>For example, if the revision's manifest contains these entries:
<pre class="smallexample"> dir ""
file "Makefile"
content [84e2c30a2571bd627918deee1e6613d34e64a29e]
file "include/hello.h"
content [c61af2e67eb9b81e46357bb3c409a9a53a7cdfc6]
file "src/hello.c"
content [97dfc6fd4f486df95868d85b4b81197014ae2a84]
</pre>
<p>Then the following files are created:
<pre class="smallexample"> <var>directory</var>/
<var>directory</var>/Makefile
<var>directory</var>/include/hello.h
<var>directory</var>/src/hello.c
</pre>
<p>If you wish to <samp><span class="command">checkout</span></samp> in the current directory, you can
supply the special name <samp><span class="file">.</span></samp> (a single period) for
<var>directory</var>. When running <samp><span class="command">checkout</span></samp> into an existing
directory, it is sometimes possible for <a href="Workspace-Collisions.html#Workspace-Collisions">Workspace Collisions</a> to
occur.
<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.
<br><dt><samp><span class="command">mtn conflicts</span></samp><a name="index-mtn-conflicts-42"></a><dd>See <a href="Conflicts.html#Conflicts">Conflicts</a>
<p><a name="mtn-explicit_005fmerge"></a><br><dt><samp><span class="command">mtn explicit_merge [--[no-]update] </span><var>id</var> <var>id</var> <var>destbranch</var></samp><a name="index-mtn-explicit_005fmerge-_005b_002d_002d_005bno_002d_005dupdate_005d-_0040var_007bid_007d-_0040var_007bid_007d-_0040var_007bdestbranch_007d-43"></a><dd>See the online help for options. See <a href="_002d_002dupdate.html#g_t_002d_002dupdate">–update</a>.
<p>This command merges exactly the two <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 <samp><span class="command">propagate</span></samp> or <samp><span class="command">merge</span></samp>
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><a href="Merge-Conflicts.html#Merge-Conflicts">Merge Conflicts</a> can occur.
<br><dt><samp><span class="command">mtn heads [--branch=</span><var>branchname</var><span class="command">]</span></samp><a name="index-mtn-heads-_005b_002d_002dbranch_003d_0040var_007bbranchname_007d_005d-44"></a><dd>This command lists the “heads” of <var>branchname</var> (defaults to the
current workspace).
<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><br><dt><samp><span class="command">mtn import --branch=</span><var>branch</var><span class="command"> [--message=</span><var>message</var><span class="command">] [--[no-]dry-run] </span><var>dir</var></samp><a name="index-mtn-import-_002d_002dbranch_003d_0040var_007bbranch_007d-_005b_002d_002dmessage_003d_0040var_007bmessage_007d_005d-_005b_002d_002d_005bno_002d_005ddry_002drun_005d-_0040var_007bdir_007d-45"></a><dt><samp><span class="command">mtn import --revision=</span><var>revision</var><span class="command"> [--message=</span><var>message</var><span class="command">] [--[no-]dry-run] </span><var>dir</var></samp><a name="index-mtn-import-_002d_002drevision_003d_0040var_007brevision_007d-_005b_002d_002dmessage_003d_0040var_007bmessage_007d_005d-_005b_002d_002d_005bno_002d_005ddry_002drun_005d-_0040var_007bdir_007d-46"></a><dd>See the online help for more options.
<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>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>If neither <samp><span class="option">--message</span></samp> nor <samp><span class="option">--message-file</span></samp> is given,
the Lua hook <code><a href="edit_005fcomment.html#edit_005fcomment">edit_comment</a></code> is called to provide a commit
comment, with text formatted as in <samp><span class="command"><a href="mtn-commit.html#mtn-commit">mtn commit</a></span></samp>.
<p>If <samp><span class="option">--dry-run</span></samp> is given, no commit is done.
<p>Roughly speaking, <samp><span class="command">mtn import</span></samp> does the following:
<pre class="example"> $ mtn setup <span class="roman">(with a twist)</span>
$ mtn drop --missing
$ mtn add --unknown
$ mtn commit
</pre>
<p>The twist with the <samp><span class="command">mtn setup</span></samp> 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><br><dt><samp><span class="command">mtn merge [--branch=</span><var>branchname</var><span class="command">] [--message </span><var>string</var><span class="command">] [--message-file </span><var>filename</var><span class="command">] [--[no-]update]</span></samp><a name="index-mtn-merge-_005b_002d_002dbranch_003d_0040var_007bbranchname_007d_005d-_005b_002d_002dmessage-_0040var_007bstring_007d_005d-_005b_002d_002dmessage_002dfile-_0040var_007bfilename_007d_005d-_005b_002d_002d_005bno_002d_005dupdate_005d-47"></a><dd>See the online help for more options. See <a href="_002d_002dupdate.html#g_t_002d_002dupdate">–update</a>.
<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>A commit message may be provided via <samp><span class="option">--message </span><var>string</var></samp>
or <samp><span class="option">--message-file </span><var>filename</var></samp>. A message stating the
revision ids that were merged will be prepended to any user commit
message.
<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><a href="Merge-Conflicts.html#Merge-Conflicts">Merge Conflicts</a> can occur.
<br><dt><samp><span class="command">mtn merge_into_dir [--[no-]update] </span><var>sourcebranch</var> <var>destbranch</var> <var>dir</var></samp><a name="index-mtn-merge_005finto_005fdir-_005b_002d_002d_005bno_002d_005dupdate_005d-_0040var_007bsourcebranch_007d-_0040var_007bdestbranch_007d-_0040var_007bdir_007d-48"></a><dd>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, <samp><span class="command">merge_into_dir</span></samp> aborts, doing
nothing.
<p>The purpose of <samp><span class="command">merge_into_dir</span></samp> is to permit a project to contain
another project in such a way that <samp><span class="command">propagate</span></samp> 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>Note that <samp><span class="command">merge_into_dir</span></samp> <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><a href="Merge-Conflicts.html#Merge-Conflicts">Merge Conflicts</a> can occur. See <a href="_002d_002dupdate.html#g_t_002d_002dupdate">–update</a>.
<p><a name="mtn-merge_005finto_005fworkspace"></a><br><dt><samp><span class="command">mtn merge_into_workspace [--[no]-move-conflicting-paths] </span><var>revision</var></samp><a name="index-mtn-merge_005finto_005fworkspace-_005b_002d_002d_005bno_005d_002dmove_002dconflicting_002dpaths_005d-_0040var_007brevision_007d-49"></a><dd>Merges <var>revision</var> 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>When a later commit is done, both <var>revision</var> and the workspace's
base revision will be recorded as parents.
<p><a href="Merge-Conflicts.html#Merge-Conflicts">Merge Conflicts</a> and <a href="Workspace-Collisions.html#Workspace-Collisions">Workspace Collisions</a> can occur.
<br><dt><samp><span class="command">mtn migrate_workspace [</span><var>directory</var><span class="command">]</span></samp><a name="index-mtn-migrate_005fworkspace-_005b_0040var_007bdirectory_007d_005d-50"></a><dd>Migrates a workspace directory's metadata to the latest format.
<p>If no directory is given, defaults to the current workspace.
<p>This may be needed when upgrading to a new version of monotone.
<br><dt><samp><span class="command">mtn propagate </span><var>sourcebranch</var> <var>destbranch</var><span class="command"> [--message </span><var>string</var><span class="command">] [--message-file </span><var>filename</var><span class="command">]</span></samp><a name="index-mtn-propagate-_0040var_007bsourcebranch_007d-_0040var_007bdestbranch_007d-_005b_002d_002dmessage-_0040var_007bstring_007d_005d-_005b_002d_002dmessage_002dfile-_0040var_007bfilename_007d_005d-51"></a><dd>See online help for more options. See <a href="Common-Options.html#Common-Options">Common Options</a>.
<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,
<samp><span class="command">propagate</span></samp> aborts, doing nothing.
<p>A commit message may be provided via <samp><span class="option">--message </span><var>string</var></samp>
or <samp><span class="option">--message-file </span><var>filename</var></samp>. A message stating the
source and target branches will be prepended to any user commit
message.
<p>The purpose of <samp><span class="command">propagate</span></samp> is to copy all the changes on
<var>sourcebranch</var>, since the last <samp><span class="command">propagate</span></samp>, 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><a href="Merge-Conflicts.html#Merge-Conflicts">Merge Conflicts</a> can occur.
<br><dt><samp><span class="command">mtn refresh_inodeprints</span></samp><a name="index-mtn-refresh_005finodeprints-52"></a><dd>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><br><dt><samp><span class="command">mtn setup --branch </span><var>branchname</var><span class="command"> [--db </span><var>database</var><span class="command">] [</span><var>directory</var><span class="command">]</span></samp><a name="index-mtn-setup-_002d_002dbranch-_0040var_007bbranchname_007d-_005b_002d_002ddb-_0040var_007bdatabase_007d_005d-_005b_0040var_007bdirectory_007d_005d-53"></a><dd>This command prepares <var>directory</var> (default current directory) as a
monotone workspace, by creating and populating the <samp><span class="file">_MTN</span></samp>
directory with basic information.
<p>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). Both
settings, branch and database name, will be placed in the
<samp><span class="file">_MTN/options</span></samp> file.
<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
<samp><span class="command">mtn commit</span></samp>.
</dl>
<ul class="menu">
<li><a accesskey="1" href="Conflicts.html#Conflicts">Conflicts</a>
</ul>
</body></html>
|