monotone-commits-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-commits-diffs] net.venge.monotone: 1e05603f7fa9c777d392affa43


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone: 1e05603f7fa9c777d392affa434694b80dfb3d13
Date: Fri, 14 Jan 2011 14:11:12 GMT

revision:            1e05603f7fa9c777d392affa434694b80dfb3d13
date:                2011-01-14T14:09:53
author:              address@hidden
branch:              net.venge.monotone
changelog:
merge of '55d93ea5221a26f7dd0e1c2c3a35a56321e1483e'
     and 'e7de71b0f9fd6113f13b00eeddfdcd8aa57bcd78'



manifest:
format_version "1"

new_manifest [8935f9f55c2e126f3fad340a58440d8fa2a144e6]

old_revision [55d93ea5221a26f7dd0e1c2c3a35a56321e1483e]

add_dir "tests/diff_order"

add_file "tests/diff_order/__driver__.lua"
 content [f8ac87ad794d13f3f493be5f2bd934ae75c59053]

add_file "tests/diff_order/expected1"
 content [10c9753513afbbaa9756ddab1e47c6ed59681d20]

add_file "tests/diff_order/expected2"
 content [bf6848cb727c9d3636059d2b53998c2135279c55]

patch "NEWS"
 from [f9ce17392993af31e59748c969baa33ab5296c42]
   to [34d53f7ab5939ffe056625389f73f43fd1de7388]

patch "cmd_diff_log.cc"
 from [a3014082674ecb9c3b0617a9603b03452723fec9]
   to [7bc853e14df844cd704eeb8d3b54ab4fe9bfde06]

patch "pcrewrap.cc"
 from [a4c2c48cb681e893d4bdda32bbebc0132479f8cd]
   to [53efd25cf048ddb118c0c21d413be62b57fe68e0]

old_revision [e7de71b0f9fd6113f13b00eeddfdcd8aa57bcd78]

patch "monotone.texi"
 from [23a45f966060f1b164dd0f7003af4449be8fdb4a]
   to [f1c0f8cf697c3f1694c8a258589bccc3dc27503e]
============================================================
--- NEWS	f9ce17392993af31e59748c969baa33ab5296c42
+++ NEWS	34d53f7ab5939ffe056625389f73f43fd1de7388
@@ -24,9 +24,9 @@ XXX XXX XX XX:XX:XX UTC 2010
         New Features
 
         - 'mtn conflicts store' now outputs a count of the conflicts,
-          and the name of the conflicts file. 
+          and the name of the conflicts file.
           (fixes monotone issue 108)
-        
+
         Bugs fixed
 
         - The internal line merger will actually preserve your line
@@ -34,7 +34,11 @@ XXX XXX XX XX:XX:XX UTC 2010
 
         - Improve help, fix arg indexing in 'conflicts resolve_first'
           (fixes monotone issue 101)
-        
+
+        - A regression from 0.48 prevented monotone from ordering the
+          diff output of individual files alphabetically.
+          (fixes monotone issue 102)
+
         - 'mtn privkey' did not recognize private keys solely available
           in the key store. this has been fixed.
 
============================================================
--- cmd_diff_log.cc	a3014082674ecb9c3b0617a9603b03452723fec9
+++ cmd_diff_log.cc	7bc853e14df844cd704eeb8d3b54ab4fe9bfde06
@@ -115,6 +115,13 @@ dump_diff(lua_hooks & lua,
     }
 
 }
