# # # patch "mtn_cvs/mtn_automate.cc" # from [f12b7c143543981b35ba358ba78b2a80fe599d12] # to [39a07d1779164452848a3a93d9ef336868f43e33] # # patch "mtn_cvs/mtn_cvs.cc" # from [f6a9b339dc45e56858ca1d6c163253222256a0a0] # to [f5a859f2ccc1a5ecabebba444b7645da3991e0e9] # # patch "mtn_cvs/tests/test_hooks.lua" # from [268c94edd77cf0af6d976b87870787f11d4d7716] # to [d8e009b5e2c7d00afe4b301d60b8242936d6b794] # ============================================================ --- mtn_cvs/mtn_automate.cc f12b7c143543981b35ba358ba78b2a80fe599d12 +++ mtn_cvs/mtn_automate.cc 39a07d1779164452848a3a93d9ef336868f43e33 @@ -20,7 +20,8 @@ void mtn_automate::check_interface_revis void mtn_automate::check_interface_revision(std::string const& minimum) { std::string present=automate("interface_version"); - E(present>=minimum, origin::user, + // 11.0 is not greater than 4.1 when only comparing strings ;-) + E(atoi(present.c_str())>atoi(minimum.c_str()) || present>=minimum, origin::user, F("your monotone automate interface revision %s does not match the " "requirements %s") % present % minimum); } ============================================================ --- mtn_cvs/mtn_cvs.cc f6a9b339dc45e56858ca1d6c163253222256a0a0 +++ mtn_cvs/mtn_cvs.cc f5a859f2ccc1a5ecabebba444b7645da3991e0e9 @@ -63,11 +63,11 @@ // Wrapper class which ensures proper setup and teardown of the global ui // object. (We do not want to use global con/destructors for this, as they // execute outside the protection of main.cc's signal handlers.) -struct ui_library +/*struct ui_library { ui_library() { ui.initialize(); } ~ui_library() { ui.deinitialize(); } -}; +};*/ // fake app_state ctor/dtor, we do not use this class at all app_state::app_state() : lua(this), mtn_automate_allowed(false) {} @@ -251,7 +251,7 @@ commands::command_id read_options(optio return cmd; } -string +/*string get_usage_str(options::options_type const & optset, options & opts) { vector names; @@ -260,7 +260,7 @@ get_usage_str(options::options_type cons optset.instantiate(&opts).get_usage_strings(names, descriptions, maxnamelen); return format_usage_strings(names, descriptions, maxnamelen); -} +}*/ void mtn_terminate_handler() @@ -415,6 +415,9 @@ cpp_main(int argc, char ** argv) } catch (usage & u) { + ui.inform_usage(u, app.opts); + return app.opts.help ? 0 : 2; +#if 0 // we send --help output to stdout, so that "mtn --help | less" works // but we send error-triggered usage information to stderr, so that if // you screw up in a script, you don't just get usage information sent @@ -443,7 +446,7 @@ cpp_main(int argc, char ** argv) return 0; else return 2; - +#endif } } catch (option::option_error const & e) ============================================================ --- mtn_cvs/tests/test_hooks.lua 268c94edd77cf0af6d976b87870787f11d4d7716 +++ mtn_cvs/tests/test_hooks.lua d8e009b5e2c7d00afe4b301d60b8242936d6b794 @@ -1,10 +1,18 @@ +-- Copyright (C) 2006 Timothy Brownawell +-- +-- This program is made available under the GNU GPL version 2.0 or +-- greater. See the accompanying file COPYING for details. +-- +-- This program is distributed WITHOUT ANY WARRANTY; without even the +-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +-- PURPOSE. -- this is the "testing" set of lua hooks for monotone -- it's intended to support self-tests, not for use in -- production. just defines some of the std hooks. function get_passphrase(keyid) - return keyid + return keyid.given_name end -- Everything alice signs is trusted, nothing mallory signs is @@ -13,8 +21,8 @@ function get_revision_cert_trust(signers -- For use of t_trusted.at. function get_revision_cert_trust(signers, id, name, val) for k, v in pairs(signers) do - if v == "address@hidden" then return true end - if v == "address@hidden" then return false end + if v.given_name == "address@hidden" then return true end + if v.given_name == "address@hidden" then return false end end if (id == "0000000000000000000000000000000000000000" and name == "bad-cert" and val == "bad-val") @@ -49,6 +57,10 @@ end return "address@hidden" end +function get_date_format_spec() + return "" +end + function ignore_file(name) if (string.find(name, "ts-std", 1, true)) then return true end if (string.find(name, "testsuite.log")) then return true end @@ -94,4 +106,4 @@ do return argv; end -end \ No newline at end of file +end