# # # patch "NEWS" # from [5f0e16a3c7e1fe2de30ed5d92605142432859023] # to [6e3e6da62d64faad64bca48dab6ad10093feea90] # # patch "options_list.hh" # from [0ab9a475a43b8489d4a30e5770d4f24ebdb9ddc0] # to [2660f978ab5abd49621d67d201d059a777f88871] # # patch "tests/reallyquiet_turns_off_tickers_and_warnings/__driver__.lua" # from [7a393866800b009214ef6722f92edb01d022e9d2] # to [bf97ebda957c64616410061841545648e8ef192e] # # patch "tests/verbosity/__driver__.lua" # from [d3888a0f7de6aa282f9046c6977964cd1d8c182c] # to [76e572294f85e29b9e390cd3170510dc3ba3b2e5] # ============================================================ --- NEWS 5f0e16a3c7e1fe2de30ed5d92605142432859023 +++ NEWS 6e3e6da62d64faad64bca48dab6ad10093feea90 @@ -99,7 +99,7 @@ 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 - --verbosity set verbosity level + --verbose [-v] increase verbosity (opposite of --quiet) - Global options now hidden: --roster-cache-performance-log @@ -166,7 +166,8 @@ Xxx Xxx 99 99:99:99 UTC 2010 - Deprecated options: --norc use --no-standard-rcfiles --nostd use --no-builtin-rcfile - --reallyquiet use --verbosity=-2 + --reallyquiet use --quiet --quiet + --debug use --verbose - To aid command line typing, partial option names are tried to be expanded; if the expansion leads to multiple possibilities, ============================================================ --- options_list.hh 0ab9a475a43b8489d4a30e5770d4f24ebdb9ddc0 +++ options_list.hh 2660f978ab5abd49621d67d201d059a777f88871 @@ -488,36 +488,38 @@ OPTVAR(verbosity, int, verbosity, 0) OPTSET(verbosity) OPTSET_REL(globals, verbosity) OPTVAR(verbosity, int, verbosity, 0) -OPTION(verbosity, set_verbosity, true, "verbosity", - gettext_noop("set verbosity level: 0 is default; 1 is print debug messages; " - "-1 is hide tickers and progress messages; -2 is also hide warnings")) + +OPTION(verbosity, quiet, false, "quiet,q", + gettext_noop("decrease verbosity (undo previous -v, then disable informational output, then disable warnings")) #ifdef option_bodies { - verbosity = boost::lexical_cast(arg); + --verbosity; + if (verbosity < -2) + verbosity = -2; } #endif - -OPTION(globals, debug, false, "debug", - gettext_noop("print debug log to stderr while running (--verbosity=1)")) +OPTION(verbosity, verbose, false, "verbose,v", + gettext_noop("increase verbosity (undo previous -q, and then enable debug output)")) #ifdef option_bodies { - verbosity = 1; + ++verbosity; + 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)")) +DEPRECATE(debug, + gettext_noop("please us -v (or -v -v -v if there are previous -q options)"), + 1.0, 2.0) +OPTION(globals, debug, false, "debug", + gettext_noop("print debug log to stderr while running")) #ifdef option_bodies { - if (verbosity > -1) - verbosity = -1; + verbosity = 1; } #endif -DEPRECATE(reallyquiet, gettext_noop("please use --verbosity=-2"), 1.0, 2.0) +DEPRECATE(reallyquiet, gettext_noop("please use -q -q"), 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 @@ -526,7 +528,10 @@ OPTION(verbosity, reallyquiet, false, "r } #endif +SIMPLE_OPTION(full, "full/concise", bool, + gettext_noop("print detailed information")) + GROUPED_SIMPLE_OPTION(globals, timestamps, "timestamps", bool, gettext_noop("show timestamps in front of errors, warnings and progress messages")) ============================================================ --- tests/reallyquiet_turns_off_tickers_and_warnings/__driver__.lua 7a393866800b009214ef6722f92edb01d022e9d2 +++ tests/reallyquiet_turns_off_tickers_and_warnings/__driver__.lua bf97ebda957c64616410061841545648e8ef192e @@ -9,10 +9,10 @@ srv = netsync.start() -- check that tickers are quiet srv = netsync.start() -check(mtn2("--rcfile=netsync.lua", "pull", srv.address, "testbranch", "--verbosity=-2")) +check(mtn2("--rcfile=netsync.lua", "pull", srv.address, "testbranch", "-q", "-q")) srv:stop() -- check that warnings aren't... -- (list keys with a pattern that doesn't match anything generates a warning) -check(mtn("--verbosity=-2", "list", "keys", "foo")) +check(mtn("-q", "-q", "list", "keys", "foo")) ============================================================ --- tests/verbosity/__driver__.lua d3888a0f7de6aa282f9046c6977964cd1d8c182c +++ tests/verbosity/__driver__.lua 76e572294f85e29b9e390cd3170510dc3ba3b2e5 @@ -27,11 +27,12 @@ dotest({}, {}, true, true, false) end dotest({}, {}, true, true, false) -dotest({"--quiet"}, {{"verbosity", "0"}}, true, true, false) +dotest({}, {{"v", ""}}, true, true, false) +dotest({"--quiet"}, {{"v", ""}}, true, true, false) dotest({"--quiet"}, {}, false, true, false) -dotest({"--verbosity=-2"}, {}, false, false, false) +dotest({"-q", "-q"}, {}, false, false, false) -dotest({"--debug"}, {}, true, true, true) -dotest({"--debug"}, {{"verbosity", "0"}}, true, true, true) -dotest({"--debug"}, {{"verbosity", "-1"}}, false, true, true) -dotest({"--debug"}, {{"verbosity", "-2"}}, false, false, true) \ No newline at end of file +dotest({"--v"}, {}, true, true, true) +dotest({"--v"}, {{"q", ""}}, true, true, true) +dotest({"--v"}, {{"q", ""}, {"q", ""}}, false, true, true) +dotest({"--v"}, {{"q", ""}, {"q", ""}, {"q", ""}}, false, false, true) \ No newline at end of file