+struct diff_node_data
+{
+  file_path left_path;
+  file_path right_path;
+  file_id left_id;
+  file_id right_id;
+};
 
 static void
 dump_diffs(lua_hooks & lua,
@@ -129,6 +136,10 @@ dump_diffs(lua_hooks & lua,
            bool right_from_db,
            bool show_encloser)
 {
+  // Put all node data in a multimap with the file path of the node as key
+  // which gets automatically sorted. For removed nodes the file path is
+  // the left_path, for added, patched and renamed nodes it is the right_path.
+  std::multimap<file_path, diff_node_data> path_node_data;
   parallel::iter<node_map> i(left_roster.all_nodes(), right_roster.all_nodes());
   while (i.next())
     {
@@ -142,57 +153,29 @@ dump_diffs(lua_hooks & lua,
           // deleted
           if (is_file_t(i.left_data()))
             {
-              file_path left_path, right_path;
-              left_roster.get_name(i.left_key(), left_path);
+              diff_node_data dat;
+              left_roster.get_name(i.left_key(), dat.left_path);
               // right_path is null
 
-              file_id left_id, right_id;
-              left_id = downcast_to_file_t(i.left_data())->content;
+              dat.left_id = downcast_to_file_t(i.left_data())->content;
               // right_id is null
 
-              data left_data, right_data;
-              get_data(db, left_path, left_id, left_from_db, left_data);
-              // right_data is null
-
-              string encloser("");
-              if (show_encloser)
-                lua.hook_get_encloser_pattern(left_path, encloser);
-
-              dump_diff(lua,
-                        left_path, right_path,
-                        left_id, right_id,
-                        left_data, right_data,
-                        diff_format, external_diff_args_given, external_diff_args,
-                        encloser, output);
-            }
+              path_node_data.insert(make_pair(dat.left_path, dat));
+          }
           break;
 
         case parallel::in_right:
           // added
           if (is_file_t(i.right_data()))
             {
-              file_path left_path, right_path;
+              diff_node_data dat;
               // left_path is null
-              right_roster.get_name(i.right_key(), right_path);
+              right_roster.get_name(i.right_key(), dat.right_path);
 
-              file_id left_id, right_id;
               // left_id is null
-              right_id = downcast_to_file_t(i.right_data())->content;
+              dat.right_id = downcast_to_file_t(i.right_data())->content;
 
-              data left_data, right_data;
-              // left_data is null
-              get_data(db, right_path, right_id, right_from_db, right_data);
-
-              string encloser("");
-              if (show_encloser)
-                lua.hook_get_encloser_pattern(right_path, encloser);
-
-              dump_diff(lua,
-                        left_path, right_path,
-                        left_id, right_id,
-                        left_data, right_data,
-                        diff_format, external_diff_args_given, external_diff_args,
-                        encloser, output);
+              path_node_data.insert(make_pair(dat.right_path, dat));
             }
           break;
 
@@ -200,36 +183,45 @@ dump_diffs(lua_hooks & lua,
           // moved/renamed/patched/attribute changes
           if (is_file_t(i.left_data()))
             {
+              diff_node_data dat;
+              dat.left_id = downcast_to_file_t(i.left_data())->content;
+              dat.right_id = downcast_to_file_t(i.right_data())->content;
 
-              file_id left_id, right_id;
-              left_id = downcast_to_file_t(i.left_data())->content;
-              right_id = downcast_to_file_t(i.right_data())->content;
-
-              if (left_id == right_id)
+              if (dat.left_id == dat.right_id)
                 continue;
 
-              file_path left_path, right_path;
-              left_roster.get_name(i.left_key(), left_path);
-              right_roster.get_name(i.right_key(), right_path);
+              left_roster.get_name(i.left_key(), dat.left_path);
+              right_roster.get_name(i.right_key(), dat.right_path);
 
-              data left_data, right_data;
-              get_data(db, left_path, left_id, left_from_db, left_data);
-              get_data(db, right_path, right_id, right_from_db, right_data);
-
-              string encloser("");
-              if (show_encloser)
-                lua.hook_get_encloser_pattern(right_path, encloser);
-
-              dump_diff(lua,
-                        left_path, right_path,
-                        left_id, right_id,
-                        left_data, right_data,
-                        diff_format, external_diff_args_given, external_diff_args,
-                        encloser, output);
+              path_node_data.insert(make_pair(dat.right_path, dat));
             }
           break;
         }
     }
+
+  for (std::multimap<file_path, diff_node_data>::iterator i = path_node_data.begin();
+         i != path_node_data.end(); ++i)
+    {
+      diff_node_data & dat = (*i).second;
+      data left_data, right_data;
+
+      if (!null_id(dat.left_id))
+        get_data(db, dat.left_path, dat.left_id, left_from_db, left_data);
+
+      if (!null_id(dat.right_id))
+        get_data(db, dat.right_path, dat.right_id, right_from_db, right_data);
+
+      string encloser("");
+      if (show_encloser)
+        lua.hook_get_encloser_pattern((*i).first, encloser);
+
+      dump_diff(lua,
+                dat.left_path, dat.right_path,
+                dat.left_id, dat.right_id,
+                left_data, right_data,
+                diff_format, external_diff_args_given, external_diff_args,
+                encloser, output);
+    }
 }
 
 // common functionality for diff and automate content_diff to determine
============================================================
--- pcrewrap.cc	a4c2c48cb681e893d4bdda32bbebc0132479f8cd
+++ pcrewrap.cc	53efd25cf048ddb118c0c21d413be62b57fe68e0
@@ -176,7 +176,7 @@ namespace pcre
     else if (rc < 0)
       pcre_exec_error(rc, made_from, subject_origin); // throws
 
-    for (size_t i=0; i < cap_count; ++i)
+    for (int i=0; i < cap_count; ++i)
       {
         string match;
         // not an empty match
============================================================
--- /dev/null	
+++ tests/diff_order/__driver__.lua	f8ac87ad794d13f3f493be5f2bd934ae75c59053
@@ -0,0 +1,31 @@
+mtn_setup()
+
+check(get("expected1"))
+check(get("expected2"))
+
+-- add two files in two revisions, where the second
+-- gets a bigger internal node id than the first
+addfile("ccc", "foobar")
+commit()
+addfile("bbb", "barbaz")
+commit()
+
+writefile("bbb", "new stuff")
+writefile("ccc", "new stuff")
+
+-- now ensure that the patch is not ordered by node id,
+-- where bbb would have to come first, but by file name
+check(mtn("diff"), 0, true, false)
+check(samefile("stdout", "expected1"))
+
+commit()
+
+-- add a new file and drop an existing one, the order
+-- should still be alphabetical
+addfile("aaa", "even newer")
+writefile("ccc", "even newer")
+check(mtn("drop", "bbb"), 0, false, false)
+
+check(mtn("diff"), 0, true, false)
+check(samefile("stdout", "expected2"))
+
============================================================
--- /dev/null	
+++ tests/diff_order/expected1	10c9753513afbbaa9756ddab1e47c6ed59681d20
@@ -0,0 +1,27 @@
+#
+# old_revision [c263739ff64bb637b6535bf8399322a7d8d6fadd]
+#
+# patch "bbb"
+#  from [32b1bf1853e6c39e4a1c3dae941ab7094ff1d293]
+#    to [e81daec0385673562ae66971d78bfd91bb92c276]
+# 
+# patch "ccc"
+#  from [8843d7f92416211de9ebb963ff4ce28125932878]
+#    to [e81daec0385673562ae66971d78bfd91bb92c276]
+#
+============================================================
+--- bbb	32b1bf1853e6c39e4a1c3dae941ab7094ff1d293
++++ bbb	e81daec0385673562ae66971d78bfd91bb92c276
+@@ -1 +1 @@
+-barbaz
+\ No newline at end of file
++new stuff
+\ No newline at end of file
+============================================================
+--- ccc	8843d7f92416211de9ebb963ff4ce28125932878
++++ ccc	e81daec0385673562ae66971d78bfd91bb92c276
+@@ -1 +1 @@
+-foobar
+\ No newline at end of file
++new stuff
+\ No newline at end of file
============================================================
--- /dev/null	
+++ tests/diff_order/expected2	bf6848cb727c9d3636059d2b53998c2135279c55
@@ -0,0 +1,32 @@
+#
+# old_revision [e7b993188a210fc543abb39f47b84e7971a74396]
+#
+# delete "bbb"
+# 
+# add_file "aaa"
+#  content [23dcbe46f65d262e79d2ccbb3d34efce68dfd602]
+# 
+# patch "ccc"
+#  from [e81daec0385673562ae66971d78bfd91bb92c276]
+#    to [23dcbe46f65d262e79d2ccbb3d34efce68dfd602]
+#
+============================================================
+--- /dev/null	
++++ aaa	23dcbe46f65d262e79d2ccbb3d34efce68dfd602
+@@ -0,0 +1 @@
++even newer
+\ No newline at end of file
+============================================================
+--- bbb	e81daec0385673562ae66971d78bfd91bb92c276
++++ /dev/null	
+@@ -1 +0,0 @@
+-new stuff
+\ No newline at end of file
+============================================================
+--- ccc	e81daec0385673562ae66971d78bfd91bb92c276
++++ ccc	23dcbe46f65d262e79d2ccbb3d34efce68dfd602
+@@ -1 +1 @@
+-new stuff
+\ No newline at end of file
++even newer
+\ No newline at end of file
============================================================
--- monotone.texi	23a45f966060f1b164dd0f7003af4449be8fdb4a
+++ monotone.texi	f1c0f8cf697c3f1694c8a258589bccc3dc27503e
@@ -4885,6 +4885,8 @@ @chapter Command Reference
 Many options can be specified by a single character; see the online
 help for those.
 
+Revision arguments to commands may be selectors or hex ids.
+
 @menu
 * Global and Common Options::   Options that affect all or many commands
 * Tree::                        Operations on tree states in your database
@@ -5201,7 +5203,7 @@ @section Tree
 to be the given revision or the head of the given branch instead of the
 null revision.
 
address@hidden mtn merge address@hidden [--message @var{string}] [--message-file @var{filename}] [--[no-]update]
address@hidden address@hidden mtn merge address@hidden [--message @var{string}] [--message-file @var{filename}] [--[no-]update]
 See the online help for more options. See @ref{--update}.
 
 This command merges the ``heads'' of @var{branchname} (default the
@@ -5488,7 +5490,7 @@ @section Workspace
 @var{attr}.
 
     @table @command
-    @item mtn attr drop @var{path} address@hidden
+    @anchor{mtn attr address@hidden mtn attr drop @var{path} address@hidden
     Remove attributes.
 
     @item mtn attr get @var{path} address@hidden
@@ -5750,7 +5752,7 @@ @section Workspace
 @ref{Merge Conflicts} and @ref{Workspace Collisions} can occur.
 
 @item mtn rename [--bookkeep-only] @var{src} @var{dst}
address@hidden mtn rename [--bookkeep-only] @var{src1} @var{...} @var{dst/}
address@hidden mtn rename [--bookkeep-only] @var{src} @var{...} @var{dst/}
 @itemx mtn mv
 @command{mv} is an alias for @command{rename}.
 
@@ -6198,7 +6200,7 @@ @section Informative
 @item mtn help [--[no-]hidden] @var{command...}
 Displays help about commands and options.
 
address@hidden mtn list branches address@hidden address@hidden
address@hidden list address@hidden mtn list branches address@hidden address@hidden
 @itemx mtn ls branches
 @command{ls branches} is an alias for @command{list branches}.
 
@@ -6206,7 +6208,8 @@ @section Informative
 @var{pattern} is provided, it is used as a glob to select the branches
 listed, otherwise all branches are listed.  If @option{-exclude}
 options are provided they are used as globs to exclude specified
-branches.
+branches. In addition, branches for which the Lua hook
address@hidden returns true are excluded.
 
 Normally, branches that have been suspended are not listed; the global
 option @option{--ignore-suspend-certs} causes suspended branches to
@@ -6582,8 +6585,8 @@ @section Review
 
 This makes @var{rev} invisible as a head of branch @var{branchname}
 (defaults to the current workspace branch).  Any operation that looks
-for heads will not count @var{rev}; this includes @command{mtn list branches}
-as well as @command{mtn merge} etc.
+for heads will not count @var{rev}; this includes @address@hidden
+list branches}} as well as @address@hidden merge}} etc.
 
 If @var{rev} is not a head, @command{suspend} has no effect.
 
@@ -6647,7 +6650,7 @@ @section Key and Cert
 @section Key and Cert
 
 @ftable @command
