# # patch "ChangeLog" # from [34577ec1b177cb0bf816d1b316ae65e1aa5680ab] # to [94798c69e9e38ea2925ea08bab5bae48e690e865] # # patch "annotate.cc" # from [ac59a344c2b1a436eaf8241f128b4fb32ce112c1] # to [583bfb6d988073642e901dfa36d85c7c44c4ca37] # # patch "paths.hh" # from [29324fe2472618856bb0cc378164619fa304f4a5] # to [1ca8a98b2dede5d14020f7239e9c260158d916af] # # patch "restrictions.cc" # from [2befadf39214a86ccfa02f83576fbd1c97a115ef] # to [a2c9b4ec291eb22ed849af535ffec2fc4de253d9] # # patch "sanity.cc" # from [228ea3451671f274c12d8639e156f66e6a197bb1] # to [aa038c741b0cdce82d8c73ed02baea9f1b56a5e5] # # patch "transforms.cc" # from [d50dc1ea1d44b509d2c32f56c07a8e869d5204a1] # to [f5ba47a9ad3725a4bdd5341328ae91ae6ac0410e] # # patch "work.cc" # from [b4a6a46a5a36850118372a5d1469c04a78d0f323] # to [865b13a4864fdb4e7a2199c1bd39a04ea9fb6cb0] # # patch "xdelta.cc" # from [36320f95cd772de1c5f9d81751c4679522596911] # to [9867e93ab2e0c9215a733451519967d828c74e46] # ======================================================================== --- ChangeLog 34577ec1b177cb0bf816d1b316ae65e1aa5680ab +++ ChangeLog 94798c69e9e38ea2925ea08bab5bae48e690e865 @@ -1,5 +1,12 @@ 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. + * Adjust other files accordingly. +2005-08-24 Nathaniel Smith + * More compile fixes. All remaing compile errors are real problems, yay. ======================================================================== --- annotate.cc ac59a344c2b1a436eaf8241f128b4fb32ce112c1 +++ annotate.cc 583bfb6d988073642e901dfa36d85c7c44c4ca37 @@ -538,8 +538,7 @@ file_path parent_fpath = apply_change_set_inverse(cs, work_unit.node_fpath); L(F("file %s in parent revision %s is %s\n") % work_unit.node_fpath % parent_revision % parent_fpath); - I(!(parent_fpath == std::string(""))); - I(parent_fpath().size() > 0); + I(!parent_fpath.empty()); change_set::delta_map::const_iterator fdelta_iter = cs.deltas.find(parent_fpath); file_id parent_fid = work_unit.node_fid; ======================================================================== --- paths.hh 29324fe2472618856bb0cc378164619fa304f4a5 +++ paths.hh 1ca8a98b2dede5d14020f7239e9c260158d916af @@ -34,8 +34,8 @@ // converts to native charset and path syntax std::string as_external() const; // leaves as utf8 - utf8 const & as_internal() const - { return data; } + std::string const & as_internal() const + { return data(); } bool empty() const { return data().empty(); } protected: ======================================================================== --- restrictions.cc 2befadf39214a86ccfa02f83576fbd1c97a115ef +++ restrictions.cc a2c9b4ec291eb22ed849af535ffec2fc4de253d9 @@ -61,9 +61,9 @@ // we know that file_path's are normalized relative paths. So we can // find intermediate paths simply by searching for /. std::string::size_type j = std::string::npos; - while ((j = (*i)().rfind('/', j)) != std::string::npos) + while ((j = (*i).as_internal().rfind('/', j)) != std::string::npos) { - file_path dir = file_path_internal((*i)().substr(0, j)); + file_path dir = file_path_internal((*i).as_internal().substr(0, j)); if (intermediate_paths.find(dir) != intermediate_paths.end()) break; if (paths.find(dir) != paths.end()) break; intermediate_paths.insert(dir); ======================================================================== --- sanity.cc 228ea3451671f274c12d8639e156f66e6a197bb1 +++ sanity.cc aa038c741b0cdce82d8c73ed02baea9f1b56a5e5 @@ -56,7 +56,7 @@ ui.inform((F("failed to write debugging log to %s") % filename).str()); } else - ui.inform(_("discarding debug log (maybe you want --debug or --dump?)")); + ui.inform("discarding debug log (maybe you want --debug or --dump?)"); } void ======================================================================== --- transforms.cc d50dc1ea1d44b509d2c32f56c07a8e869d5204a1 +++ transforms.cc f5ba47a9ad3725a4bdd5341328ae91ae6ac0410e @@ -260,7 +260,7 @@ i != m.end(); ++i) { sz += i->second.inner()().size(); - sz += i->first.as_internal()().size(); + sz += i->first.as_internal().size(); sz += 3; } @@ -280,8 +280,8 @@ c += i->second.inner()().size(); *c++ = ' '; *c++ = ' '; - memcpy(c, i->first.as_internal()().data(), i->first.as_internal()().size()); - c += i->first.as_internal()().size(); + memcpy(c, i->first.as_internal().data(), i->first.as_internal().size()); + c += i->first.as_internal().size(); *c++ = '\n'; } ======================================================================== --- work.cc b4a6a46a5a36850118372a5d1469c04a78d0f323 +++ work.cc 865b13a4864fdb4e7a2199c1bd39a04ea9fb6cb0 @@ -154,7 +154,7 @@ path_set const & ps, bool & path_is_directory) { - std::string path_as_dir = p.as_internal()() + "/"; + std::string path_as_dir = p.as_internal() + "/"; for (path_set::const_iterator i = ps.begin(); i != ps.end(); ++i) { if (*i == p) @@ -162,7 +162,7 @@ path_is_directory = false; return true; } - else if (i->as_internal()().find(path_as_dir) == 0) + else if (i->as_internal().find(path_as_dir) == 0) { path_is_directory = true; return true; @@ -644,7 +644,7 @@ i != attr.end(); ++i) { basic_io::stanza st; - st.push_str_pair(syms::file, i->first.as_internal()()); + st.push_str_pair(syms::file, i->first.as_internal()); for (std::map::const_iterator j = i->second.begin(); j != i->second.end(); ++j) ======================================================================== --- xdelta.cc 36320f95cd772de1c5f9d81751c4679522596911 +++ xdelta.cc 9867e93ab2e0c9215a733451519967d828c74e46 @@ -263,7 +263,7 @@ size_t isz = 0; if (i != a.end()) - isz = i->first.as_internal()().size() + 2 + i->second.inner()().size() + 1; + isz = i->first.as_internal().size() + 2 + i->second.inner()().size() + 1; if (i != a.end() && i->first == j->first) {