# # patch "cvs_repository.cc" # from [1341166c5e6095ae5a5d2e59768390e4c407f624] # to [4d78b9f5274c1348fa7ee650cfbcb2b7dddb22ce] # ======================================================================== --- cvs_repository.cc 1341166c5e6095ae5a5d2e59768390e4c407f624 +++ cvs_repository.cc 4d78b9f5274c1348fa7ee650cfbcb2b7dddb22ce @@ -665,7 +665,21 @@ } else { cvs_client::update u=Update(file,s->cvs_version,s2->cvs_version,s->keyword_substitution); - store_update(s,s2,u,contents); + try + { store_update(s,s2,u,contents); + } catch (std::exception &e) + { W(F("Update: patching failed with %s\n") % e.what()); + cvs_client::update c=Update(file,s2->cvs_version); + if (c.mod_time!=s2->since_when && c.mod_time!=-1 && s2->since_when!=sync_since) + { W(F("checkout time %ld and log time %ld disagree\n") % c.mod_time % s2->since_when); + } + const_cast(s2->md5sum)=""; + const_cast(s2->patchsize)=0; + store_contents(c.contents, const_cast&>(s2->sha1sum)); + const_cast(s2->size)=c.contents.size(); + contents=c.contents; + const_cast(s2->keyword_substitution)=c.keyword_substitution; + } } }