address@hidden mtn cert @var{selector} @var{certname} address@hidden
address@hidden address@hidden mtn cert @var{selector} @var{certname} address@hidden
 
 Create a new certificate with name @var{certname}, for all
 revisions matching @var{selector}.
@@ -6655,7 +6658,7 @@ @section Key and Cert
 If @var{certval} is provided, it is the value of the certificate.
 Otherwise the certificate value is read from @code{stdin}.
 
address@hidden mtn dropkey @var{keyid}
address@hidden address@hidden mtn dropkey @var{keyid}
 Drop the public and/or private key. This command should be used with
 caution as changes are irreversible without a backup of the key(s)
 that were dropped.
@@ -6800,14 +6803,13 @@ @section Packet I/O
 data items around manually.
 
 @ftable @command
address@hidden mtn privkey @var{keyid}
address@hidden address@hidden address@hidden mtn privkey @var{keyid}
 @itemx mtn pubkey @var{keyid}
 These commands print out an @code{keypair} or @code{pubkey} packet for
 the @sc{rsa} key @var{keyid}. These can be used to transport public or
 private keys safely between monotone databases.
 
address@hidden mtn read
address@hidden mtn read @var{file1} @var{file2...}
address@hidden address@hidden mtn read address@hidden
 This command reads packets from files or @code{stdin} and stores them
 in your database.
 
@@ -6816,15 +6818,17 @@ @section Database
 @page
 @node    Database, Automation, Packet I/O, Command Reference
 @section Database
+All of these commands require that the database is specified, either
+via @option{--db} or the current workspace.
 
 @ftable @command
address@hidden mtn db changesetify
address@hidden mtn db changesetify address@hidden
 Converts the database to the changeset format.
 
 This is only needed when upgrading very old monotone databases,
 created with monotone versions less than 0.15.
 
address@hidden mtn db check address@hidden
address@hidden mtn db check address@hidden
 
 Monotone always works hard to verify the data it creates and accesses.
 For instance, if you have hard drive problems that corrupt data in
@@ -6962,22 +6966,22 @@ @section Database
 This command also verifies that the @sc{sha1} hash of every file, manifest,
 and revision is correct.
 
address@hidden mtn db dump address@hidden
address@hidden mtn db dump address@hidden
 
-This command dumps an SQL statement representing the entire state of
address@hidden to the standard output stream. It is a very low-level
-command, and produces the most ``recoverable'' dumps of your database
-possible. It is sometimes also useful when migrating databases between
-variants of the underlying SQLite database format.
+This command dumps a sequence of SQL instructions representing the
+entire state of @var{dbfile} to the standard output stream. It is a
+very low-level command, and produces the most ``recoverable'' dumps of
+your database possible. It is sometimes also useful when migrating
+databases between variants of the underlying SQLite database format.
 
address@hidden mtn db execute @var{sql-statement}
address@hidden mtn db execute address@hidden @var{sql-statement}
 
 This is a debugging command which executes @var{sql-statement} against
 your database, and prints any results of the _expression_ in a tabular
 form.  It can be used to investigate the state of your database, or
 help diagnose failures.
 
address@hidden mtn db fix_certs [--drop-bad-certs]
address@hidden mtn db fix_certs address@hidden [--drop-bad-certs]
 Attempt to fix bad certs.
 
 Older monotone versions could sometimes associate certs with the wrong
@@ -6987,15 +6991,16 @@ @section Database
 certs in your db when upgrading from monotone 0.44 or earlier, or if
 you loaded such certs with 'mtn read'.
 
address@hidden mtn db info address@hidden
address@hidden mtn db info address@hidden [--full | --concise]
 This command prints information about the monotone database
 @var{dbfile}, including its schema version and various table size
-statistics.
+statistics. @option{--full} prints additional info about timestamps;
+the default is @option{--concise}.
 
address@hidden mtn db init address@hidden
-This command initializes a new monotone database at @var{dbfile}.
address@hidden mtn db init address@hidden
+This command creates and initializes a new monotone database at @var{dbfile}.
 
address@hidden mtn db load address@hidden
address@hidden mtn db load address@hidden
 This command applies a raw SQL statement, read from the standard input
 stream, to the database @var{dbfile}. It is most useful when loading
 a database dumped with the @command{dump} command.
@@ -7004,7 +7009,7 @@ @section Database
 database is @emph{included} in the dump, so you should not try to
 @command{init} your database before a @command{load}.
 
address@hidden mtn db migrate address@hidden
address@hidden mtn db migrate address@hidden
 This command attempts to migrate the database @var{dbfile} to the
 newest schema known by the version of monotone you are currently
 running.  If the migration fails, no changes should be made to the
@@ -7029,34 +7034,35 @@ @section Database
 @item mtn db set_epoch @var{branch} @var{epoch}
 Sets the branch's epoch. See @ref{Rebuilding ancestry} for discussion of epochs.
 
address@hidden mtn db version address@hidden
address@hidden mtn db version address@hidden
 This command prints out just the schema version of the monotone
 database @var{dbfile}.
 
 @item mtn local kill_certs @var{selector} @var{certname} address@hidden
 This command deletes certs with the given name on revisions that match
 the given selector. If a value is given, it restricts itself to only
-delete certs that also have that same value. Like @command{kill_revision},
-it is a very dangerous command; it permanently and irrevocably deletes
-historical information from your database. Also like @command{kill_revision},
-this only deletes the certs from your local database; if there are
-other databases that you sync with which have these certs they
-will reappear when you sync, unless the owners of those databases also delete
-those certificates locally.
+delete certs that also have that same value. Like @address@hidden
+local kill_revision}}, it is a very dangerous command; it permanently
+and irrevocably deletes historical information from your
+database. Also like @command{kill_revision}, this only deletes the
+certs from your local database; if there are other databases that you
+sync with which have these certs they will reappear when you sync,
+unless the owners of those databases also delete those certificates
+locally.
 
 Early versions of monotone had @command{db kill_tag_locally} and
 @command{db kill_branch_certs_locally} commands. These can be emulated with
 @command{local kill_certs i: tag TAG} and
 @command{local kill_certs i: branch BRANCH}, respectively.
 
address@hidden mtn local kill_revision @var{id}
-This command ``kills'', i.e., deletes, a given revision, as well as any
-certs attached to it.  It is a very dangerous
-command; it permanently and irrevocably deletes historical information
-from your database.  If you execute this command in a workspace, whose
-parent revision is the one you are about to delete, the killed revision
-is re-applied to this workspace which makes it possible for you to fix
-a problem and commit again later on easily. For this to work, the
address@hidden local address@hidden mtn local kill_revision @var{id}
+This command ``kills'', i.e., deletes, a given revision, as well as
+any certs attached to it.  It is a very dangerous command; it
+permanently and irrevocably deletes historical information from your
+database.  If you execute this command in a workspace, whose parent
+revision is the one you are about to delete, the killed revision is
+re-applied to this workspace which makes it possible for you to fix a
+problem and commit again later on easily. For this to work, the
 workspace may not have any changes and/or missing files.
 
 There are a number of other caveats with this command:
@@ -7096,16 +7102,24 @@ @section Automation
 also give useful chatter on @code{stderr}, including warnings and error
 messages.
 
+When run under @ref{mtn automate stdio}, there are five output streams
+available; main, error, warning, progress, and ticker. When run under
address@hidden automate}, the main stream goes to stdout, and the error,
+warning, progress, and ticker streams all go to stderr.
+
 Many commands produce output in a format called basic_io; for more
 information, @pxref{Formats}.
 
+Revision arguments to automate commands must be hex ids, not
+selectors.
+
 @ftable @command
address@hidden mtn automate ancestors @var{rev1} address@hidden [...]]
address@hidden automate address@hidden mtn automate ancestors @var{rev...}
 
 @table @strong
 @item Arguments:
 
-One or more revision IDs, @var{rev1}, @var{rev2}, etc.
+One or more revision IDs.
 
 @item Added in:
 
@@ -7129,9 +7143,8 @@ @section Automation
 followed by a newline.  The lines are printed in alphabetically sorted
 order.
 
