changeset 32495:a25cc3ca874f

local-clone: also copy tags related caches This caches provide 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:09:09 +0200
parents 53a67ba9fb44
children ca77a243ffa7
files mercurial/hg.py tests/test-tags.t
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Thu May 25 12:05:33 2017 +0200
+++ b/mercurial/hg.py	Thu May 25 12:09:09 2017 +0200
@@ -427,6 +427,9 @@
     cachefiles = ['branch2']
     cachefiles += ['branch2-%s' % f for f in repoview.filtertable]
     cachefiles += ['rbc-names-v1', 'rbc-revs-v1']
+    cachefiles += ['tags2']
+    cachefiles += ['tags2-%s' % f for f in repoview.filtertable]
+    cachefiles += ['hgtagsfnodes1']
     return cachefiles
 
 def clone(ui, peeropts, source, dest=None, pull=False, rev=None,
--- a/tests/test-tags.t	Thu May 25 12:05:33 2017 +0200
+++ b/tests/test-tags.t	Thu May 25 12:09:09 2017 +0200
@@ -724,3 +724,11 @@
       f63cc8fe54e4d326f8d692805d70e092f851ddb1
       40f0358cb314c824a5929ee527308d90e023bc10
   hgtagsfnodes -- 'sortdict()'
+
+Check that local clone includes cache data
+
+  $ hg clone tagsclient tags-local-clone
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ (cd tags-local-clone/.hg/cache/; ls -1 tag*)
+  tags2-visible