# # # patch "commands.cc" # from [5b8a4f6458f87ab5bc22280e3028f460b79739f8] # to [14bc096227f37257f9c577a27009089b125db0e4] # # patch "commands.hh" # from [9cba3386e4134a82fd76bd3c09e7b3b71216a4b7] # to [972f42a94e23b582ed476d3c03e71ec963245382] # # patch "monotone.cc" # from [933c84e0b62e5d35ca46bf811529869ffbe1e2d2] # to [21e9134b821467b0771d5092a6220d8785d1d1f8] # ============================================================ --- commands.cc 5b8a4f6458f87ab5bc22280e3028f460b79739f8 +++ commands.cc 14bc096227f37257f9c577a27009089b125db0e4 @@ -375,13 +375,17 @@ namespace commands namespace commands { command_id - complete_command(vector< utf8 > const & args, - vector< utf8 > & rest) + complete_command(args_vector const & args, + args_vector & rest) { command * root = CMD_REF(public); I(root != NULL); - command * cmd = root->find_child_by_components(args, rest); + vector< utf8 > utf8args(args.begin(), args.end()); + vector< utf8 > utf8rest; + + command * cmd = root->find_child_by_components(utf8args, utf8rest); + rest = args_vector(utf8rest.begin(), utf8rest.end()); I(cmd != NULL); return cmd->ident(); } ============================================================ --- commands.hh 9cba3386e4134a82fd76bd3c09e7b3b71216a4b7 +++ commands.hh 972f42a94e23b582ed476d3c03e71ec963245382 @@ -30,8 +30,8 @@ namespace commands { typedef std::vector< utf8 > command_id; void explain_usage(std::string const & cmd, std::ostream & out); - command_id complete_command(std::vector< utf8 > const & args, - std::vector< utf8 > & rest); + command_id complete_command(args_vector const & args, + args_vector & rest); int process(app_state & app, std::string const & cmd, args_vector const & args); options::options_type command_options(args_vector const & cmdline); ============================================================ --- monotone.cc 933c84e0b62e5d35ca46bf811529869ffbe1e2d2 +++ monotone.cc 21e9134b821467b0771d5092a6220d8785d1d1f8 @@ -135,8 +135,7 @@ commands::command_id read_options(option commands::command_id cmd; if (!opts.args.empty()) { - vector args(args.begin(), args.end()); // XXX - vector rest; + args_vector rest; cmd = commands::complete_command(args, rest); N(!cmd.empty(), F("unknown command '%s'") % join_words(args)());