diff mercurial/streamclone.py @ 41626:328ca3b9e545

branchmap: encapsulate cache updating in the map itself Rather than have a repository update the cache, move handling of cache updates into the branchmap module, in the form of a custom mapping class. This makes later performance improvements easier to handle too. Differential Revision: https://phab.mercurial-scm.org/D5638
author Martijn Pieters <mj@octobus.net>
date Mon, 21 Jan 2019 17:37:33 +0000
parents 9aeb9e2d28a7
children 268662aac075
line wrap: on
line diff
--- a/mercurial/streamclone.py	Thu Feb 07 21:16:25 2019 -0800
+++ b/mercurial/streamclone.py	Mon Jan 21 17:37:33 2019 +0000
@@ -13,7 +13,6 @@
 
 from .i18n import _
 from . import (
-    branchmap,
     cacheutil,
     error,
     narrowspec,
@@ -174,7 +173,7 @@
         repo._writerequirements()
 
         if rbranchmap:
-            branchmap.replacecache(repo, rbranchmap)
+            repo._branchcaches.replace(repo, rbranchmap)
 
         repo.invalidate()