# # # patch "mtn_cvs/cvs_sync.cc" # from [9b8caf467cd89e5b6f37c5379491bfc435c17229] # to [8cbe13916caf7c3d0db0c8a59e34ce40f2536736] # # patch "mtn_cvs/tests/pull_separate/__driver__.lua" # from [95815ffe6fb197f2ccb7437ed5a27c00e626ce91] # to [085407502eba438ff052f0af42d82999e5100e87] # ============================================================ --- mtn_cvs/cvs_sync.cc 9b8caf467cd89e5b6f37c5379491bfc435c17229 +++ mtn_cvs/cvs_sync.cc 8cbe13916caf7c3d0db0c8a59e34ce40f2536736 @@ -1451,6 +1451,8 @@ void cvs_repository::process_sync_info(m fs.sha1sum=i->second.first; if (fs.sha1sum.inner()().empty()) continue; // directory node + I(!fs.cvs_version.empty()); + I(fs.cvssha1sum == fs.sha1sum.inner()().substr(0,6)); fs.log_msg=e.changelog; fs.author=e.author; std::string path=file_path(i->first).as_internal(); @@ -1516,6 +1518,22 @@ void cvs_repository::update() std::vector results; const cvs_manifest &m=get_files(now); file_revisions.reserve(m.size()); + +#warning Turn this strict sync checking into an option + if (true) + { + for (cvs_manifest::const_iterator i=m.begin();i!=m.end();++i) + { + std::string file_contents; + file_id cvs_sha1sum, mtn_sha1sum(i->second->sha1sum); + std::cerr << "checking sync on file: " << i->first << std::endl; + cvs_client::update c=Update(i->first,i->second->cvs_version); + store_checkout(i->second,c,file_contents); + calculate_ident(file_data(file_contents), cvs_sha1sum); + I(cvs_sha1sum == mtn_sha1sum); + } + } + // #warning FIXME: changed files for (cvs_manifest::const_iterator i=m.begin();i!=m.end();++i) file_revisions.push_back(update_args(i->first,i->second->cvs_version, ============================================================ --- mtn_cvs/tests/pull_separate/__driver__.lua 95815ffe6fb197f2ccb7437ed5a27c00e626ce91 +++ mtn_cvs/tests/pull_separate/__driver__.lua 085407502eba438ff052f0af42d82999e5100e87 @@ -66,3 +66,5 @@ check(sha1("mtcodir/dir/D") == tsha3) check(sha1("mtcodir/A") == tsha4) check(sha1("mtcodir/B") == tsha2) check(sha1("mtcodir/dir/D") == tsha3) + +-- check(false)