# # patch "cvs_client.cc" # from [46741ae8f1b432b3aa75f0f91d781f5b9d8aa875] # to [3f01fceeaeaac040e75b23798fd80630b957e655] # # patch "cvs_sync.cc" # from [bce8c59697a15e38ce19e850aaa7921a66d44b5a] # to [922dba57c9cc654c089c5257189d1dc4ab151156] # ======================================================================== --- cvs_client.cc 46741ae8f1b432b3aa75f0f91d781f5b9d8aa875 +++ cvs_client.cc 3f01fceeaeaac040e75b23798fd80630b957e655 @@ -1316,7 +1316,7 @@ writestr("Modified "+bname+"\n"); writestr("u=rw,g=r,o=r\n"); // standard mode // do _not_ translate this into locale format (e.g. F() ) - writestr((boost::format("%d\n") % i->new_content.size()).str()); + writestr(boost::lexical_cast(i->new_content.size())+"\n"); writestr(i->new_content); } } ======================================================================== --- cvs_sync.cc bce8c59697a15e38ce19e850aaa7921a66d44b5a +++ cvs_sync.cc 922dba57c9cc654c089c5257189d1dc4ab151156 @@ -293,10 +293,19 @@ 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 -{ L(F("prime_log_cb %s:%s %d %s %d %s\n") % file % revision % checkin_time +{ L(F("prime_log_cb %s:%s %s %s %d %s\n") % file % revision % time_t2human(checkin_time) % _author % _message.size() % dead); std::string author=_author; std::string message=_message; @@ -636,9 +645,9 @@ if (f->second.known_states.empty()) continue; if (!(*(f->second.known_states.begin()) <= (*e))) // the file does not exist yet (first is not below/equal current edge) - { L(F("%s before beginning %d/%d+%d\n") % f->first - % f->second.known_states.begin()->since_when - % e->time % (e->time2-e->time)); + { L(F("%s before beginning %s/%s+%d\n") % f->first + % time_t2human(f->second.known_states.begin()->since_when) + % time_t2human(e->time) % (e->time2-e->time)); continue; } cvs_manifest::iterator mi=current_manifest.find(f->first); @@ -651,9 +660,9 @@ && (*s2)<=(*e) && ( next_edge==edges.end() || ((*s2)<(*next_edge)) ); ++s2) - { L(F("%s matches %d/%d+%d\n") % f->first - % s2->since_when - % e->time % (e->time2-e->time)); + { L(F("%s matches %s/%s+%d\n") % f->first + % time_t2human(s2->since_when) + % time_t2human(e->time) % (e->time2-e->time)); s=s2; } @@ -1047,8 +1056,8 @@ return --(edges.end()); } std::string changelog; - changelog="Monotone revision "+e.revision()+" author "+e.author - +" time "+cvs_client::time_t2rfc822(e.time)+"\n\n"+e.changelog; + changelog=e+changelog+"\nmonotone "+e.author+" " + +cvs_client::time_t2rfc822(e.time)+" "+e.revision()+"\n"; // gather information CVS does not know about into the changelog changelog+=gather_merge_information(e.revision); std::map > result @@ -1546,7 +1555,7 @@ } const cvs_manifest &cvs_repository::get_files(const cvs_edge &e) -{ L(F("get_files(%d %s) %s %d\n") % e.time % e.revision % e.delta_base % e.xfiles.size()); +{ L(F("get_files(%s %s) %s %d\n") % time_t2human(e.time) % e.revision % e.delta_base % e.xfiles.size()); if (!e.delta_base.inner()().empty()) { cvs_manifest calculated_manifest; // this is non-recursive by reason ... @@ -1596,6 +1605,17 @@ std::cout << debug_manifest(repo.get_files(rid)); return; } + else if (command=="history") + { + std::string repository, module, branch; + + std::vector< revision > certs; + guess_repository(repository, module, branch, certs, app); + cvs_sync::cvs_repository repo(app,repository,module,branch,false); + repo.process_certs(certs); + std::cout << repo.debug(); + return; + } } const cvs_manifest &cvs_repository::get_files(const revision_id &rid)