# # patch "cvs_repository.cc" # from [693c8b52527a34e9e396e8dfbac1e7398995ccf3] # to [6930847d915bd080831644a613f1329ab3b1f6c2] # # patch "cvs_sync.hh" # from [9997b9e12dbb03e90b1f66bac82afedea7572a86] # to [b852d8f7d21d71de9f3e0460b953855f7e3a97c1] # --- cvs_repository.cc +++ cvs_repository.cc @@ -52,10 +52,18 @@ using namespace cvs_sync; +#if 0 std::ostream &operator<<(std::ostream &o, const file_state &f) { return o << f.since_when << ' ' << f.cvs_version << ' ' << f.dead; } +#endif +bool file_state::operator<(const file_state &b) const +{ return since_when const & source, vector< piece > & dest, vector< piece >::const_iterator & i, @@ -173,6 +181,11 @@ { return parts==b.parts; } +// is this strictly correct? feels ok for now (and this is last ressort) +bool cvs_revision_nr::operator<(const cvs_revision_nr &b) const +{ return parts(*(iter.first)); fs.log_msg=message; + fs.author=author; std::pair::iterator,bool> iter2= repo.edges.insert(cvs_edge(message,checkin_time,author)); if (iter2.second && repo.cvs_edges_ticker.get()) ++(*repo.cvs_edges_ticker); @@ -1049,6 +1063,7 @@ else { file_state fs(e.time,i->second.first); fs.log_msg=e.changelog; + fs.author=e.author; fs.keyword_substitution=i->second.second; change_set::delta_map::const_iterator mydelta=cs.deltas.find(i->first); I(mydelta!=cs.deltas.end()); @@ -1274,6 +1289,7 @@ I(iter_file_id!=manifest.end()); fs.sha1sum=iter_file_id->second.inner(); fs.log_msg=e.changelog; + fs.author=e.author; cvs_file_state cfs=remember(files[path].known_states,fs); e.xfiles.insert(std::make_pair(path,cfs)); } --- cvs_sync.hh +++ cvs_sync.hh @@ -23,6 +23,7 @@ bool is_branch() const; bool is_parent_of(const cvs_revision_nr &child) const; bool operator==(const cvs_revision_nr &b) const; + bool operator<(const cvs_revision_nr &b) const; }; struct file_state @@ -34,15 +35,15 @@ std::string md5sum; hexenc sha1sum; // make this a file_id std::string log_msg; + std::string author; std::string keyword_substitution; file_state() : since_when(), size(), patchsize(), dead() {} file_state(time_t sw,const std::string &rev,bool d=false) : since_when(sw), cvs_version(rev), size(), patchsize(), dead(d) {} bool operator==(const file_state &b) const - { return since_when==b.since_when; } - bool operator<(const file_state &b) const - { return since_when