# # # patch "NEWS" # from [8ca47c752c2bec4b765cec89238f990c787b0b05] # to [655a2c452a5737cfc64bb8ede4f83c02a64690bc] # # patch "monotone.cc" # from [79955d57cc2fba7659099e5d56f9d1159fcda99f] # to [a24c61de5c4c10160c696ac9b268be4e493cbbdd] # ============================================================ --- NEWS 8ca47c752c2bec4b765cec89238f990c787b0b05 +++ NEWS 655a2c452a5737cfc64bb8ede4f83c02a64690bc @@ -4,6 +4,11 @@ Changes + - 'mtn help ' or 'mtn --help' no + longer print global options, thus making the output of specific help + requests more compact. You still see all available global options + by executing 'mtn help' without any arguments. + Bugs fixed - Several bugfixes to `mtn automate stdio': @@ -15,7 +20,7 @@ * option errors haven't been catched properly and thus weren't encoded in stdio either; this has been fixed as well. - - In certain cases, especially also on FreeBSD and Mac OS X, netsync + - In certain cases, especially also on FreeBSD and Mac OS X, netsync called select() even after read() returned 0 bytes to indicate the end of the file, resulting in a confusing error message. This is fixed by treating EOF specially and prevent further calls ============================================================ --- monotone.cc 79955d57cc2fba7659099e5d56f9d1159fcda99f +++ monotone.cc a24c61de5c4c10160c696ac9b268be4e493cbbdd @@ -300,17 +300,23 @@ cpp_main(int argc, char ** argv) usage_stream << F("Usage: %s [OPTION...] command [ARG...]") % ui.prog_name << "\n\n"; - usage_stream << options::opts::globals().instantiate(&app.opts). - get_usage_str() << '\n'; + if (u.which.empty()) + { + usage_stream << options::opts::globals().instantiate(&app.opts). + get_usage_str() << '\n'; + } + // Make sure to hide documentation that's not part of // the current command. options::options_type cmd_options = commands::command_options(u.which); if (!cmd_options.empty()) { - usage_stream << F("Options specific to '%s %s':") % - ui.prog_name % visibleid << "\n\n"; + usage_stream + << F("Options specific to '%s %s' (run '%s help' to see global options):") + % ui.prog_name % visibleid % ui.prog_name + << "\n\n"; usage_stream << cmd_options.instantiate(&app.opts). get_usage_str() << '\n'; }