sapling/mercurial/sparse.py
Adam Simpkins 640d8f6565 restore part of the mercurial.sparse module
Summary:
D12811551 removed the mercurial.sparse module.  However, actual removal of the
module needs to wait until the changes to the eden dirstate extension get
deployed.

This restores the module until all of the Eden changes have been deployed.
This module only contains a dummy `matcher()` function, which is the only part
of the module that Eden referenced.

This was causing exceptions for users with the a mercurial release from today,
but an Eden release from yesterday.  The exception would normally only occur
when using chg, since chg disables lazyimport.  Without chg, lazyimport would
allow the import to succeed even though the module does not exist.

Reviewed By: DurhamG

Differential Revision: D12877889

fbshipit-source-id: 2c6afd9bcb7031727b40fd32fbc1ba1356eb6e9b
2018-10-31 19:48:30 -07:00

19 lines
625 B
Python

# sparse.py - functionality for sparse checkouts
#
# Copyright 2014 Facebook, Inc.
#
# 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 match as matchmod
# This function is not used in mercurial any more.
# However, we still deploy a dummy implementation for now until we have finished
# rolling out updates to external modules (such as the Eden dirstate) that still
# reference this function.
def matcher(repo, revs=None, includetemp=True):
return matchmod.always(repo.root, "")