-The output does not include @var{rev1}, @var{rev2}, etc., except if
address@hidden is itself an ancestor of @var{rev1}, then @var{rev2} will be
-included in the output.
+The output does not include the specified revisions, except if
+one of them is an ancestor of another.
 
 @item Error conditions:
 
@@ -7141,13 +7154,13 @@ @section Automation
 @end table
 
 
address@hidden mtn automate ancestry_difference @var{new} address@hidden address@hidden [...]]]
address@hidden mtn automate ancestry_difference @var{new} address@hidden
 
 @table @strong
 @item Arguments:
 
 A ``new'' revision ID @var{new}, followed by zero or more ``old''
-revision IDs @var{old1}, @var{old2}, etc.
+revision IDs @var{old...}.
 
 @item Added in:
 
@@ -7155,17 +7168,19 @@ @section Automation
 
 @item Purpose:
 
-Prints all ancestors of the revision @var{new}, that are not also
-ancestors of one of the old revisions.  For purposes of this command,
-``ancestor'' is an inclusive term; for example, if @var{new} is an
-ancestor of @var{old1}, it will not be printed; but if @var{new} is not
+Prints all ancestors of the new revision, that are not also ancestors
+of one of the old revisions.  For purposes of this command,
+``ancestor'' is an inclusive term; each revision is an ancestor of
+itself. For example, if @var{new} is an ancestor of any of
address@hidden, @var{new} will not be printed; but if @var{new} is not
 an ancestor of any of the ``old'' revisions, then it will be.
-Similarly, @var{old1} will never be printed, because it is considered to
-be an ancestor of itself.  The reason for the names is that if @var{new}
-a new revision, and @var{old1}, @var{old2}, etc. are revisions that you
-have processed before, then this command tells you which revisions are
-new since then.
+Similarly, none of @var{old...} will be printed.
 
+The reason for the names @var{new} and @var{old} is that if @var{new}
+is a newer revision than @var{old...}, then this command tells you
+which all revisions that are newer than @var{old...}, and are also
+ancestors of @var{new}.
+
 @item Sample output:
 
 @verbatim
@@ -7200,7 +7215,7 @@ @section Automation
 @item Purpose:
 
 Prints all branch certs present in the revision graph, that are not
-excluded by the Lua hook @code{ignore_branch}.
+excluded by the Lua hook @address@hidden
 
 @item Sample output:
 
@@ -7235,8 +7250,7 @@ @section Automation
 
 @item Purpose:
 
address@hidden stdio} capable variant of @command{mtn cert}. To sign the
-cert with a specific private key, use @option{--key}.
address@hidden variant of @address@hidden cert}}.
 
 @item Sample usage:
 
@@ -7333,18 +7347,18 @@ @section Automation
 
 @item Error conditions:
 
-If a certificate is signed with an unknown public key, a
-warning message is printed to stderr. If the revision specified is unknown
-or invalid prints an error message to stderr and exits with status 1.
+If a certificate is signed with an unknown public key, a warning
+message is printed to stderr. If the revision specified is unknown or
+invalid prints an error message to stderr and exits with status 1.
 
 @end table
 
address@hidden mtn automate checkout [--[no-]move-conflicting-paths] address@hidden @var{directory}
address@hidden mtn automate checkout [--[no-]move-conflicting-paths] address@hidden address@hidden @var{directory}
 
 @table @strong
 @item Arguments:
 
-Same as @command{mtn checkout}; directory to create workspace in.
+Options and arguments are the same as @address@hidden checkout}}.
 
 @item Changes:
 
@@ -7383,7 +7397,7 @@ @section Automation
 @item Purpose:
 
 Prints the immediate children of a revision.  This is like a
-non-recursive version of @command{automate descendents}.
+non-recursive version of @address@hidden automate descendents}}.
 
 @item Sample output:
 
@@ -7407,12 +7421,12 @@ @section Automation
 @end table
 
 
address@hidden mtn automate common_ancestors @var{rev1} address@hidden [...]]
address@hidden mtn automate common_ancestors @var{rev...}
 
 @table @strong
 @item Arguments:
 
-One or more revision IDs, @var{rev1}, @var{rev2}, etc.
+One or more revision IDs.
 
 @item Added in:
 
@@ -7448,10 +7462,11 @@ @section Automation
 @end table
 
 
address@hidden mtn automate content_diff address@hidden address@hidden [--reverse] address@hidden ...]
address@hidden mtn automate content_diff address@hidden address@hidden [--reverse] address@hidden
 
 @table @strong
 @item Arguments:
+See the online help for more options.
 
 One or more @var{file} arguments restrict the diff output to these files,
 otherwise all changed files in the given revision(s) and/or current workspace
@@ -7483,11 +7498,12 @@ @section Automation
 
 @item Purpose:
 
-Prints the content changes between two revisions or a revision and the current
-workspace. This command differs from @command{mtn diff} in that way that it only
-outputs content changes and keeps quiet on renames or drops by default, as the
-header of @command{mtn diff} is omitted unless @option{--with-header} is given
-and is omitted regardless if there are no changes.
+Prints the content changes between two revisions or a revision and the
+current workspace. This command differs from @command{mtn diff} in
+that it only outputs content changes and keeps quiet on renames or
+drops by default, as the header of @command{mtn diff} is omitted
+unless @option{--with-header} is given and is omitted regardless if
+there are no changes.
 
 @item Sample output:
 
@@ -7517,12 +7533,12 @@ @section Automation
 
 @end table
 
address@hidden mtn automate descendents @var{rev1} address@hidden [...]]
address@hidden automate address@hidden mtn automate descendents @var{rev...}
 
 @table @strong
 @item Arguments:
 
-One or more revision IDs, @var{rev1}, @var{rev2}, etc.
+One or more revision IDs.
 
 @item Added in:
 
@@ -7546,9 +7562,8 @@ @section Automation
 followed by a newline.  The lines are printed in alphabetically sorted
 order.
 
-The output does not include @var{rev1}, @var{rev2}, etc., except that if
address@hidden is itself a descendant of @var{rev1}, then @var{rev2} will be
-included in the output.
+The output does not include @var{rev...}, unless one of them is a
+descendent of another.
 
 @item Error conditions:
 
@@ -7571,10 +7586,11 @@ @section Automation
 
 @item Purpose:
 
+Automate variant of @address@hidden attr drop}}.
+
 Removes an attribute from the current workspace revision for the specified path.
 If no attribute key is given, all attributes of this path are removed. Note that
-this change is not committed and therefor behaves exactly like
address@hidden attr drop @var{path} address@hidden
+this change is not committed.
 
 @item Output format:
 
@@ -7652,7 +7668,7 @@ @section Automation
 
 Keys in the keystore are not dropped because that is very dangerous on
 a server. The only way to drop private keys on a server is via the
-command @command{mtn dropkey}.
+command @address@hidden dropkey}}.
 
 @item Sample output:
 
@@ -7668,12 +7684,12 @@ @section Automation
 
 @end table
 
address@hidden mtn automate erase_ancestors address@hidden address@hidden [...]]]
address@hidden mtn automate erase_ancestors address@hidden
 
 @table @strong
 @item Arguments:
 
-One or more revision IDs, @var{rev1}, @var{rev2}, etc.
+One or more revision IDs.
 
 @item Added in:
 
@@ -7682,12 +7698,14 @@ @section Automation
 @item Purpose:
 
 Prints all arguments, except those that are an ancestor of some other
-argument.  One way to think about this is that it prints the minimal
-elements of the given set, under the ordering imposed by the ``child
-of'' relation.  Another way to think of it is if the arguments formed a
-branch, then we would print the heads of that branch.  If there
-are no arguments, prints nothing.
+argument.
 
+One way to think about this is that it prints the minimal elements of
+the given set, under the ordering imposed by the ``child of''
+relation.  Another way to think of it is if the arguments formed a
+branch, then we would print the heads of that branch.  If there are no
+arguments, prints nothing.
+
 @item Sample output:
 
 @verbatim
@@ -7697,10 +7715,9 @@ @section Automation
 
 @item Output format:
 
