local-clone: also copy revs-branch-cache files
This cache provides a large speedup for some repositories. Keeping it around is
valuable.
--- 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