mercurial/cacheutil.py
author Yuya Nishihara <yuya@tcha.org>
Sat, 01 Sep 2018 10:13:48 +0900
changeset 39411 722eab64f1ed
parent 35766 72fdd99eb526
child 43075 57875cf423c9
permissions -rw-r--r--
test-check-py3-compat: exclude thirdparty and cffi which are known to fail Otherwise the following errors would be spilled out: mercurial/cffi/bdiff.py: error importing: <ImportError> cannot import name '_bdiff' (error at bdiff.py:*) mercurial/cffi/bdiffbuild.py: error importing: <ModuleNotFoundError> No module named 'cffi' (error at bdiffbuild.py:*) mercurial/cffi/mpatch.py: error importing: <ImportError> cannot import name '_mpatch' (error at mpatch.py:*) mercurial/cffi/mpatchbuild.py: error importing: <ModuleNotFoundError> No module named 'cffi' (error at mpatchbuild.py:*) mercurial/cffi/osutilbuild.py: error importing: <ModuleNotFoundError> No module named 'cffi' (error at osutilbuild.py:*) mercurial/thirdparty/concurrent/futures/_base.py: invalid syntax: invalid syntax (<unknown>, line *) mercurial/thirdparty/concurrent/futures/process.py: error importing: <SyntaxError> invalid syntax (_base.py, line 416) (error at __init__.py:*) mercurial/thirdparty/concurrent/futures/thread.py: error importing: <SyntaxError> invalid syntax (_base.py, line 416) (error at __init__.py:*) mercurial/thirdparty/zope/interface/_flatten.py: error importing: <ImportError> cannot import name 'Declaration' (error at _flatten.py:*) Some of them can be suppressed by building cffi modules for example, but I don't think it's worth keeping these modules covered by the compatibility checker.

# scmutil.py - Mercurial core utility functions
#
#  Copyright Matt Mackall <mpm@selenic.com> and other
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from __future__ import absolute_import

from . import repoview

def cachetocopy(srcrepo):
    """return the list of cache file valuable to copy during a clone"""
    # In local clones we're copying all nodes, not just served
    # ones. Therefore copy all branch caches over.
    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