# # # patch "NEWS" # from [bc9fc1bb0347b18206a18cea05637c8755fa5e47] # to [fe3f23ee1811773fac7b5f0586bae10c29792913] # # patch "cmd_automate.cc" # from [cfd1a9f1dd06fe21e282009a5a53edf39a353355] # to [12c3763af3ff4acaca3cd0806fdd3cf783926f0b] # # patch "monotone.texi" # from [4c337ddd6ff44615b2c46c6eae7364bc967d7b16] # to [8fa89059f27e62dedfb3a05328f1fc80b65dd461] # # patch "tests/common/automate_stdio.lua" # from [93137f013518e42b6f856a103aee16241ac4f4d4] # to [0aef0317b86901a75009e03d5e6ef6b59a5be570] # ============================================================ --- NEWS bc9fc1bb0347b18206a18cea05637c8755fa5e47 +++ NEWS fe3f23ee1811773fac7b5f0586bae10c29792913 @@ -12,19 +12,21 @@ localized. - "automate stdio" (and "automate remote_stdio", see below) use - separate streams to encode out-of-band information like - informational messages, warnings or tickers. - A special "header" section has been added to the standard - output to be able to tell stdio version changes between + separate streams to encode out-of-band information like + informational messages, warnings or tickers. + A special "header" section has been added to the standard + output to be able to tell stdio version changes between future versions easier apart. The error codes used in the output of both, stdio and - remote_stdio, has also slightly changed: errors which are + remote_stdio, has also slightly changed: errors which are the result of a wrong call (unknown command, invalid options, parsing errors, ...) are returned with code 1, while errors - which happened while the actual command executed are returned - with code 2. + which happened while the actual command executed are returned + with code 2. Error codes are no longer echoed with every + packet, but only as the payload of the final 'l' ("last") + packet. - Please consult the manual of "mtn automate stdio" for a + Please consult the manual of "mtn automate stdio" for a detailed description of the new format. New features @@ -60,7 +62,7 @@ Other - - Added the script of the Lua-based contributed Monotone + - Added the script of the Lua-based contributed Monotone extension command "mtn remote_export" to contrib/command/ with which a remote revision can be exported locally without having to fetch all of the history before. ============================================================ --- cmd_automate.cc cfd1a9f1dd06fe21e282009a5a53edf39a353355 +++ cmd_automate.cc 12c3763af3ff4acaca3cd0806fdd3cf783926f0b @@ -84,6 +84,10 @@ static string const interface_version = // point (2) in notes/release-checklist.txt static string const interface_version = "11.0"; +// This number determines the format version of the stdio packet format. +// The original format which came without a version notification was "1". +static string const stdio_format_version = "2"; + // Name: interface_version // Arguments: none // Added in: 0.0 @@ -108,7 +112,7 @@ void commands::get_stdio_headers(std::ve // these headers are outputted before any other output for stdio and remote_stdio void commands::get_stdio_headers(std::vector > & headers) { - headers.push_back(make_pair("interface-version", interface_version)); + headers.push_back(make_pair("format-version", stdio_format_version)); } // Name: bandtest ============================================================ --- monotone.texi 4c337ddd6ff44615b2c46c6eae7364bc967d7b16 +++ monotone.texi 8fa89059f27e62dedfb3a05328f1fc80b65dd461 @@ -7722,7 +7722,7 @@ @section Automation @item Sample output: @verbatim -interface-version: 12.0 +format-version: 2 0:m:41:7706a422ccad41621c958affa999b1a1dd644e79 0:l:1:0 @@ -7749,9 +7749,10 @@ @section Automation @item Output format: Right after a stdio session has been set up, header information are issued; -to date the only header which is issued there is the @code{interface-version} -header though, which denotes the interface version of the running monotone -instance. +to date the only header which is issued there is the @code{format-version} +header though, which denotes the version of the stdio format used throughout +the session. The original format had no such version output, so our numbering +starts with a "2" here. Headers are separated from each other by single newline characters @code{'\n'} and from the following output by another newline character. ============================================================ --- tests/common/automate_stdio.lua 93137f013518e42b6f856a103aee16241ac4f4d4 +++ tests/common/automate_stdio.lua 0aef0317b86901a75009e03d5e6ef6b59a5be570 @@ -13,7 +13,7 @@ function parse_stdio(data, err, which, b local begin,End,headers = string.find(data, "(.-)\n\n"); -- FIXME: expand this to a proper header parser if -- more headers are added in the future - check(string.find(headers, "^interface%-version: %d-%.%d$") ~= nil) + check(string.find(headers, "^format%-version: %d$") ~= nil) data = string.sub(data, End + 1) while true do