# # # patch "mtn_cvs/mtn_automate.cc" # from [a6ab1c3dc2c014f07920c83ec3835f2046bb38d6] # to [d8da6a560890af80d24229eb09e2727d7f6dfd58] # ============================================================ --- mtn_cvs/mtn_automate.cc a6ab1c3dc2c014f07920c83ec3835f2046bb38d6 +++ mtn_cvs/mtn_automate.cc d8da6a560890af80d24229eb09e2727d7f6dfd58 @@ -29,6 +29,54 @@ revision_id mtn_automate::find_newest_sy return revision_id(result); } +namespace +{ + namespace syms + { + // cset symbols + symbol const delete_node("delete"); + symbol const rename_node("rename"); + symbol const content("content"); + symbol const add_file("add_file"); + symbol const add_dir("add_dir"); + symbol const patch("patch"); + symbol const from("from"); + symbol const to("to"); + symbol const clear("clear"); + symbol const set("set"); + symbol const attr("attr"); + symbol const value("value"); + + // revision + symbol const old_revision("old_revision"); + + // roster symbols + symbol const format_version("format_version"); +// symbol const old_revision("old_revision"); + symbol const new_manifest("new_manifest"); + + symbol const dir("dir"); + symbol const file("file"); +// symbol const content("content"); +// symbol const attr("attr"); + + // cmd_list symbols + symbol const key("key"); + symbol const signature("signature"); + symbol const name("name"); +// symbol const value("value"); + symbol const trust("trust"); + } +} + +static inline void +parse_path(basic_io::parser & parser, split_path & sp) +{ + std::string s; + parser.str(s); + file_path_internal(s).split(sp); +} + mtn_automate::sync_map_t mtn_automate::get_sync_info(revision_id const& rid, std::string const& domain) { std::vector args; args.push_back(rid.inner()()); @@ -39,7 +87,7 @@ mtn_automate::sync_map_t mtn_automate::g basic_io::tokenizer tokenizer(source); basic_io::parser parser(tokenizer); - std::string t1; + std::string t1,t2; split_path p1; sync_map_t result; while (parser.symp(syms::set)) @@ -101,46 +149,6 @@ std::vector mtn_automate::g return result; } -namespace -{ - namespace syms - { - // cset symbols - symbol const delete_node("delete"); - symbol const rename_node("rename"); - symbol const content("content"); - symbol const add_file("add_file"); - symbol const add_dir("add_dir"); - symbol const patch("patch"); - symbol const from("from"); - symbol const to("to"); - symbol const clear("clear"); - symbol const set("set"); - symbol const attr("attr"); - symbol const value("value"); - - // revision - symbol const old_revision("old_revision"); - - // roster symbols - symbol const format_version("format_version"); -// symbol const old_revision("old_revision"); - symbol const new_manifest("new_manifest"); - - symbol const dir("dir"); - symbol const file("file"); -// symbol const content("content"); -// symbol const attr("attr"); - - // cmd_list symbols - symbol const key("key"); - symbol const signature("signature"); - symbol const name("name"); -// symbol const value("value"); - symbol const trust("trust"); - } -} - static void print_cset(basic_io::printer &printer, mtn_automate::cset const& cs) { for (path_set::const_iterator i = cs.nodes_deleted.begin(); i != cs.nodes_deleted.end(); ++i) @@ -304,14 +312,6 @@ std::vector m return result; } -static inline void -parse_path(basic_io::parser & parser, split_path & sp) -{ - std::string s; - parser.str(s); - file_path_internal(s).split(sp); -} - static void parse_cset(basic_io::parser & parser, mtn_automate::cset & cs)