# # patch "CVS_prot" # from [5c4e814048b5ea7204737d379834fdc754e44041] # to [69a5a850f895215cfd978673389e2e1edcfbc06e] # # patch "cvs_client.cc" # from [8913b3b4b228d8f5282ed03611772e8ea001bd7d] # to [6125cb5e67f1cb877f47744dd54b1a64795bb3dc] # # patch "cvs_client.hh" # from [3dd50d9c26c5da9c25424524266654257d8820a6] # to [e2dcc908c5e48b7db93d1b36df9796d87f0cb5d3] # # patch "cvs_sync.cc" # from [4251b3e625109f6b02a7d705c4994548fc9f77f9] # to [f7e191205f465fb1a4bfe06fccccb348cb443827] # # patch "tests/t_cvspull_cvsbranch.at" # from [b1d9ee4d6113f58d9511e31e3e8e88e4360d55d7] # to [b89bed1bc2c4694199356f414b65cb1afca18b82] # ======================================================================== --- CVS_prot 5c4e814048b5ea7204737d379834fdc754e44041 +++ CVS_prot 69a5a850f895215cfd978673389e2e1edcfbc06e @@ -133,5 +133,3 @@ correct < when calculating manifests push: changelog on merge faster initial db-access (multimap? without timestamp access?) -prepare --direction -$Id$ ! ======================================================================== --- cvs_client.cc 8913b3b4b228d8f5282ed03611772e8ea001bd7d +++ cvs_client.cc 6125cb5e67f1cb877f47744dd54b1a64795bb3dc @@ -715,6 +715,20 @@ processLogOutput(cb); } +void cvs_client::Log_internal(const rlog_callbacks &cb,const std::string &file, + std::vector const &args) +{ Directory(dirname(std::string(file))); + std::string bname=basename(std::string(file)); + writestr("Entry /"+bname+"/1.1.1.1//-kb/\n"); + writestr("Unchanged "+bname+"\n"); + for (std::vector::const_iterator i=args.begin();i!=args.end();++i) + writestr("Argument "+*i+"\n"); + writestr("Argument --\n" + "Argument "+bname+"\n" + "log\n"); + processLogOutput(cb); +} + void cvs_client::Log(const rlog_callbacks &cb,const char *file,...) { primeModules(); va_list ap,ap2; @@ -730,6 +744,12 @@ va_end(ap); } +void cvs_client::Log(const rlog_callbacks &cb,std::string const& file, + std::vector const& args) +{ primeModules(); + Log_internal(cb,file,args); +} + // dummy is needed to satisfy va_start (cannot pass objects of non-POD type) void cvs_client::RLog(const rlog_callbacks &cb,bool dummy,...) { primeModules(); ======================================================================== --- cvs_client.hh 3dd50d9c26c5da9c25424524266654257d8820a6 +++ cvs_client.hh e2dcc908c5e48b7db93d1b36df9796d87f0cb5d3 @@ -102,6 +102,8 @@ void processLogOutput(const rlog_callbacks &cb); void connect(); void primeModules(); + void Log_internal(const rlog_callbacks &cb,const std::string &file, + std::vector const &args); void Log_internal(const rlog_callbacks &cb,const std::string &file,va_list ap); void writestr(const std::string &s, bool flush=false); @@ -147,6 +149,8 @@ void RLog(const rlog_callbacks &cb,bool dummy,...); void Log(const rlog_callbacks &cb,const char *file,...); + void Log(const rlog_callbacks &cb,const std::string &file, + std::vector const &args); void RList(const rlist_callbacks &cb,bool dummy,...); struct checkout CheckOut(const std::string &file, const std::string &revision); struct update Update(const std::string &file, ======================================================================== --- cvs_sync.cc 4251b3e625109f6b02a7d705c4994548fc9f77f9 +++ cvs_sync.cc f7e191205f465fb1a4bfe06fccccb348cb443827 @@ -898,19 +898,31 @@ revision_ticker.reset(0); cvs_edges_ticker.reset(new ticker("edges", "E", 10)); for (std::map::iterator i=files.begin();i!=files.end();++i) - { // -d D< (sync_since) + { std::vector args; + + if (!branch.empty()) + { args.push_back("-r"); + args.push_back(branch); + } if (sync_since!=-1) - { Log(prime_log_cb(*this,i,sync_since),i->first.c_str(), - "-d",(time_t2rfc822(sync_since)).c_str(), - "-b",(void*)0); - Log(prime_log_cb(*this,i),i->first.c_str(), - "-d",(time_t2rfc822(sync_since)+"<").c_str(), - "-b",(void*)0); + { args.push_back("-d"); + size_t date_index=args.size(); + args.push_back(time_t2rfc822(sync_since)); + args.push_back("-b"); + // state _at_ this point in time + Log(prime_log_cb(*this,i,sync_since),i->first,args); + // -d Jun 20 09:38:29 1997< + args[date_index]+='<'; + // state _since_ this point in time + Log(prime_log_cb(*this,i,sync_since),i->first,args); } - else Log(prime_log_cb(*this,i),i->first.c_str(),"-b",(void*)0); + else + { args.push_back("-b"); + Log(prime_log_cb(*this,i),i->first,args); + } } // remove duplicate states (because some edges were added by the - // get_all_files method + // get_all_files method) for (std::set::iterator i=edges.begin();i!=edges.end();) { if (i->changelog_valid || i->author.size()) { ++i; continue; } std::set::iterator j=i; @@ -918,7 +930,6 @@ I(j!=edges.end()); I(j->time==i->time); I(i->xfiles.empty()); -// I(i->revision.empty()); edges.erase(i); if (cvs_edges_ticker.get()) --(*cvs_edges_ticker); i=j; ======================================================================== --- tests/t_cvspull_cvsbranch.at b1d9ee4d6113f58d9511e31e3e8e88e4360d55d7 +++ tests/t_cvspull_cvsbranch.at b89bed1bc2c4694199356f414b65cb1afca18b82 @@ -43,7 +43,7 @@ AT_CHECK([cd test;cvs -Q add B]) AT_CHECK([sleep 1;cd test;cvs -Q ci -m 'B added to HEAD']) -AT_CHECK([cd test;cvs update -r branch]) +AT_CHECK([cd test;cvs update -r branch], [], [ignore], [ignore]) AT_CHECK([cd test;cvs -Q delete -f A]) AT_CHECK([cd test;sleep 1;cvs -Q ci -m 'A removed'])