# # patch "cvs_repository.cc" # from [153f8143972f22414fd4ba22c33fd3c9162b48e6] # to [a323db15d874bae244d3de10c5483f76e84a6ece] # # patch "cvs_sync.hh" # from [57791d6c63440f5b08ba5083bfd9b25203512f5e] # to [db114a878b2a309db023e78b7fb188d6fb8680e4] # ======================================================================== --- cvs_repository.cc 153f8143972f22414fd4ba22c33fd3c9162b48e6 +++ cvs_repository.cc a323db15d874bae244d3de10c5483f76e84a6ece @@ -1142,6 +1142,8 @@ std::string changelog; changelog="Monotone revision "+e.revision()+" author "+e.author +" time "+cvs_client::time_t2rfc822(e.time)+"\n\n"+e.changelog; + // gather information CVS does not know about into the changelog + changelog+=gather_merge_information(e.revision); std::map > result =Commit(changelog,e.time,commits); if (result.empty()) { fail=true; return edges.end(); } @@ -1185,6 +1187,47 @@ return edges.end(); } +std::string cvs_repository::gather_merge_information(revision_id const& id) +{ std::set parents; + app.db.get_revision_parents(id,parents); + std::string result; + for (std::set::const_iterator i=parents.begin();i!=parents.end();++i) + { std::vector< revision > certs; + app.db.get_revision_certs(*i,certs); + std::vector< revision >::const_iterator j=certs.begin(); + std::string to_match=host+":"+root+"\t"+module+"\n"; + for (;j!=certs.end();++j) + { if (j->inner().name()!=cvs_cert_name) continue; + cert_value value; + decode_base64(j->inner().value, value); + if (value().size()inner().value, value); + if (j->inner().name()==date_cert_name) + { date=cvs_repository::posix2time_t(value()); + } + else if (j->inner().name()==author_cert_name) + { author=value(); + } + else if (j->inner().name()==changelog_cert_name) + { changelog=value(); + } + } + result+="\n-------------------\n" + "Monotone revision "+i->inner()()+" author "+author + +" time "+cvs_client::time_t2rfc822(date)+"\n\n"+changelog; + } + return result; +} + void cvs_repository::commit() { retrieve_modules(); std::set::iterator now_iter=last_known_revision(); ======================================================================== --- cvs_sync.hh 57791d6c63440f5b08ba5083bfd9b25203512f5e +++ cvs_sync.hh db114a878b2a309db023e78b7fb188d6fb8680e4 @@ -156,6 +156,7 @@ void store_modules(); void retrieve_modules(); + std::string gather_merge_information(revision_id const& id); public: // semi public interface for push/pull void prime();