# # patch "cvs_repository.cc" # from [ec9325ea23dd87e5d8b6aee20db2a03db61fc2fc] # to [db3d8b176fbf65ffed77181ce884b5e3e82ada12] # # patch "tests/t_cvspull_separate.at" # from [4dc62615cdad3133e2755884fdc3a6d11b723fec] # to [bafa3d35bb2b9ad068560e8dca98d77444f6a348] # --- cvs_repository.cc +++ cvs_repository.cc @@ -1331,6 +1331,28 @@ revision_lookup[e.revision]=edges.insert(e).first; } } + // because some manifests might have been absolute (not delta encoded) + // we possibly did not notice removes. check for them + std::set::const_iterator last=edges.end(); + for (std::set::const_iterator i=edges.begin(); + i!=edges.end();++i) + { if (last!=edges.end() && i->delta_base.inner()().empty()) + { cvs_manifest old=get_files(*last),new_m=get_files(*i); + for (cvs_manifest::iterator j=old.begin();j!=old.end();++j) + { cvs_manifest::iterator new_iter=new_m.find(j->first); + if (new_iter==new_m.end()) // this file get's removed here + { file_state fs; + fs.since_when=i->time; + fs.log_msg=i->changelog; + fs.author=i->author; + fs.dead=true; + L(F("file %s gets removed at %s\n") % j->first % i->revision()); + remember(files[j->first].known_states,fs); + } + } + } + last=i; + } if (global_sanity.debug) L(F("%s") % debug()); } @@ -1426,8 +1448,12 @@ ++dummy_iter; join_edge_parts(dummy_iter); +// if (global_sanity.debug) +// std::cerr << debug(); fill_manifests(dummy_iter); - if (global_sanity.debug) L(F("%s") % debug()); + if (global_sanity.debug) +// std::cerr << debug(); + L(F("%s") % debug()); commit_revisions(dummy_iter); } --- tests/t_cvspull_separate.at +++ tests/t_cvspull_separate.at @@ -56,7 +56,7 @@ AT_CHECK(cp d_change test/B) AT_CHECK([cd test;sleep 1;cvs -Q ci -m 'B changed']) -AT_CHECK(echo MONOTONE --branch=testbranch cvs_pull, [0], [ignore], [ignore]) +AT_CHECK(MONOTONE --branch=testbranch cvs_pull, [0], [ignore], [ignore]) AT_CHECK(mkdir test/dir) AT_CHECK([cd test;cvs -Q add dir])