-Zero or more lines, each giving the ID of one descendant of the given
-revisions.  Each line consists of a revision ID, in hexadecimal,
-followed by a newline.  The lines are printed in alphabetically sorted
-order.
+Zero or more lines, each giving the ID of one of the given revisions.
+Each line consists of a revision ID, in hexadecimal, followed by a
+newline.  The lines are printed in alphabetically sorted order.
 
 @item Error conditions:
 
@@ -7747,9 +7764,9 @@ @section Automation
 
 @item Error conditions:
 
-If either file id is unknown or invalid, or if the internal line
-merger fails, prints an error message to stderr and exits with status
-1.
+If either revision id is unknown or invalid, or if either path does
+not exist, or if the internal line merger fails, prints an error
+message to stderr and exits with status 1.
 
 @end table
 
@@ -7807,7 +7824,7 @@ @section Automation
 
 The argument @var{path} determines which path's attributes should be printed.
 
address@hidden Added in:
address@hidden Changes:
 
 @itemize
 @item
@@ -7820,7 +7837,8 @@ @section Automation
 
 @item Purpose:
 
-Prints all attributes of the given file and the attribute states.
+Prints all attributes of the given file in the current workspace, and
+the attribute states.
 
 @item Sample output:
 
@@ -7879,7 +7897,7 @@ @section Automation
 
 @item Error conditions:
 
-If the path specified is unknown in the new workspace revision, prints an error
+If the path specified is unknown in the workspace, prints an error
 message to stderr and exits with status 1.
 
 @end table
@@ -7897,7 +7915,7 @@ @section Automation
 
 @item Purpose:
 
-Prints the revision id the current workspace is based on. This is the
+Prints the base revision id of the current workspace. This is the
 ``old_revision'' value stored in @file{_MTN/revision}.
 
 @item Sample output:
@@ -7912,18 +7930,18 @@ @section Automation
 
 @item Error conditions:
 
-If no workspace book keeping _MTN directory is found, prints an error
-message to stderr, and exits with status 1.
+If no workspace is found, prints an error message to stderr, and exits
+with status 1.
 
 @end table
 
 
address@hidden mtn automate get_content_changed @var{id} @var{file}
address@hidden mtn automate get_content_changed @var{rev} @var{file}
 
 @table @strong
 @item Arguments:
 
-The @var{id} specifies a revision ID, from which content change calculations will be based.
+The @var{rev} specifies a revision ID, from which content change calculations will be based.
 and @var{file} specifies the file for which to calculate revisions in which it was last changed.
 
 @item Added in:
@@ -7932,8 +7950,8 @@ @section Automation
 
 @item Purpose:
 
-Returns a list of revision IDs in which the content  was most recently changed,
-relative to the revision ID specified as @var{id}. This equates to a content mark
+Returns a list of revision IDs in which the content was most recently changed,
+relative to the revision ID specified as @var{rev}. This equates to a content mark
 following the *-merge algorithm.
 
 @item Sample output:
@@ -7961,15 +7979,9 @@ @section Automation
 resulting revisions not collapse into one revision.
 @end itemize
 
-The complete format:
address@hidden
-'content_mark'
-         the hexadecimal id of the revision the content mark is attached to
address@hidden verbatim
-
 @item Error conditions:
 
-If @var{id} or @var{file} is unknown or invalid prints an error
+If @var{rev} or @var{file} is unknown or invalid prints an error
 message to stderr and exits with status 1.
 
 @end table
@@ -7979,7 +7991,7 @@ @section Automation
 @table @strong
 @item Arguments:
 
-The @var{source_id} specifies a revision ID in which @var{file} is current extant.
+The @var{source_id} specifies a revision ID in which @var{file} is extant.
 and @var{file} specifies the file whose name in @var{target_id} is to be determined;
 @var{target_id} specifies a revision ID.
 
@@ -8002,14 +8014,11 @@ @section Automation
 
 @item Output format:
 
-Zero or one basic_io stanzas. Zero stanzas will be output if the file does not exist within the target revision; this is not considered an error. If the file does exist in the target revision, a single stanza with the  following details is output.
+Zero or one basic_io lines. Zero lines will be output if the file
+does not exist within the target revision; this is not considered an
+error. If the file does exist in the target revision, a single line
+is output.
 
-The complete format:
address@hidden
-   'file'
-         the file name corresponding to "file name" (arg 2) in the target revision
address@hidden verbatim
-
 @item Error conditions:
 
 If the revision IDs @var{source_id} or @var{target_id} are unknown or invalid prints an error
@@ -8019,7 +8028,7 @@ @section Automation
 
 @end table
 
address@hidden mtn automate get_current_revision [--exclude @var{excl}] address@hidden address@hidden ...]
address@hidden mtn automate get_current_revision [--exclude @var{excl}] address@hidden address@hidden
 
 @table @strong
 @item Arguments:
@@ -8027,7 +8036,7 @@ @section Automation
 One or more @var{path} arguments restrict the revision to these paths,
 otherwise all changes in workspace are taken into account.
 
-Options @var{excl} and @var{depth} work just like in @var{mtn commit}.
+See online help for more options.
 
 @item Added in:
 
@@ -8040,11 +8049,11 @@ @section Automation
 
 @item Sample output:
 
-See @var{automate get_revision}
+See @address@hidden automate get_revision}}
 
 @item Output format:
 
-See @var{automate get_revision}
+See @address@hidden automate get_revision}}
 
 @item Error conditions:
 
@@ -8082,10 +8091,9 @@ @section Automation
 
 @item Error conditions:
 
-If no workspace book keeping _MTN directory is found, prints an error
-message to stderr, and exits with status 1.
+If no workspace is found, prints an error message to stderr, and exits
+with status 1.
 
-
 @end table
 
 
@@ -8108,8 +8116,8 @@ @section Automation
 
 @item Purpose:
 
-Reads and outputs database variables. For more information about variables,
-see @ref{Vars}.
+Outputs database variable domains, names and values. For more
+information about variables, see @ref{Vars}.
 
 @item Sample output:
 
@@ -8136,7 +8144,7 @@ @section Automation
 
 @end table
 
address@hidden mtn automate get_extended_manifest_of @var{revid}
address@hidden automate address@hidden mtn automate get_extended_manifest_of @var{revid}
 
 @table @strong
 @item Arguments:
@@ -8180,10 +8188,6 @@ @section Automation
 There is one basic_io stanza for each file or directory in the
 extended manifest.
 
-All stanzas are formatted by basic_io. Stanzas are separated
-by a blank line. Values will be escaped, '\' to '\\' and
-'"' to '\"'.
-
 The 'dir' and 'file' lines are the first in every stanza and
 specify its type as follows:
 
@@ -8257,7 +8261,7 @@ @section Automation
 @table @strong
 @item Arguments:
 
-The  @var{id} argument specifies the file hash of the file to be output.
+The @var{id} argument specifies the file hash of the file to be output.
 
 @item Added in:
 
@@ -8293,10 +8297,10 @@ @section Automation
 @table @strong
 @item Arguments:
 
-The  @var{filename} argument specifies the filename of the file to be output.
+The @var{filename} argument specifies the filename of the file to be output.
 
 If a revision @var{id} is given, the file's contents in that specific revision
-are printed. If no revision is given, the workspace's revision is used.
+are printed. If no revision is given, the workspace base revision is used.
 
 @item Added in:
 
@@ -8333,7 +8337,7 @@ @section Automation
 @table @strong
 @item Arguments:
 
-The  @var{id} argument specifies the file hash of the file for which
+The @var{id} argument specifies the file hash of the file for which
 the size should be printed.
 
 @item Changes:
@@ -8345,7 +8349,7 @@ @section Automation
 Prints the recorded file size of the specified file.
 
 If you need to know the file sizes of multiple files of the same revision,
-its usually faster to use the @command{automate get_extended_manifest_of}
+its usually faster to use the @address@hidden automate get_extended_manifest_of}}
 command.
 
 @item Sample output:
@@ -8365,16 +8369,14 @@ @section Automation
 
 @end table
 
