# # # patch "monotone.cc" # from [019401c4c64fce909e2b61070a2df32a9c9d009e] # to [1fe24aeec288b0cf1d6f47dfb6c14f3bb577c307] # # patch "options_applicator.cc" # from [0468ea2fdf5223249869a6186f5e52f697547487] # to [4bf20464a93a1acaf79e47322e10234b3ce84d4c] # # patch "options_list.hh" # from [13b6e7b6875015376d5f9333cbf8b5e3d35059d0] # to [524f3fbf6acd6590e85dd1985305aaf256bf1203] # ============================================================ --- monotone.cc 019401c4c64fce909e2b61070a2df32a9c9d009e +++ monotone.cc 1fe24aeec288b0cf1d6f47dfb6c14f3bb577c307 @@ -226,6 +226,10 @@ cpp_main(int argc, char ** argv) app.lua.hook_get_default_command_options(cmd_id, app.reset_info.default_args); + if (app.opts.log_given) + { + ui.redirect_log_to(app.opts.log); + } if (app.opts.dump_given) { global_sanity.set_dump_path(app.opts.dump.as_external()); ============================================================ --- options_applicator.cc 0468ea2fdf5223249869a6186f5e52f697547487 +++ options_applicator.cc 4bf20464a93a1acaf79e47322e10234b3ce84d4c @@ -32,6 +32,7 @@ options_applicator::options_applicator(o _impl->what = what; // --dump is handled in monotone.cc + // --log is handled in monotone.cc _impl->were_timestamps_enabled = ui.enable_timestamps(opts.timestamps); ============================================================ --- options_list.hh 13b6e7b6875015376d5f9333cbf8b5e3d35059d0 +++ options_list.hh 524f3fbf6acd6590e85dd1985305aaf256bf1203 @@ -532,12 +532,7 @@ OPT(last, "last", long, -1, } #endif -OPTION(globals, log, true, "log", gettext_noop("file to write the log to")) -#ifdef option_bodies -{ - ui.redirect_log_to(system_path(arg, origin::user)); -} -#endif +GLOBAL_SIMPLE_OPTION(log, "log", system_path, gettext_noop("file to write the log to")) OPTSET(messages) OPTVAR(messages, std::vector, message, )