changeset 32527:53a67ba9fb44

local-clone: also copy revs-branch-cache files This cache provides a large speedup for some repositories. Keeping it around is valuable.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 25 May 2017 12:05:33 +0200
parents 3c8a71a8df11
children a25cc3ca874f
files mercurial/hg.py tests/test-clone.t
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Thu May 25 11:59:07 2017 +0200
+++ b/mercurial/hg.py	Thu May 25 12:05:33 2017 +0200
@@ -425,7 +425,8 @@
     # In local clones we're copying all nodes, not just served
     # ones. Therefore copy all branch caches over.
     cachefiles = ['branch2']
-    cachefiles.extend('branch2-%s' % f for f in repoview.filtertable)
+    cachefiles += ['branch2-%s' % f for f in repoview.filtertable]
+    cachefiles += ['rbc-names-v1', 'rbc-revs-v1']
     return cachefiles
 
 def clone(ui, peeropts, source, dest=None, pull=False, rev=None,
--- a/tests/test-clone.t	Thu May 25 11:59:07 2017 +0200
+++ b/tests/test-clone.t	Thu May 25 12:05:33 2017 +0200
@@ -52,6 +52,8 @@
   checkisexec (execbit !)
   checklink (symlink !)
   checklink-target (symlink !)
+  rbc-names-v1
+  rbc-revs-v1
 
   $ cat a
   a
@@ -99,6 +101,8 @@
 
   $ ls .hg/cache
   branch2-served
+  rbc-names-v1
+  rbc-revs-v1
 
   $ cat a 2>/dev/null || echo "a not present"
   a not present