address@hidden mtn automate get_manifest_of
address@hidden mtn automate get_manifest_of @var{revid}
address@hidden mtn automate get_manifest_of address@hidden
 
 @table @strong
 @item Arguments:
 
 Specifying the optional @var{revid} argument outputs the manifest for the
 revision with the specified ID. Otherwise, outputs the manifest for the
-current workspace.  (You can think of leaving the argument blank
-as meaning ``give me the manifest of THIS''.)
+current workspace.
 
 @item Added in:
 
@@ -8399,73 +8401,6 @@ @section Automation
 
    file "ChangeLog"
 content [fc74a48c7f73eedcbe1ea709755fbe819b29736c]
-
-   file "LICENSE"
-content [dfac199a7539a404407098a2541b9482279f690d]
-
-   file "README"
-content [440eec971e7bb61ccbb61634deb2729bb25931cd]
-
-   file "TODO"
-content [e0ea26c666b37c5f98ccf80cb933d021ee55c593]
-
-   file "branch.psp"
-content [b28ece354969314ce996f3030569215d685973d6]
-
-   file "common.py"
-content [1fdb62e05fb2a9338d2c72ddc58de3ab2b3976fe]
-
-   file "config.py.example"
-content [64cb5898e3a026b4782c343ca4386585e0c3c275]
-
-   file "error.psp"
-content [7152c3ff110418aca5d23c374ea9fb92a0e98379]
-
-   file "fileinbranch.psp"
-content [5d8536100fdf51d505b6f20bc9c16aa78d4e86a8]
-
-   file "headofbranch.psp"
-content [981df124a0b5655a9f78c42504cfa8c6f02b267a]
-
-   file "help.psp"
-content [a43d0588a69e622b2afc681678c2a5c3b3b1f342]
-
-   file "html.py"
-content [18a8bffc8729d7bfd71d2e0cb35a1aed1854fa74]
-
-   file "index.psp"
-content [c621827db187839e1a7c6e51d5f1a7f6e0aa560c]
-
-   file "monotone.py"
-content [708b61436dce59f47bd07397ce96a1cfabe81970]
-
-   file "revision.psp"
-content [a02b1c161006840ea8685e461fd07f0e9bb145a3]
-
-   file "rss_feed.gif"
-content [027515fd4558abf317d54c437b83ec6bc76e3dd8]
-
-   file "tags.psp"
-content [638140d6823eee5844de37d985773be75707fa25]
-
-   file "tarofbranch.psp"
-content [be83f459a152ffd49d89d69555f870291bc85311]
-
-   file "test.py"
-content [e65aace9237833ec775253cfde97f59a0af5bc3d]
-   attr "mtn:execute" "true"
-
-   file "utility.py"
-content [fb51955563d64e628e0e67e4acca1a1abc4cd989]
-
-   file "viewmtn.css"
-content [8d04b3fc352a860b0e3240dcb539c1193705398f]
-
-   file "viewmtn.py"
-content [7cb5c6b1b1710bf2c0fa41e9631ae43b03424a35]
-
-   file "wrapper.py"
-content [530290467a99ca65f87b74f653bf462b28c6cda9]
 @end verbatim
 
 @item Output format:
@@ -8473,13 +8408,6 @@ @section Automation
 There is one basic_io stanza for each file or directory in the
 manifest.
 
-All stanzas are formatted by basic_io. Stanzas are separated
-by a blank line. Values will be escaped, '\' to '\\' and
-'"' to '\"'.
-
-Possible values of this first value are along with an ordered list of
-basic_io formatted stanzas that will be provided are:
-
 @verbatim
 'format_version'
       used in case this format ever needs to change.
@@ -8523,7 +8451,7 @@ @section Automation
 
 @item Purpose:
 
-Prints an option from _MTN/option of the current workspace.
+Prints an option from @file{_MTN/option} of the current workspace.
 
 @item Sample output:
 
@@ -8543,25 +8471,20 @@ @section Automation
 @end table
 
 
address@hidden mtn automate get_public_key @var{keyid}
address@hidden automate address@hidden mtn automate get_public_key @var{keyid}
 
 @table @strong
 @item Arguments:
 
 @var{keyid} identifies the key to display, by name or hash.
 
address@hidden Changes:
address@hidden Added in:
+13.0
 
address@hidden
address@hidden
-13.0 -- initial
-
address@hidden itemize
-
 @item Purpose:
 
-Same as @command{pubkey}; print the key in packet format, suitable for
-reading by @command{automate put_public_key}.
+Same as @address@hidden pubkey}}; print the key in packet format,
+suitable for reading by @address@hidden automate put_public_key}}.
 
 @item Sample output:
 
@@ -8581,7 +8504,7 @@ @section Automation
 
 @end table
 
address@hidden mtn automate get_revision @var{id}
address@hidden automate address@hidden mtn automate get_revision @var{id}
 
 @table @strong
 @item Arguments:
@@ -8626,13 +8549,6 @@ @section Automation
 a different basic_io stanza. The first string pair of each stanza indicates the
 type of change represented.
 
-All stanzas are formatted by basic_io. Stanzas are separated
-by a blank line. Values will be escaped, '\' to '\\' and
-'"' to '\"'.
-
-Possible values of this first value are along with an ordered list of
-basic_io formatted stanzas that will be provided are:
-
 @verbatim
 'format_version'
       used in case this format ever needs to change.
@@ -8701,7 +8617,7 @@ @section Automation
 
 @item Purpose:
 
-To show the path of the workspace root for the current directory.
+Print the path of the workspace root for the current directory.
 
 @item Sample output:
 
@@ -8748,7 +8664,7 @@ @section Automation
 Zero or more lines, each giving ancestry information for one revision.
 Each line begins with a revision ID.  Following this are zero or more
 space-prefixed revision IDs.  Each revision ID after the first is a
-parent (in the sense of @command{automate parents}) of the first.  For
+parent (in the sense of @address@hidden automate parents}}) of the first.  For
 instance, in the above sample output,
 0c05e8ec9c6af4224672c7cc4c9ef05ae8bdb794 is a root node,
 27ebcae50e1814e35274cb89b5031a423c29f95a has one parent, and
@@ -8765,12 +8681,12 @@ @section Automation
 @end table
 
 
address@hidden mtn automate heads address@hidden
address@hidden automate address@hidden mtn automate heads address@hidden
 
 @table @strong
 @item Arguments:
 
-One branch name,  @var{branch}. If none is given, the current default branch is used.
+One branch name. If none is given, the workspace branch is used.
 
 @item Added in:
 
@@ -8795,7 +8711,7 @@ @section Automation
 
 @item Error conditions:
 
-If the given branch contains no members or does not exist, then no lines are printed.
+If the given branch does not exist, an error message is printed.
 
 @end table
 
@@ -8827,8 +8743,8 @@ @section Automation
 
 @item Error conditions:
 
-If the file does not exists, is a special file or not readable, prints an
-error message to stderr and exists with status 1. A single file path only
+If the file does not exist, is a special file or not readable, prints an
+error message to stderr and exits with status 1. A single file path only
 consisting of "-" is disallowed since it collides with the UNIX stdin
 marker.
 
@@ -8848,7 +8764,7 @@ @section Automation
 @item Purpose:
 
 Prints version of the automation interface.  Major number increments
-whenever a backwards incompatible change is made to the @command{automate}
+whenever a backwards incompatible change is made to any automate
 command; minor number increments whenever any change is made (but is
 reset when major number increments).
 
@@ -8861,8 +8777,8 @@ @section Automation
 @item Output format:
 
 A decimal number, followed by ``.'' (full stop/period), followed by a
-decimal number, followed by a newline, followed by end-of-file.  The
-first decimal number is the major version, the second is the minor version.
+decimal number, followed by a newline.  The first decimal number is
+the major version, the second is the minor version.
 
 @item Error conditions:
 
@@ -8877,7 +8793,8 @@ @section Automation
 @item Arguments:
 
 One or more file paths (optional). If present, only show an inventory for the
