Mercurial > public > mercurial-scm > hg
comparison mercurial/cacheutil.py @ 35766:72fdd99eb526
caches: make 'cachetocopy' available in scmutil
For more code to use this information, we need it to be more publicly available.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 17 Jan 2018 17:46:49 +0100 |
parents | |
children | 57875cf423c9 |
comparison
equal
deleted
inserted
replaced
35765:56c30b31afbe | 35766:72fdd99eb526 |
---|---|
1 # scmutil.py - Mercurial core utility functions | |
2 # | |
3 # Copyright Matt Mackall <mpm@selenic.com> and other | |
4 # | |
5 # This software may be used and distributed according to the terms of the | |
6 # GNU General Public License version 2 or any later version. | |
7 from __future__ import absolute_import | |
8 | |
9 from . import repoview | |
10 | |
11 def cachetocopy(srcrepo): | |
12 """return the list of cache file valuable to copy during a clone""" | |
13 # In local clones we're copying all nodes, not just served | |
14 # ones. Therefore copy all branch caches over. | |
15 cachefiles = ['branch2'] | |
16 cachefiles += ['branch2-%s' % f for f in repoview.filtertable] | |
17 cachefiles += ['rbc-names-v1', 'rbc-revs-v1'] | |
18 cachefiles += ['tags2'] | |
19 cachefiles += ['tags2-%s' % f for f in repoview.filtertable] | |
20 cachefiles += ['hgtagsfnodes1'] | |
21 return cachefiles |