# # patch "ChangeLog" # from [94798c69e9e38ea2925ea08bab5bae48e690e865] # to [7cdd45be35b1e123a1ea97a041fb6f43bbb16752] # # patch "Makefile.am" # from [533ac8ab8266031422f25ff175ce7a27404a897d] # to [eb0c17674ef2141d561015d818b3b3b206a437aa] # # patch "basic_io.cc" # from [08fb82e004b12795e66bf122762729c1bb5e5209] # to [59d07d48475fc4a7d1a5301f162fdb7245bbab62] # # patch "basic_io.hh" # from [ddf2b4dbcf7bedb37aa96ef1634c41d2d58a249e] # to [10026c3e42711e8f27e150cb023310c540b3abbe] # # patch "change_set.cc" # from [364a9629171b39a5337ac7ef7ce72b7dfe249045] # to [372e488086225b937d7de33611e374edc07d3922] # # patch "paths.hh" # from [1ca8a98b2dede5d14020f7239e9c260158d916af] # to [a3e798a2c2c69a8d12c98374973d0ac4f6a91b84] # ======================================================================== --- ChangeLog 94798c69e9e38ea2925ea08bab5bae48e690e865 +++ ChangeLog 7cdd45be35b1e123a1ea97a041fb6f43bbb16752 @@ -1,5 +1,13 @@ 2005-08-24 Nathaniel Smith + * paths.hh (system_path): Add a from-any_path constructor. + * Makefile.am (MOST_SOURCES): Remove path_component.{cc,hh}. + * basic_io.hh (push_file_pair): New method. + * change_set.cc (print_insane_change_set) + (print_insane_path_rearrangement): Use it. + +2005-08-24 Nathaniel Smith + * paths.hh (any_path::as_internal): On second thought, return a std::string, not a utf8 -- utf8 would be better, but should wait for some more general charset handling cleanup. ======================================================================== --- Makefile.am 533ac8ab8266031422f25ff175ce7a27404a897d +++ Makefile.am eb0c17674ef2141d561015d818b3b3b206a437aa @@ -34,7 +34,6 @@ mt_version.cc mt_version.hh \ automate.cc automate.hh \ database_check.cc database_check.hh \ - path_component.cc path_component.hh \ epoch.cc epoch.hh \ inodeprint.cc inodeprint.hh \ selectors.cc selectors.hh \ ======================================================================== --- basic_io.cc 08fb82e004b12795e66bf122762729c1bb5e5209 +++ basic_io.cc 59d07d48475fc4a7d1a5301f162fdb7245bbab62 @@ -84,6 +84,10 @@ indent = k.size(); } +void basic_io::stanza::push_file_pair(std::string const & k, file_path const & v) +{ + push_str_pair(k, v.as_internal()); +} basic_io::printer::printer(std::ostream & ost) : empty_output(true), out(ost) ======================================================================== --- basic_io.hh ddf2b4dbcf7bedb37aa96ef1634c41d2d58a249e +++ basic_io.hh 10026c3e42711e8f27e150cb023310c540b3abbe @@ -151,6 +151,7 @@ std::vector > entries; void push_hex_pair(std::string const & k, std::string const & v); void push_str_pair(std::string const & k, std::string const & v); + void push_file_pair(std::string const & k, file_path const & v); }; struct ======================================================================== --- change_set.cc 364a9629171b39a5337ac7ef7ce72b7dfe249045 +++ change_set.cc 372e488086225b937d7de33611e374edc07d3922 @@ -2823,7 +2823,7 @@ i != pr.deleted_files.end(); ++i) { basic_io::stanza st; - st.push_str_pair(syms::delete_file, (*i)()); + st.push_str_pair(syms::delete_file, *i); printer.print_stanza(st); } @@ -2831,7 +2831,7 @@ i != pr.deleted_dirs.end(); ++i) { basic_io::stanza st; - st.push_str_pair(syms::delete_dir, (*i)()); + st.push_str_pair(syms::delete_dir, *i); printer.print_stanza(st); } @@ -2839,8 +2839,8 @@ i != pr.renamed_files.end(); ++i) { basic_io::stanza st; - st.push_str_pair(syms::rename_file, i->first()); - st.push_str_pair(syms::to, i->second()); + st.push_str_pair(syms::rename_file, i->first); + st.push_str_pair(syms::to, i->second); printer.print_stanza(st); } @@ -2848,8 +2848,8 @@ i != pr.renamed_dirs.end(); ++i) { basic_io::stanza st; - st.push_str_pair(syms::rename_dir, i->first()); - st.push_str_pair(syms::to, i->second()); + st.push_file_pair(syms::rename_dir, i->first); + st.push_file_pair(syms::to, i->second); printer.print_stanza(st); } @@ -2857,7 +2857,7 @@ i != pr.added_files.end(); ++i) { basic_io::stanza st; - st.push_str_pair(syms::add_file, (*i)()); + st.push_file_pair(syms::add_file, *i); printer.print_stanza(st); } } @@ -2904,7 +2904,7 @@ i != cs.deltas.end(); ++i) { basic_io::stanza st; - st.push_str_pair(syms::patch, i->first()); + st.push_str_pair(syms::patch, i->first); st.push_hex_pair(syms::from, i->second.first.inner()()); st.push_hex_pair(syms::to, i->second.second.inner()()); printer.print_stanza(st); ======================================================================== --- paths.hh 1ca8a98b2dede5d14020f7239e9c260158d916af +++ paths.hh a3e798a2c2c69a8d12c98374973d0ac4f6a91b84 @@ -112,6 +112,7 @@ { public: system_path(); + explicit system_path(any_path const & other); // this path can contain anything, and it will be absolutified and // tilde-expanded. it will considered to be relative to the directory // monotone started in. it should be in utf8.