-given files or directories (and their sub-directories).
+given files or directories (and their sub-directories); otherwise,
+show an inventory for the current workspace.
 
 @table @option
 @item address@hidden
@@ -8886,18 +8803,18 @@ @section Automation
 @item address@hidden
 File or directory to exclude.
 
address@hidden --[no-]corresponding-renames
+If restricted to a renamed path, do not output the corresponding old / new
+paths for this restriction.
+
 @item --[no-]ignored
 Don't output ignored files or directories.
 
address@hidden --[no-]unknown
-Don't output unknown directories.
-
 @item --[no-]unchanged
 Don't output files that are known but not changed in any way.
 
address@hidden --[no-]corresponding-renames
-If restricted to a renamed path, do not output the corresponding old / new
-paths for this restriction.
address@hidden --[no-]unknown
+Don't output unknown directories.
 
 @end table
 
@@ -8917,9 +8834,8 @@ @section Automation
 
 @item Purpose:
 
-Prints the inventory of every file found in the workspace or its
-associated base and revision manifests. Each unique path is
-listed in a basic_io stanza. Stanzas are separated by blank lines.
+Prints information on every file found in the workspace or its
+associated base and revision manifests.
 
 @item Sample output:
 
@@ -9294,9 +9210,7 @@ @section Automation
 
 Each path is printed in one basic_io stanza. Stanzas are separated by
 a blank line. Each stanza starts with a @code{path} line, and contains
-up to seven lines. The order of the lines is not important, and may
-change in future revisions, except that the first line will always be
address@hidden
+up to seven lines.
 
 @table @option
 @item path
@@ -9447,11 +9361,12 @@ @section Automation
 @item Output format:
 
 For each key, a basic_io stanza is printed. The public_location and
-private_location items may have multiple values as shown above for public_location,
-one value for each place that the key is stored. If the
-private key does not exist, then the private_hash and private_location
-items will be absent. given_name is the name provided when the key was created,
-and local_name is the name returned by the @code{get_local_key_name} hook.
+private_location items may have multiple values as shown above for
+public_location, one value for each place that the key is stored. If
+the private key does not exist, then the private_hash and
+private_location items will be absent. given_name is the name provided
+when the key was created, and local_name is the name returned by the
address@hidden@ref{get_local_key_name}} hook.
 
 The keys are ordered by hash value.
 
@@ -9474,13 +9389,16 @@ @section Automation
 
 @item Purpose:
 
-Prints the leaves of the revision graph, i.e. all revision that have no
-children.  This is similar, but not identical to the functionality of
address@hidden, which prints every revision in a branch, that has no
-descendants in that branch.  If every revision in the database was in
-the same branch, then they would be identical.  Generally, every leaf is
-the head of some branch, but not every branch head is a leaf.
+Prints the leaves of the revision graph, i.e. all revision that have
+no children.
 
+This is similar, but not identical to the functionality of
address@hidden@ref{mtn automate heads}}, which prints every revision in a
+branch, that has no descendants in that branch.  If every revision in
+the database was in the same branch, then they would be identical.
+Generally, every leaf is the head of some branch, but not every branch
+head is a leaf.
+
 @item Sample output:
 
 @verbatim
@@ -9501,13 +9419,14 @@ @section Automation
 @end table
 
 
address@hidden mtn automate log
address@hidden mtn automate log address@hidden address@hidden
 
 @table @strong
 @item Arguments:
 
address@hidden address@hidden address@hidden [...]]
-[--clear-from] address@hidden [...]] [--clear-to]
address@hidden address@hidden
address@hidden address@hidden address@hidden
+[--clear-from] address@hidden [--clear-to]
 [--[no-]merges] address@hidden
 
 Same as @command{mtn log}, but without the output control options; see
@@ -9551,9 +9470,9 @@ @section Automation
 arguments need to be wrapped in another pair of quotes, i.e. @code{"foo"} or
 @code{'foo'} will not work, but @code{"'foo'"} or @code{'"foo"'} will.
 
-Complex types are also supported, anything which can be evaluated as valid
-Lua _expression_ can be given as input, including nested tables and functions,
-like f.e. @address@hidden,true,@{['func'] = function(...) return ... end @address@hidden
+A function arguments can be any valid Lua _expression_, including nested
+tables and functions, like f.e. @address@hidden,true,@{['func'] =
+function(...) return ... end @address@hidden
 
 @item Added in:
 
@@ -9615,12 +9534,12 @@ @section Automation
 
 @end table
 
address@hidden mtn automate packet_for_fdata @var{id}
address@hidden automate address@hidden mtn automate packet_for_fdata @var{id}
 
 @table @strong
 @item Arguments:
 
-The @var{id} specifies the file to output an fdata packet for.
+The @var{id} specifies the file for which to output an fdata packet.
 
 @item Added in:
 
@@ -9643,7 +9562,7 @@ @section Automation
 
 @item Output format:
 
-File data in @command{monotone read} compatible packet format.
+File data in @address@hidden read}} compatible packet format.
 
 @item Error conditions:
 
@@ -9652,12 +9571,12 @@ @section Automation
 
 @end table
 
address@hidden mtn automate packet_for_fdelta @var{from-id} @var{to-id}
address@hidden automate address@hidden mtn automate packet_for_fdelta @var{from-id} @var{to-id}
 
 @table @strong
 @item Arguments:
 
-The @var{from-id} specifies the file to use as the base of the delta,
address@hidden specifies the file to use as the base of the delta,
 and @var{to-id} specifies the file to use as the target of the delta.
 
 @item Added in:
@@ -9666,7 +9585,7 @@ @section Automation
 
 @item Purpose:
 
-Prints the file delta in packet format
+Prints the file delta in packet format.
 
 @item Sample output:
 
@@ -9682,7 +9601,7 @@ @section Automation
 
 @item Output format:
 
-File delta data in @command{monotone read} compatible packet format.
+File delta data in @address@hidden read}} compatible packet format.
 
 @item Error conditions:
 
@@ -9721,7 +9640,7 @@ @section Automation
 
 @item Output format:
 
-Revision data in @command{monotone read} compatible packet format.
+Revision data in @address@hidden read}} compatible packet format.
 
 @item Error conditions:
 
@@ -9735,7 +9654,7 @@ @section Automation
 @table @strong
 @item Arguments:
 
-The @var{id} specifies the revision to output cert packets for.
+The @var{id} specifies the revision for which to output cert packets.
 
 @item Added in:
 
@@ -9786,7 +9705,7 @@ @section Automation
 
 @item Output format:
 
-Cert data in @command{monotone read} compatible packet format.
+Cert data in @address@hidden read}} compatible packet format.
 
 @item Error conditions:
 
@@ -9795,12 +9714,12 @@ @section Automation
 
 @end table
 
address@hidden mtn automate parents @var{rev}
address@hidden automate address@hidden mtn automate parents @var{rev}
 
 @table @strong
 @item Arguments:
 
-One revision ID, @var{rev}.
+One revision ID.
 
 @item Added in:
 
@@ -9809,7 +9728,7 @@ @section Automation
 @item Purpose:
 
 Prints the immediate parents of a revision.  This is like a
-non-recursive version of @command{automate ancestors}.
+non-recursive version of @address@hidden automate ancestors}}.
 
 @item Sample output:
 
@@ -9862,12 +9781,8 @@ @section Automation
 Pushes, pulls or syncs (push & pull) revisions, certificates and keys of
 the given database to, from or with the given netsync server.
 
address@hidden Sample output (stdio, non-dry-run):
-Output consists of sent and received revisions, certs, and keys in the
-main stdio channel, progress messages, and ticker data for bytes,
-revisions, certs and keys.
-
-The following is example main channel data:
address@hidden Sample output:
+The following is example main channel data, non-dry-run:
 @verbatim
 receive_cert "test"
        value "value"
@@ -9974,6 +9889,10 @@ @section Automation
 
 @item Output format:
 
+Output consists of sent and received revisions, certs, and keys in the
+main stdio channel, progress messages, and ticker data for bytes,
+revisions, certs and keys.
+
 For non-dry-run, all stanzas are optional; they are only output if the
 data they describe is transferred.
 
