# # patch "ChangeLog" # from [808c36de6c842bd7ece657663adb2d9146a25b45] # to [c5935fbb7060f5ac9921eda41897564806270164] # # patch "app_state.cc" # from [8efdcd302100554f04d225c9e5ddfe9ddc1bff3a] # to [7950e66c8a6ea67081349e7dd02b8429a4c8454b] # # patch "app_state.hh" # from [15ba734efc432db709cc66ee01c7c104e5554e50] # to [833daa78837b4fa184eb129a33e6547528709347] # # patch "commands.cc" # from [41f74675806bc533e9ecc46b5dfb5c3ffb09d263] # to [302aac08e63acc1f48aa29adbbdeeff58b1c782f] # # patch "lua.cc" # from [7f7d2cd8e90e9224d82fc66216093307306fa653] # to [aefdfc576d205a78a8e47444788a9f1bc2bfc5b1] # # patch "lua.hh" # from [517f80335c5433b0134e70a53f0d26f9563151dc] # to [90a3a380420c5118c36413d90ce7be1836eb5a46] # --- ChangeLog +++ ChangeLog @@ -1,5 +1,13 @@ 2005-07-17 Nathaniel Smith + * app_state.{cc,hh}: Record whether --diff-args was passed, not + just a string value. + * lua.{cc,hh} (hook_external_diff): Take a diff_args_provided + variable. + * commands.cc (do_external_diff): Pass it. + +2005-07-17 Nathaniel Smith + * std_hooks.lua (external_diff_default_args): New variable. (external_diff): Use it as a default, and use user-provided diff_args otherwise. --- app_state.cc +++ app_state.cc @@ -34,7 +34,7 @@ app_state::app_state() : branch_name(""), db(""), stdhooks(true), rcfiles(true), diffs(false), no_merges(false), set_default(false), verbose(false), search_root("/"), - depth(-1), last(-1), diff_format(unified_diff) + depth(-1), last(-1), diff_format(unified_diff), diff_args_provided(false) { db.set_app(this); } @@ -360,6 +360,7 @@ void app_state::set_diff_args(utf8 const & args) { + diff_args_provided = true; diff_args = args; } --- app_state.hh +++ app_state.hh @@ -51,6 +51,7 @@ long last; fs::path pidfile; diff_type diff_format; + bool diff_args_provided; utf8 diff_args; void allow_working_copy(); --- commands.cc +++ commands.cc @@ -2566,6 +2566,7 @@ data_old, data_new, is_binary, + app.diff_args_provided, app.diff_args(), delta_entry_src(i).inner()(), delta_entry_dst(i).inner()()); --- lua.cc +++ lua.cc @@ -1028,6 +1028,7 @@ data const & data_old, data const & data_new, bool is_binary, + bool diff_args_provided, std::string const & diff_args, std::string const & oldrev, std::string const & newrev) @@ -1047,7 +1048,7 @@ ll.push_bool(is_binary); - if (diff_args.length() != 0) + if (diff_args_provided) ll.push_str(diff_args); else ll.push_nil(); --- lua.hh +++ lua.hh @@ -99,6 +99,7 @@ data const & data_old, data const & data_new, bool is_binary, + bool diff_args_provided, std::string const & diff_args, std::string const & oldrev, std::string const & newrev);