# # patch "change_set.cc" # from [a9158b048ec1da1ab7f4c580c3c41e2947ec1fbd] # to [05f8d5a6c5df0de9a67e1d95a53c68b5d8b5e5a5] # # patch "commands.cc" # from [5703004b672c1f2067534c0afadbfb5af55d4008] # to [3008e43f32c5ecfde2fe8f6b737daa7e2766a661] # # patch "format.cc" # from [e231ce6389ace3b897d872bab11e025198ea56d0] # to [339882e49960699c92cc5c311b7f84b041739550] # # patch "format.hh" # from [faa0ac9ea2ac1d92a18fb50e3df408d8f503395a] # to [851054f72a9053b3ed62cc0685812d70a7568f95] # # patch "win32/monotone.iss" # from [224c8d4c628b371305a2f632ae72284094e56a6f] # to [4dec648d917bbaf562b0397ca210ba4790e44295] # ======================================================================== --- change_set.cc a9158b048ec1da1ab7f4c580c3c41e2947ec1fbd +++ change_set.cc 05f8d5a6c5df0de9a67e1d95a53c68b5d8b5e5a5 @@ -3029,8 +3029,8 @@ for (change_set::delta_map::const_iterator i = cs.deltas.begin(); i != cs.deltas.end(); i++) { - if (pr.added_files.find(i->first()) == pr.added_files.end()) - modified_files.insert(i->first()); + if (pr.added_files.find(i->first) == pr.added_files.end()) + modified_files.insert(i->first); } } @@ -3041,7 +3041,7 @@ os << " "; for (std::set::const_iterator i = sfp.begin(); i != sfp.end(); ++i) { - const std::string str = (*i)(); + const std::string str = boost::lexical_cast(*i); if (cols > 8 && cols + str.size() + 1 >= max_cols) { cols = 8; ======================================================================== --- commands.cc 5703004b672c1f2067534c0afadbfb5af55d4008 +++ commands.cc 3008e43f32c5ecfde2fe8f6b737daa7e2766a661 @@ -687,131 +687,7 @@ app.db.delete_existing_rev_and_certs(ident); } -// The changes_summary structure holds a list all of files and directories -// affected in a revision, and is useful in the 'log' command to print this -// information easily. It has to be constructed from all change_set objects -// that belong to a revision. -struct -changes_summary -{ - bool empty; - change_set::path_rearrangement rearrangement; - std::set modified_files; - changes_summary(void); - void add_change_set(change_set const & cs); - void print(std::ostream & os, size_t max_cols) const; -}; - -changes_summary::changes_summary(void) : empty(true) -{ -} - -void -changes_summary::add_change_set(change_set const & cs) -{ - if (cs.empty()) - return; - empty = false; - - change_set::path_rearrangement const & pr = cs.rearrangement; - - for (std::set::const_iterator i = pr.deleted_files.begin(); - i != pr.deleted_files.end(); i++) - rearrangement.deleted_files.insert(*i); - - for (std::set::const_iterator i = pr.deleted_dirs.begin(); - i != pr.deleted_dirs.end(); i++) - rearrangement.deleted_dirs.insert(*i); - - for (std::map::const_iterator - i = pr.renamed_files.begin(); i != pr.renamed_files.end(); i++) - rearrangement.renamed_files.insert(*i); - - for (std::map::const_iterator - i = pr.renamed_dirs.begin(); i != pr.renamed_dirs.end(); i++) - rearrangement.renamed_dirs.insert(*i); - - for (std::set::const_iterator i = pr.added_files.begin(); - i != pr.added_files.end(); i++) - rearrangement.added_files.insert(*i); - - for (change_set::delta_map::const_iterator i = cs.deltas.begin(); - i != cs.deltas.end(); i++) - { - if (pr.added_files.find(i->first) == pr.added_files.end()) - modified_files.insert(i->first); - } -} - -static void -print_indented_set(std::ostream & os, - set const & s, - size_t max_cols) -{ - size_t cols = 8; - os << " "; - for (std::set::const_iterator i = s.begin(); - i != s.end(); i++) - { - const std::string str = boost::lexical_cast(*i); - if (cols > 8 && cols + str.size() + 1 >= max_cols) - { - cols = 8; - os << endl << " "; - } - os << " " << str; - cols += str.size() + 1; - } - os << endl; -} - -void -changes_summary::print(std::ostream & os, size_t max_cols) const -{ - if (! rearrangement.deleted_files.empty()) - { - os << "Deleted files:" << endl; - print_indented_set(os, rearrangement.deleted_files, max_cols); - } - - if (! rearrangement.deleted_dirs.empty()) - { - os << "Deleted directories:" << endl; - print_indented_set(os, rearrangement.deleted_dirs, max_cols); - } - - if (! rearrangement.renamed_files.empty()) - { - os << "Renamed files:" << endl; - for (std::map::const_iterator - i = rearrangement.renamed_files.begin(); - i != rearrangement.renamed_files.end(); i++) - os << " " << i->first << " to " << i->second << endl; - } - - if (! rearrangement.renamed_dirs.empty()) - { - os << "Renamed directories:" << endl; - for (std::map::const_iterator - i = rearrangement.renamed_dirs.begin(); - i != rearrangement.renamed_dirs.end(); i++) - os << " " << i->first << " to " << i->second << endl; - } - - if (! rearrangement.added_files.empty()) - { - os << "Added files:" << endl; - print_indented_set(os, rearrangement.added_files, max_cols); - } - - if (! modified_files.empty()) - { - os << "Modified files:" << endl; - print_indented_set(os, modified_files, max_cols); - } -} - CMD(genkey, N_("key and cert"), N_("KEYID"), N_("generate an RSA key-pair"), OPT_NONE) { if (args.size() != 1) @@ -3617,7 +3493,7 @@ << endl; cout << "Revision: " << rid << endl; - for (set::const_iterator anc = ancestors.begin(); + for (set::const_iterator anc = csum.ancestors.begin(); anc != csum.ancestors.end(); ++anc) cout << "Ancestor: " << *anc << endl; ======================================================================== --- format.cc e231ce6389ace3b897d872bab11e025198ea56d0 +++ format.cc 339882e49960699c92cc5c311b7f84b041739550 @@ -137,7 +137,7 @@ switch (*i) { case 'f': - out << (*f) (); + out << *f; break; case '%': out << '%'; @@ -177,10 +177,10 @@ switch (*i) { case 'o': - out << f->first (); + out << f->first; break; case 'f': - out << f->second (); + out << f->second; break; case '%': out << '%'; @@ -683,15 +683,15 @@ for (f = pr.deleted_dirs.begin (); f != pr.deleted_dirs.end (); ++f) { xw.tag ("delete-dir"); - xw.attr ("name", (*f) ()); + xw.attr ("name", *f); xml_delta (*f, cs.deltas); xw.end (); } for (m = pr.renamed_dirs.begin (); m != pr.renamed_dirs.end (); ++m) { xw.tag ("rename-dir"); - xw.attr ("name", m->second ()); - xw.attr ("old-name", m->first ()); + xw.attr ("name", m->second); + xw.attr ("old-name", m->first); xml_delta (m->second, cs.deltas); xml_delta (m->first, cs.deltas); xw.end (); @@ -699,22 +699,22 @@ for (f = pr.added_files.begin (); f != pr.added_files.end (); ++f) { xw.tag ("add-file"); - xw.attr ("name", (*f) ()); + xw.attr ("name", *f); xml_delta (*f, cs.deltas); xw.end (); } for (f = pr.deleted_files.begin (); f != pr.deleted_files.end (); ++f) { xw.tag ("delete_file"); - xw.attr ("name", (*f) ()); + xw.attr ("name", *f); xml_delta (*f, cs.deltas); xw.end (); } for (m = pr.renamed_files.begin (); m != pr.renamed_files.end (); ++m) { xw.tag ("rename_file"); - xw.attr ("name", m->second ()); - xw.attr ("old-name", m->first ()); + xw.attr ("name", m->second); + xw.attr ("old-name", m->first); xml_delta (m->second, cs.deltas); xml_delta (m->first, cs.deltas); xw.end (); @@ -724,13 +724,13 @@ for (change_set::delta_map::const_iterator i = cs.deltas.begin (); i != cs.deltas.end (); i++) { - if (pr.added_files.find (i->first ()) == pr.added_files.end ()) - modified_files.insert (i->first ()); + if (pr.added_files.find (i->first) == pr.added_files.end ()) + modified_files.insert (i->first); } for (f = modified_files.begin (); f != modified_files.end (); ++f) { xw.tag ("change-file"); - xw.attr ("name", (*f) ()); + xw.attr ("name", *f); xml_delta (*f, cs.deltas); xw.end (); } ======================================================================== --- format.hh faa0ac9ea2ac1d92a18fb50e3df408d8f503395a +++ format.hh 851054f72a9053b3ed62cc0685812d70a7568f95 @@ -106,6 +106,14 @@ void end(); void attr(const utf8 &attrname, const utf8 &value); void attr(const std::string &attrname, const utf8 &value){ attr(utf8(attrname), value);} + void attr(const utf8 &attrname, const file_path &value) + { + attr(utf8(attrname), boost::lexical_cast(value)); + } + void attr(const std::string &attrname, const file_path &value) + { + attr(utf8(attrname), boost::lexical_cast(value)); + } private: void encode(const utf8 & opq); ======================================================================== --- win32/monotone.iss 224c8d4c628b371305a2f632ae72284094e56a6f +++ win32/monotone.iss 4dec648d917bbaf562b0397ca210ba4790e44295