/usr/share/doc/monotone/html/Committing-Work.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 157 158 | <!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: Committing Work</title>
<meta name="description" content="monotone documentation: Committing Work">
<meta name="keywords" content="monotone documentation: Committing Work">
<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="Tutorial.html#Tutorial" rel="up" title="Tutorial">
<link href="Basic-Network-Service.html#Basic-Network-Service" rel="next" title="Basic Network Service">
<link href="Adding-Files.html#Adding-Files" rel="prev" title="Adding Files">
<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="Committing-Work"></a>
<div class="header">
<p>
Next: <a href="Basic-Network-Service.html#Basic-Network-Service" accesskey="n" rel="next">Basic Network Service</a>, Previous: <a href="Adding-Files.html#Adding-Files" accesskey="p" rel="prev">Adding Files</a>, Up: <a href="Tutorial.html#Tutorial" accesskey="u" rel="up">Tutorial</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="Committing-Work-1"></a>
<h3 class="section">2.7 Committing Work</h3>
<p>Satisfied with the work he’s done, Jim wants to save his changes. He
then commits his workspace, which causes monotone to process the
<samp>_MTN/revision</samp> file and record the file contents, manifest, and
revision into the database. Since he provided a branch name when he
ran <code>setup</code>, monotone will use this as the default branch name
when he commits.
</p>
<div class="smallexample">
<pre class="smallexample">$ mtn commit --message="initial checkin of project"
mtn: beginning commit on branch 'jp.co.juicebot.jb7'
mtn: committed revision 493bda86628fd72c992eb56f73899db9ead3cf6f
</pre></div>
<p>When monotone committed Jim’s revision, it updated <samp>_MTN/revision</samp>
to record the workspace’s new base revision ID. Jim can use this
revision ID in the future, as an argument to the <code>checkout</code>
command, if he wishes to return to this revision:
</p>
<div class="smallexample">
<pre class="smallexample">$ mtn automate get_base_revision_id
493bda86628fd72c992eb56f73899db9ead3cf6f
</pre></div>
<p>Monotone also generated a number of certificates attached to
the new revision, and made sure that the database contained a copy of Jim’s
public key. These certs store metadata about the commit. Jim can
ask monotone for a list of certs on this revision.
</p>
<div class="smallexample">
<pre class="smallexample">$ mtn ls certs 493bda86628fd72c992eb56f73899db9ead3cf6f
-----------------------------------------------------------------
Key : jim@juicebot.co.jp (398cb10d...)
Sig : ok
Name : branch
Value : jp.co.juicebot.jb7
-----------------------------------------------------------------
Key : jim@juicebot.co.jp (398cb10d...)
Sig : ok
Name : date
Value : 2004-10-26T02:53:08
-----------------------------------------------------------------
Key : jim@juicebot.co.jp (398cb10d...)
Sig : ok
Name : author
Value : jim@juicebot.co.jp
-----------------------------------------------------------------
Key : jim@juicebot.co.jp (398cb10d...)
Sig : ok
Name : changelog
Value : initial checkin of project
</pre></div>
<p>The output of this command has a block for each cert found. Each block
has 4 significant pieces of information. The first indicates the
signer of the cert, in this case <code>jim@juicebot.co.jp</code>. The
second indicates whether this cert is “ok”, meaning whether the
<small>RSA</small> signature provided is correct for the cert data. The third is
the cert name, and the fourth is the cert value. This list shows us
that monotone has confirmed that, according to
<code>jim@juicebot.co.jp</code>, the revision
<code>493bda86628fd72c992eb56f73899db9ead3cf6f</code> is a member of the
branch <code>jp.co.juicebot.jb7</code>, written by
<code>jim@juicebot.co.jp</code>, with the given date and changelog.
</p>
<p>It is important to keep in mind that revisions are not “in” or
“out” of a branch in any global sense, nor are any of these cert
values <i>true</i> or <i>false</i> in any global sense. Each cert indicates
that <i>some person</i> – in this case Jim – would like to associate a
revision with some value; it is up to you to decide if you want to
accept that association.
</p>
<p>Jim can now check the status of his branch using the “heads”
command, which lists all the head revisions in the branch:
</p>
<div class="smallexample">
<pre class="smallexample">$ mtn heads
branch 'jp.co.juicebot.jb7' is currently merged:
493bda86628fd72c992eb56f73899db9ead3cf6f jim@juicebot.co.jp 2004-10-26T02:53:08
</pre></div>
<p>The output of this command tells us that there is only one current
“head” revision in the branch <code>jp.co.juicebot.jb7</code>, and it is
the revision Jim just committed. A head revision is one without any
descendants. Since Jim has not committed any changes to this revision
yet, it has no descendants.
</p>
<hr>
<div class="header">
<p>
Next: <a href="Basic-Network-Service.html#Basic-Network-Service" accesskey="n" rel="next">Basic Network Service</a>, Previous: <a href="Adding-Files.html#Adding-Files" accesskey="p" rel="prev">Adding Files</a>, Up: <a href="Tutorial.html#Tutorial" accesskey="u" rel="up">Tutorial</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>
|