/usr/share/doc/monotone/html/VCS.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 | <html lang="en">
<head>
<title>VCS - 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="Automation.html#Automation" title="Automation">
<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="VCS"></a>
<p>
Previous: <a rel="previous" accesskey="p" href="Automation.html#Automation">Automation</a>,
Up: <a rel="up" accesskey="u" href="Command-Reference.html#Command-Reference">Command Reference</a>
<hr>
</div>
<h3 class="section">4.12 VCS</h3>
<dl>
<dt><samp><span class="command">mtn cvs_import </span><var>pathname</var></samp><a name="index-mtn-cvs_005fimport-_0040var_007bpathname_007d-260"></a><dd>
This command imports all the file versions in each RCS file found in the
tree of files starting at <var>pathname</var>, then reconstructs the
tree-wide history of logical changes by comparing RCS time stamps and
change log entries. For each logical tree-wide change, monotone
synthesizes a manifest and revision, and commits them (along with all
associated file deltas) to your database. It also copies all change log
entries, author identifiers, and date stamps to manifest certificates.
<p>In normal use, <var>pathname</var> will be a CVS module, though it is
possible to point it at a directory within a module as well. Whatever
directory you point it at will become the root of monotone's version of
the tree.
<p><a name="mtn-git_005fexport"></a><br><dt><samp><span class="command">mtn git_export [--authors-file=</span><var>authors-file</var><span class="command">] [--branches-file=</span><var>branches-file</var><span class="command">]</span></samp><a name="index-mtn-git_005fexport-_005b_002d_002dauthors_002dfile_003d_0040var_007bauthors_002dfile_007d_005d-_005b_002d_002dbranches_002dfile_003d_0040var_007bbranches_002dfile_007d_005d-261"></a><dt><samp><span class="command">[--import-marks=</span><var>marks-file</var><span class="command">] [--export-marks=</span><var>marks-file</var><span class="command">]</span></samp><a name="index-g_t_005b_002d_002dimport_002dmarks_003d_0040var_007bmarks_002dfile_007d_005d-_005b_002d_002dexport_002dmarks_003d_0040var_007bmarks_002dfile_007d_005d-262"></a><dt><samp><span class="command">[--log-revids] [--log-certs] [--use-one-changelog]</span></samp><a name="index-g_t_005b_002d_002dlog_002drevids_005d-_005b_002d_002dlog_002dcerts_005d-_005b_002d_002duse_002done_002dchangelog_005d-263"></a><dt><samp><span class="command">[--refs=</span><var>type</var><span class="command">]</span></samp><a name="index-g_t_005b_002d_002drefs_003d_0040var_007btype_007d_005d-264"></a><dd>
This command exports all revisions from the current monotone database
to <code>stdout</code> in a format that can be piped directly to git
fast-import.
<p>The <samp><span class="option">--authors-file</span></samp> option may be used to map monotone author
and committer names to different values in a manner similar to that
documented in git-svn(1). Mappings are specified in the file as:
<pre class="verbatim"> loginname = Joe User <user@example.com>
</pre>
<p>The list of authors that might need to be mapped can be extracted from
a monotone database with the following sql query:
<pre class="verbatim"> $ mtn db execute 'select distinct value from revision_certs where name = "author"'
</pre>
<p>The list of committers that might need to be mapped can be extracted
from a monotone database with the following sql query:
<pre class="verbatim"> $ mtn db execute 'select distinct public_keys.name
from public_keys
left join revision_certs on revision_certs.keypair_id = public_keys.id
where revision_certs.name = "author"'
</pre>
<p>The <samp><span class="option">--branches-file</span></samp> option may be used to map monotone branch
names to different values. This may be required as monotone allows
branch names that are not valid according to git. Branch mappings are
specified in the <var>branches-file</var> as:
<pre class="verbatim"> monotone-branch-name = git-branch-name
</pre>
<p>Revisions with no author cert will use "Unknown <unknown>" for both
the author and the committer. These can be mapped to other values
using the <var>authors-file</var> option.
<p>The list of branches that might need to be mapped can be extracted
from a monotone database with using the <samp><span class="command">ls branches</span></samp> command:
<pre class="verbatim"> $ mtn ls branches --ignore-suspend-certs
</pre>
<p>The <samp><span class="option">--import-marks</span></samp> and <samp><span class="option">--export-marks</span></samp> options are
similar to those documented in git-fast-export(1) and
git-fast-import(1). These may be used for incremental exports and may
also be useful for repository verification. The <var>marks-file</var> is
read on startup if <samp><span class="option">--import-marks</span></samp> is specified and all marked
revs are excluded from the export. The <var>marks-file</var> is written on
completion if <samp><span class="option">--export-marks</span></samp> is specified and will contain
marks for all revs that were exported in addition to any marks that
were read on startup. It is safe to use the same file for both
<samp><span class="option">--import-marks</span></samp> and <samp><span class="option">--export-marks</span></samp> but different
files may also be used.
<p>The original monotone revision ids may be included in the exported git
commit messages using the <samp><span class="option">--log-revids</span></samp> option. These will
appear as:
<pre class="verbatim"> Monotone-Parent: ...
Monotone-Revision: ...
</pre>
<p>in the git commit messages and may be useful for repository
verification. Merge revisions with two parents will include two
<code>Monotone-Parent</code> lines.
<p>The original monotone values for <code>author</code>, <code>date</code>,
<code>branch</code> and <code>tag</code> certificates may be included in the
exported git commit messages using the <samp><span class="option">--log-certs</span></samp>
option. These will appear as:
<pre class="verbatim"> Monotone-Author: ...
Monotone-Date: ...
Monotone-Branch: ...
Monotone-Tag: ...
</pre>
<p>in the git commit messages and may be useful for repository
verification or maintaining information that is otherwise not
maintained by git. In particular monotone may have several values for
each of these certs and git only represents a single <code>author</code> and
<code>date</code> value.
<p>By default, the values of all changelog and comment certs on a
revision are concatenated to form the git commit message for that
revision. The <samp><span class="option">--use-one-changelog</span></samp> option will prevent this
behaviour and use the value from the first changelog cert
encountered. <em>WARNING:</em> this will explicitly lose information in
the exported data. Changelog certs have no implicit ordering, one will
be selected arbitrarily to be used as the git commit message and all
others will be excluded from the exported data. Additionally, all
comment certs will be excluded from the exported data.
<p>References to the original monotone branches and tags are exported as
<code>refs/tags/<tag-name></code> and <code>refs/heads/<branch-name></code>. In
addition, references to the original monotone revision ids, the root
revisions and the leaf revisions may be exported using
<samp><span class="option">--refs=revs</span></samp>, <samp><span class="option">--refs=roots</span></samp> and <samp><span class="option">--refs=leaves</span></samp>
respectively. These references are exported as
<code>refs/mtn/revs/<id></code>, <code>refs/mtn/roots/<id></code> and
<code>refs/mtn/leaves/<id></code> and may be useful for repository
verification. These additional references should probably not be
maintained after the exported repository has been verified as they
cause considerable clutter in tools like gitk.
</dl>
</body></html>
|