@@ -9997,7 +9916,7 @@ @section Automation
 progress and ticker output.
 
 If these commands are run over stdio, the stdio ticker format is used
-(for a description of this format, check @command{automate stdio}).
+(for a description of this format, see @address@hidden automate stdio}}).
 
 The following ticker types are printed out during the refinement phase:
 
@@ -10044,15 +9963,17 @@ @section Automation
 based. This is used for delta encoding. @var{contents} are the contents of
 the new file.
 
+If @var{base-id} is not given, the file is a new file, and no delta is
+stored.
+
 @item Added in:
 
 4.1
 
 @item Purpose:
 
-Preparation of a workspace-less commit.
-See also @command{automate put_revision}. Normally used via
address@hidden stdio}.
+Preparation of a workspace-less commit.  See @address@hidden automate
+put_revision}}.
 
 @item Sample output:
 
@@ -10071,13 +9992,13 @@ @section Automation
 
 @end table
 
address@hidden mtn automate put_public_key @var{key-packet-data}
address@hidden automate address@hidden mtn automate put_public_key @var{key-packet-data}
 
 @table @strong
 @item Arguments:
 
-A data packet, @var{key-packet-data}, as produced by @command{mtn
-automate get_public_key @var{keyid}}.
+A data packet, @var{key-packet-data}, as produced by @address@hidden automate
+get_public_key}}.
 
 @item Changes:
 
@@ -10087,7 +10008,7 @@ @section Automation
 
 Store public keys into the database.
 
-Note that this duplicates part of @command{automate read_packets}; the
+Note that this duplicates part of @address@hidden automate read_packets}}; the
 intent is to deprecate @command{automate read_packets}, and only keep
 facilities for key packets.
 
@@ -10101,20 +10022,12 @@ @section Automation
 
 @end table
 
address@hidden mtn automate put_revision @var{revision-data}
address@hidden automate address@hidden mtn automate put_revision @var{revision-data}
 
 @table @strong
 @item Arguments:
 
address@hidden is the new revision. See example below.  Note that
-the new_manifest entry is ignored -- @command{put_revision} will
-ignore whatever you put here and calculate the correct manifest id
-itself.  (However, for now, you must put 40 hex digits here -- it's
-just that which particular digits you put are entirely irrelevant.
-All zeros is a good choice.)  Monotone will also canonicalize your
-whitespace automatically.  You do not need to worry about getting just
-the right amount of indentation in front of each line.  However,
-everything else about your revision must be valid.
address@hidden is the new revision.
 
 @item Added in:
 
@@ -10122,8 +10035,17 @@ @section Automation
 
 @item Purpose:
 
-Workspace-less commit. Normally used via @command{automate stdio}.
+Workspace-less commit.
 
+Note that the new_manifest entry is ignored -- @command{put_revision}
+will ignore whatever you put here and calculate the correct manifest
+id itself.  (However, for now, you must put 40 hex digits here -- it's
+just that which particular digits you put are entirely irrelevant.
+All zeros is a good choice.)  Monotone will also canonicalize your
+whitespace automatically.  You do not need to worry about getting just
+the right amount of indentation in front of each line.  However,
+everything else about your revision must be valid.
+
 @item Sample argument:
 
 @smallexample
@@ -10160,12 +10082,12 @@ @section Automation
 
 @end table
 
address@hidden mtn automate read_packets @var{packet-data}
address@hidden automate address@hidden mtn automate read_packets @var{packet-data}
 
 @table @strong
 @item Arguments:
 
-A data packet, @var{packet-data}, as produced by @command{mtn pubkey @var{keyid}}.
+A data packet, @var{packet-data}, as produced by @address@hidden pubkey}}.
 
 @item Added in:
 
@@ -10186,15 +10108,16 @@ @section Automation
 
 @end table
 
address@hidden mtn automate remote @option{--remote-stdio-host=host} @var{command} @var{args-and-opts}
address@hidden mtn automate remote address@hidden [--[no-]set-default] @var{command} @var{args-and-opts}
 
 @table @strong
 @item Arguments
 
 A command and its arguments, to execute on the remote server specified
-by the @option{--remote-stdio-host} option. If no host is given, the default
-server is used. If options are to be passed to the command, they must be
-preceded by @option{--} to prevent them from being interpreted as local options.
+by the @option{--remote-stdio-host} option (defaults to server stored
+in the database). If options are to be passed to the command, they must be
+preceded by @option{--} to prevent them from being interpreted as
+local options.
 
 Remote options @strong{must} be given as a single token, ie
 @option{--branch=foo} or @option{-bfoo}. This is because the local and remote
@@ -10224,7 +10147,7 @@ @section Automation
 with @code{mtn: remote error:}, @code{mtn: remote warning:} or
 @code{mtn: remote message:} to make them distinguishable from local
 diagnostics. Tickers are not supported over this interface. If you need
-remote ticker support, please use @command{automate remote_stdio}.
+remote ticker support, see @address@hidden automate remote_stdio}}.
 
 @item Error Conditions
 
@@ -10247,7 +10170,7 @@ @section Automation
 
 @end table
 
address@hidden mtn automate remote_stdio address@hidden
address@hidden automate address@hidden mtn automate remote_stdio address@hidden
 
 @table @strong
 @item Arguments
@@ -10738,7 +10661,7 @@ @section Automation
 
 @end table
 
address@hidden@item mtn automate stdio
address@hidden automate address@hidden mtn automate stdio
 
 @table @strong
 @item Arguments:
@@ -10990,8 +10913,8 @@ @section Automation
 tags of the revision graph.
 
 If a branch name is ignored by means of the Lua hook
address@hidden, it is neither printed, nor can it be matched by
-a pattern.
address@hidden@ref{ignore_branch}}, it is neither printed, nor can it be matched by a
+pattern.
 
 @item Sample output:
 
@@ -11021,9 +10944,6 @@ @section Automation
 
 There is one basic_io stanza for each tag.
 
-All stanzas are formatted by basic_io. Stanzas are separated by a
-blank line. Values will be escaped, '\' to '\\' and '"' to '\"'.
-
 Each stanza has exactly the following four entries:
 
 @table @option
@@ -11276,14 +11196,18 @@ @chapter Formats
 @node    Formats, Lua Reference, Command Reference, Top
 @chapter Formats
 
-Monotone uses two well defined formats to output or to accept input of
-data (mostly structured), @code{basic_io} and @code{stdio}.
+Monotone uses three formats to output or to accept input of
+data (mostly structured), @code{basic_io}, @code{stdio}, and @code{packet}.
 @code{basic_io} is often used to represent data or for configuration,
 while @code{stdio} is used for communication with @code{automate stdio}.
 
 The @code{stdio} format is not described here.  For information on it,
-please @pxref{mtn-au-stdio,,@code{mtn automate stdio}}.
+see @ref{mtn automate stdio}.
 
+The @code{packet} format is not described here; see @ref{Packet I/O}.
+For examples, see @address@hidden automate packet_for_fdelta}}, @address@hidden
+automate packet_for_fdata}}.
+
 @section @code{basic_io} Format
 
 @code{basic_io} is a very simple format, yet expressive, and can be
@@ -11718,7 +11642,7 @@ @subsection User Defaults
 this hook is not defined or returns false, monotone will prompt you for
 a passphrase each time it needs to use a private key.
 
address@hidden get_local_key_name (@var{key_identity})
address@hidden@item get_local_key_name (@var{key_identity})
 
 Return the local alias for the given key. The @var{id} and @var{given_name}
 fields of @var{key_identity} will be populated, and the @var{name} field
@@ -11846,7 +11770,7 @@ @subsection User Defaults
 and ignore all files matching one of these expressions. For the
 default definition of this hook, see @ref{Default hooks}.
 
address@hidden ignore_branch (@var{branchname})
address@hidden@item ignore_branch (@var{branchname})
 
 Returns @code{true} if @var{branchname} should be ignored while listing
 branches. Otherwise returns @code{false}. This hook has no default

reply via email to

[Prev in Thread] Current Thread [Next in Thread]