diff mercurial/changegroup.py @ 32268:24f55686a63d

caches: stop warming the cache after changegroup application Now that we garantee that branchmap cache is updated at the end of the transaction we can drop this update. This removes a problematic case with nested transaction where the new cache could be written on disk before the transaction is finished (and even roll-backed) Such premature cache write was visible in the following test: * tests/test-acl.t * tests/test-rebase-conflicts.t In addition, running the cache update later means having more date about the state of the repository (in particular: phases). So we can generate caches with more information. This creates harmless changes to the following tests: * tests/test-hardlinks-whitelisted.t * tests/test-hardlinks.t * tests/test-phases.t * tests/test-tags.t * tests/test-inherit-mode.t
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 02 May 2017 18:57:52 +0200
parents c2380b448265
children df3cf9422e1b
line wrap: on
line diff
--- a/mercurial/changegroup.py	Tue May 02 22:27:44 2017 +0200
+++ b/mercurial/changegroup.py	Tue May 02 18:57:52 2017 +0200
@@ -20,7 +20,6 @@
 )
 
 from . import (
-    branchmap,
     dagutil,
     discovery,
     error,
@@ -404,12 +403,6 @@
                     phases.retractboundary(repo, tr, targetphase, added)
 
                 if changesets > 0:
-                    if srctype != 'strip':
-                        # During strip, branchcache is invalid but
-                        # coming call to `destroyed` will repair it.
-                        # In other case we can safely update cache on
-                        # disk.
-                        branchmap.updatecache(repo.filtered('served'))
 
                     def runhooks():
                         # These hooks run when the lock releases, not when the