# # # patch "monotone.cc" # from [dfa276b3970ae7d510d87f3aa6629225098c5fb3] # to [c9818e70469c5b45e9ed904803bc3d1cb4d48f5f] # # patch "options_applicator.cc" # from [4bf20464a93a1acaf79e47322e10234b3ce84d4c] # to [381a87dcb7726bfd42997d3e24a63a50e69a3fa9] # # patch "options_list.hh" # from [9ec13f0e7fbcd9abacb2b04ef04be2437ce5068c] # to [291e3ef23453a66beb00a2c7d3ebd983fb1ce02c] # ============================================================ --- monotone.cc dfa276b3970ae7d510d87f3aa6629225098c5fb3 +++ monotone.cc c9818e70469c5b45e9ed904803bc3d1cb4d48f5f @@ -232,6 +232,10 @@ cpp_main(int argc, char ** argv) { ui.redirect_log_to(app.opts.log); } + if (app.opts.debug_given) + { + global_sanity.set_debug(); + } if (app.opts.dump_given) { global_sanity.set_dump_path(app.opts.dump.as_external()); ============================================================ --- options_applicator.cc 4bf20464a93a1acaf79e47322e10234b3ce84d4c +++ options_applicator.cc 381a87dcb7726bfd42997d3e24a63a50e69a3fa9 @@ -33,6 +33,7 @@ options_applicator::options_applicator(o // --dump is handled in monotone.cc // --log is handled in monotone.cc + // --debug is handled in monotone.cc _impl->were_timestamps_enabled = ui.enable_timestamps(opts.timestamps); ============================================================ --- options_list.hh 9ec13f0e7fbcd9abacb2b04ef04be2437ce5068c +++ options_list.hh 291e3ef23453a66beb00a2c7d3ebd983fb1ce02c @@ -324,14 +324,8 @@ GLOBAL_SIMPLE_OPTION(roster_cache_perfor system_path, gettext_noop("log roster cache statistic to the given file")) -// FIXME this needs to be a flag, not a function call -OPTION(globals, debug, false, "debug", - gettext_noop("print debug log to stderr while running")) -#ifdef option_bodies -{ - global_sanity.set_debug(); -} -#endif +GLOBAL_SIMPLE_OPTION(debug, "debug", bool, + gettext_noop("print debug log to stderr while running")) OPT(depth, "depth", long, -1, gettext_noop("limit the number of levels of directories to descend"))