# # # patch "NEWS" # from [d7ec6b9137341f1878610f5e04ae7dd9d11cb5cb] # to [95f440d1e55ad4d39b4505729cac57caf55189f5] # # patch "cmd.cc" # from [fefcaae628a94df6d13f1902afa42080e71d6fa2] # to [cd917e32e1047fb44b15595b16506452592d8865] # # patch "cmd_db.cc" # from [cd23dd2c4702ca312738ca0eef692999703a2032] # to [c47b57fe5d3f3be66f53aeefe527c426952ff302] # # patch "lua-testsuite.lua" # from [705f0c0c86fc161772125c901d48e0b726c34670] # to [c7951221ff8f15f85d61dab103a787aa6ca89151] # # patch "options_list.hh" # from [bc5035231673273e0d32a78a14717f03e26735ea] # to [d0042146893fa36549f7c9ecf20924b529f56d08] # # patch "tests/default_command_options/__driver__.lua" # from [4933c67f0a215ef42eeba6a27b26eebd5a9276fa] # to [87b816417d7ca7642721e5327d9f3731af681896] # # patch "tests/default_command_options/default_options.lua" # from [3da2ea18eb81bf63c5fd58baaf0bfc0db2960663] # to [c57ff6f5009c75c1ac3d9b398891ee76f2326d1a] # # patch "tests/reallyquiet_turns_off_tickers_and_warnings/__driver__.lua" # from [cb891df2dd67048b2d8af853e11cdab8cdf50e3f] # to [7a393866800b009214ef6722f92edb01d022e9d2] # # patch "tests/test_the_version_command/__driver__.lua" # from [bf200ff06525a9d3b36637bce59e2c7f98382145] # to [6095698f688c9e07c2dfd67bd479300e730735ec] # ============================================================ --- NEWS d7ec6b9137341f1878610f5e04ae7dd9d11cb5cb +++ NEWS 95f440d1e55ad4d39b4505729cac57caf55189f5 @@ -89,7 +89,6 @@ Xxx Xxx 99 99:99:99 UTC 2010 change it to --unknown on the command line. - New global options: - -v increase verbosity level by one --no-ignore-suspend-certs undo previous --ignore-suspend-certs --use-default-key undo previous --key --allow-default-confdir undo previous --no-default-confdir @@ -100,7 +99,6 @@ Xxx Xxx 99 99:99:99 UTC 2010 --no-builtin-rcfile replaces --nostd --builtin-rcfile undo previous --no-builtin-rcfile --clear-rcfiles undo previous --rcfile - --verbose set verosity level to 1 --verbosity set verbosity level - Global options now hidden: @@ -166,9 +164,9 @@ Xxx Xxx 99 99:99:99 UTC 2010 (all netsync/remote commands) --min-netsync-version --max-netsync-version - Deprecated options: - --full use --verbose - --norc use --no-standard-rcfiles - --nostd use --no-builtin-rcfile + --norc use --no-standard-rcfiles + --nostd use --no-builtin-rcfile + --reallyquiet use --verbosity=-2 - The 'disapprove' command now accepts a revision range in addition to a single revision. ============================================================ --- cmd.cc fefcaae628a94df6d13f1902afa42080e71d6fa2 +++ cmd.cc cd917e32e1047fb44b15595b16506452592d8865 @@ -516,7 +516,7 @@ CMD_NO_WORKSPACE(version, "version", "", E(args.empty(), origin::user, F("no arguments allowed")); - if (global_sanity.get_verbosity() > 0) + if (app.opts.full) print_full_version(); else print_version(); ============================================================ --- cmd_db.cc cd23dd2c4702ca312738ca0eef692999703a2032 +++ cmd_db.cc c47b57fe5d3f3be66f53aeefe527c426952ff302 @@ -62,7 +62,7 @@ CMD(db_info, "info", "", CMD_REF(db), "" F("no arguments needed")); database db(app); - db.info(cout, global_sanity.get_verbosity() > 0); + db.info(cout, app.opts.full); } CMD(db_version, "version", "", CMD_REF(db), "", @@ -552,8 +552,6 @@ CMD(complete, "complete", "", CMD_REF(in database db(app); project_t project(db); - bool verbose = global_sanity.get_verbosity() > 0; - E(idx(args, 1)().find_first_not_of("abcdef0123456789") == string::npos, origin::user, F("non-hex digits in partial id")); @@ -565,7 +563,7 @@ CMD(complete, "complete", "", CMD_REF(in for (set::const_iterator i = completions.begin(); i != completions.end(); ++i) { - if (!verbose) cout << *i << '\n'; + if (!app.opts.full) cout << *i << '\n'; else cout << describe_revision(app.opts, app.lua, project, *i) << '\n'; } } @@ -586,7 +584,7 @@ CMD(complete, "complete", "", CMD_REF(in i != completions.end(); ++i) { cout << i->first; - if (verbose) cout << ' ' << i->second(); + if (app.opts.full) cout << ' ' << i->second(); cout << '\n'; } } ============================================================ --- lua-testsuite.lua 705f0c0c86fc161772125c901d48e0b726c34670 +++ lua-testsuite.lua c7951221ff8f15f85d61dab103a787aa6ca89151 @@ -409,14 +409,14 @@ function prepare_to_run_tests (P) writefile_q("in", nil) prepare_redirect("in", "out", "err") - local status = execute(monotone_path, "version", "--verbose") + local status = execute(monotone_path, "version", "--full") local out = readfile_q("out") local err = readfile_q("err") if status == 0 and err == "" and out ~= "" then logfile:write(out) else - P(string.format("mtn version --verbose: exit %d\nstdout:\n", status)) + P(string.format("mtn version --full: exit %d\nstdout:\n", status)) P(out) P("stderr:\n") P(err) ============================================================ --- options_list.hh bc5035231673273e0d32a78a14717f03e26735ea +++ options_list.hh d0042146893fa36549f7c9ecf20924b529f56d08 @@ -314,9 +314,6 @@ GROUPED_SIMPLE_OPTION(globals, roster_ca system_path, gettext_noop("log roster cache statistic to the given file")) -GROUPED_SIMPLE_OPTION(globals, debug, "debug", bool, - gettext_noop("print debug log to stderr while running")) - SIMPLE_OPTION(depth, "depth", restricted_long<0>, gettext_noop("limit the number of levels of directories to descend")) @@ -351,7 +348,7 @@ OPTION(diff_options, diff_unified, false } #endif OPTION(diff_options, diff_unified, false, "unified", - gettext_noop("use unified diff format")) + gettext_noop("use unified diff format")) #ifdef option_bodies { diff_format = unified_diff; @@ -497,33 +494,12 @@ OPTION(verbosity, set_verbosity, true, " verbosity = boost::lexical_cast(arg); } #endif -OPTION(verbosity, inc_verbosity, false, "v", - gettext_noop("increase verbosity level by one")) -#ifdef option_bodies -{ - ++verbosity; -} -#endif -OPTSET(full) -DEPRECATE(full, gettext_noop("please use --verbose instead"), 1.0, 2.0) -OPTION(full, full, false, "full", - gettext_noop("print detailed information")) -#ifdef option_bodies -{ - if (verbosity < 1) - verbosity = 1; -} -#endif +GROUPED_SIMPLE_OPTION(globals, debug, "debug", bool, + gettext_noop("print debug log to stderr while running")) -OPTION(verbosity, verbose, false, "verbose", - gettext_noop("verbose completion output (set verbosity to 1)")) -#ifdef option_bodies -{ - if (verbosity < 1) - verbosity = 1; -} -#endif +SIMPLE_OPTION(full, "full/concise", bool, + gettext_noop("print detailed information")) OPTION(verbosity, quiet, false, "quiet,q", gettext_noop("suppress verbose, informational and progress messages (set verbosity to -1)")) @@ -534,6 +510,7 @@ OPTION(verbosity, quiet, false, "quiet,q } #endif +DEPRECATE(reallyquiet, gettext_noop("please use --verbosity=-2"), 1.0, 2.0) OPTION(verbosity, reallyquiet, false, "reallyquiet", gettext_noop("suppress warning, verbose, informational and progress messages (set verbosity to -2)")) #ifdef option_bodies @@ -542,6 +519,7 @@ OPTION(verbosity, reallyquiet, false, "r } #endif + GROUPED_SIMPLE_OPTION(globals, timestamps, "timestamps", bool, gettext_noop("show timestamps in front of errors, warnings and progress messages")) ============================================================ --- tests/default_command_options/__driver__.lua 4933c67f0a215ef42eeba6a27b26eebd5a9276fa +++ tests/default_command_options/__driver__.lua 87b816417d7ca7642721e5327d9f3731af681896 @@ -1,5 +1,5 @@ -- Demonstrate that get_default_command_options works, and that --- command line options override it. Also show that --verbose +-- command line options override it. Also show that --full -- --no-verbose works. mtn_setup() @@ -24,19 +24,19 @@ check(samefile("stdout", "normallog")) check(mtn("log", "--rcfile=default_options.lua", "--no-brief"), 0, true, false) check(samefile("stdout", "normallog")) -check(mtn("version", "--verbosity=0"), 0, true, false) +check(mtn("version", "--concise"), 0, true, false) rename("stdout", "normalversion") -check(mtn("version", "--verbose"), 0, true, false) +check(mtn("version", "--full"), 0, true, false) rename("stdout", "fullversion") check(mtn("version", "--rcfile=default_options.lua"), 0, true, false) check(samefile("stdout", "fullversion")) -check(mtn("version", "--verbose", "--verbosity=0"), 0, true, false) +check(mtn("version", "--full", "--concise"), 0, true, false) check(samefile("stdout", "normalversion")) -check(mtn("version", "--rcfile=default_options.lua", "--verbosity=0"), 0, true, false) +check(mtn("version", "--rcfile=default_options.lua", "--concise"), 0, true, false) check(samefile("stdout", "normalversion")) check(mtn("status", "--rcfile=default_options.lua"), 1, false, false) ============================================================ --- tests/default_command_options/default_options.lua 3da2ea18eb81bf63c5fd58baaf0bfc0db2960663 +++ tests/default_command_options/default_options.lua c57ff6f5009c75c1ac3d9b398891ee76f2326d1a @@ -2,7 +2,7 @@ function get_default_command_options(com function get_default_command_options(command) local default_opts = {} if (command[1] == "version") then - table.insert(default_opts, "--verbose") + table.insert(default_opts, "--full") end if (command[1] == "log") then table.insert(default_opts, "--brief") ============================================================ --- tests/reallyquiet_turns_off_tickers_and_warnings/__driver__.lua cb891df2dd67048b2d8af853e11cdab8cdf50e3f +++ tests/reallyquiet_turns_off_tickers_and_warnings/__driver__.lua 7a393866800b009214ef6722f92edb01d022e9d2 @@ -9,10 +9,10 @@ srv = netsync.start() -- check that tickers are quiet srv = netsync.start() -check(mtn2("--rcfile=netsync.lua", "pull", srv.address, "testbranch", "--reallyquiet")) +check(mtn2("--rcfile=netsync.lua", "pull", srv.address, "testbranch", "--verbosity=-2")) srv:stop() -- check that warnings aren't... -- (list keys with a pattern that doesn't match anything generates a warning) -check(mtn("--reallyquiet", "list", "keys", "foo")) +check(mtn("--verbosity=-2", "list", "keys", "foo")) ============================================================ --- tests/test_the_version_command/__driver__.lua bf200ff06525a9d3b36637bce59e2c7f98382145 +++ tests/test_the_version_command/__driver__.lua 6095698f688c9e07c2dfd67bd479300e730735ec @@ -12,13 +12,13 @@ check(string.find(output, "Running on") output = readfile("stdout") check(string.find(output, "Running on") == nil) --- The 'version' command allows a '--verbose' option. -check(mtn("version", "--verbose"), 0, true, 0) +-- The 'version' command allows a '--full' option. +check(mtn("version", "--full"), 0, true, 0) output = readfile("stdout") check(string.find(output, "Running on") ~= nil) --- The '--version' option does not allow a '--verbose' option (because the +-- The '--version' option does not allow a '--full' option (because the -- latter is not global). -check(mtn("--version", "--verbose"), 0, true, 0) +check(mtn("--version", "--full"), 0, true, 0) output = readfile("stdout") check(string.find(output, "Running on") == nil)