# # patch "cvs_sync.cc" # from [ab204f462400c39bfaf387f0b3d44977934f98ff] # to [5a4503b4e009e72eca01a36e78852a30d710c62a] # ======================================================================== --- cvs_sync.cc ab204f462400c39bfaf387f0b3d44977934f98ff +++ cvs_sync.cc 5a4503b4e009e72eca01a36e78852a30d710c62a @@ -134,6 +134,15 @@ // cvs_repository ---------------------- +// very short form to output in logs etc. +std::string time_t2human(const time_t &t) +{ struct tm *tm; + tm=gmtime(&t); + return (boost::format("%02d%02d%02dT%02d%02d%02d") % (tm->tm_year%100) + % (tm->tm_mon+1) % tm->tm_mday % tm->tm_hour % tm->tm_min + % tm->tm_sec).str(); +} + struct cvs_repository::get_all_files_log_cb : rlog_callbacks { cvs_repository &repo; get_all_files_log_cb(cvs_repository &r) : repo(r) {} @@ -233,7 +242,7 @@ result+= "Edges :\n"; for (std::set::const_iterator i=edges.begin(); i!=edges.end();++i) - { result+= "[" + boost::lexical_cast(i->time); + { result+= "[" + time_t2human(i->time); if (i->time!=i->time2) result+= "+" + boost::lexical_cast(i->time2-i->time); if (!i->revision().empty()) result+= "," + i->revision().substr(0,4); if (!i->xfiles.empty()) @@ -293,15 +302,6 @@ tagslot[file]=revision; } -// very short form to -std::string time_t2human(const time_t &t) -{ struct tm *tm; - tm=gmtime(&t); - return (boost::format("%02d%02d%02dT%02d%02d%02d") % (tm->tm_year%100) - % (tm->tm_mon+1) % tm->tm_mday % tm->tm_hour % tm->tm_min - % tm->tm_sec).str(); -} - void cvs_repository::prime_log_cb::revision(const std::string &file,time_t checkin_time, const std::string &revision,const std::string &_author, const std::string &dead,const std::string &_message) const