# # # patch "monotone.texi" # from [4b08a6efa1905ac80420a2167bc874c5b9ed8ca1] # to [fa1738710d397b1262e70e512619f71f90157abf] # # patch "netsync.cc" # from [340e432145bad814c7757dfa04769449745b791f] # to [2302612f5e4d92846a2ec32a842efb077f09384d] # ============================================================ --- monotone.texi 4b08a6efa1905ac80420a2167bc874c5b9ed8ca1 +++ monotone.texi fa1738710d397b1262e70e512619f71f90157abf @@ -7525,6 +7525,103 @@ @section Automation @end table + address@hidden mtn automate pull [--set-default] address@hidden address@hidden [...] address@hidden [--do-not-enforce-ssh-agent] address@hidden mtn automate push [--set-default] address@hidden address@hidden [...] address@hidden [--do-not-enforce-ssh-agent] address@hidden address@hidden mtn automate sync [--set-default] address@hidden address@hidden [...] address@hidden [--do-not-enforce-ssh-agent] address@hidden + address@hidden @strong address@hidden Arguments: + +The automate versions of pull, push and sync have a superset of arguments and +options compared to the non-automate versions. For an explanation of these +common parts please check this manual in the appropriate section. + +Furthermore, you can define @option{--do-not-enforce-ssh-agent} which make +these commands not using a running ssh agent instance explicitely. The setting +of this option is highly discouraged if you run the command from inside stdio, +because it might break your output in case a password is needed to decrypt a +user key and no get_passphrase() lua hook has been set up. + address@hidden Added in: + +8.0 + address@hidden Purpose: + +Pushes, pulls or syncs (push & pull) revisions, certificates and keys from +the given database to / from / with to another (foreign) one. A running +ssh-agent instance is required and the key which is used for signing / +authentication has to be loaded into ssh-agent beforehand. + address@hidden Sample output (stdio): + +The following output shows an example of a pull which transferred two revisions +and eight certs. + address@hidden:} The linebreaks are not part of the actual format. + address@hidden +0:0:p:62:doing anonymous pull; use -kKEYNAME if you need authentication +0:0:p:25:connecting to monotone.ca0:0:p:29:finding items to synchronize: +0:0:t:34:c:certificates;k:keys;r:revisions; +0:0:t:12:c=0;k=0;r=0; +0:0:t:13:c#0;k#0;r#64; +0:0:t:14:c#0;k#0;r#128; +[...] +0:0:t:6:c;k;r; +0:0:t:44:>:bytes in;<:bytes out;c:certs in;r:revs in; +0:0:t:16:>=0;<=0;c=0;r=0; +0:0:t:21:>#420;<#1344;c#0;r#0; +0:0:t:22:>#1165;<#1741;c#0;r#0; +[...] +0:0:t:24:>#20839;<#14882;c#0;r#1; +0:0:t:24:>#20839;<#14882;c#3;r#1; +0:0:t:24:>#20839;<#14882;c#4;r#2; +0:0:t:24:>#20839;<#14882;c#6;r#2; +0:0:t:24:>#20863;<#14930;c#8;r#2; +0:0:t:8:<;>;c;r; +0:0:p:36:successful exchange with monotone.ca +0:0:l:0: address@hidden verbatim + address@hidden Output format: + +Netsync commands output info and ticker messages just like the normal netsync +commands do. + +If these commands are run over stdio, the stdio ticker format is used +(for a description of this format, check @command{automate stdio}). + +The following ticker types are printed out during the refinement phase: + address@hidden address@hidden 'c': The amount of certs found for an upcoming synchronization address@hidden 'k': The amount of keys found for an upcoming synchronization address@hidden 'r': The amount of revisions found for an upcoming synchronization address@hidden itemize + +After refinement the actual synchronization between the two nodes start. The +ticker stanzas in this phase are the following: + address@hidden address@hidden '>': number of incoming bytes address@hidden '<': number of outgoing bytes address@hidden 'c': number of incoming certs (only pull and sync) address@hidden 'C': number of outgoing certs (only push and sync) address@hidden 'r': number of incoming revisions (only pull and sync) address@hidden 'R': number of outgoing revisions (only push and sync) address@hidden itemize + address@hidden Error conditions: + +If no ssh-agent instance is running, the signing key hasn't been loaded into +a running ssh-agent instance or a netsync error occurs, the command outputs +an error and exits with status 1. + address@hidden table + + @item mtn automate get_current_revision [--exclude @var{excl}] address@hidden address@hidden ...] @table @strong ============================================================ --- netsync.cc 340e432145bad814c7757dfa04769449745b791f +++ netsync.cc 2302612f5e4d92846a2ec32a842efb077f09384d @@ -2498,6 +2498,9 @@ call_server(options & opts, // Commit whatever work we managed to accomplish anyways. guard.commit(); + // ensure that the tickers have finished and write any last ticks + ui.ensure_clean_line(); + // We had an I/O error. We must decide if this represents a // user-reported error or a clean disconnect. See protocol // state diagram in session::process_bye_cmd.