mirror of
https://github.com/facebook/sapling.git
synced 2025-01-07 14:10:42 +03:00
sparse: add back sparse.py
Summary: Some consumers still rely on enabling 'sparse=' so let's add a module that just redirects to the real fbsparse.py. Also updates configerator to use the newer name. Reviewed By: markbt, quark-zju Differential Revision: D6755971 fbshipit-source-id: 3a67f029045dacf927742a616a714fe632b97fea
This commit is contained in:
parent
97dfe79221
commit
a99b9eb0c2
34
hgext/sparse.py
Normal file
34
hgext/sparse.py
Normal file
@ -0,0 +1,34 @@
|
||||
# sparse.py - shim that redirects to load fbsparse
|
||||
#
|
||||
# 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.
|
||||
"""allow sparse checkouts of the working directory
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
from hgext import fbsparse
|
||||
|
||||
cmdtable = fbsparse.cmdtable.copy()
|
||||
|
||||
def _fbsparseexists(ui):
|
||||
with ui.configoverride({("devel", "all-warnings"): False}):
|
||||
return not ui.config('extensions', 'fbsparse', '!').startswith('!')
|
||||
|
||||
def uisetup(ui):
|
||||
if _fbsparseexists(ui):
|
||||
cmdtable.clear()
|
||||
return
|
||||
fbsparse.uisetup(ui)
|
||||
|
||||
def extsetup(ui):
|
||||
if _fbsparseexists(ui):
|
||||
cmdtable.clear()
|
||||
return
|
||||
fbsparse.extsetup(ui)
|
||||
|
||||
def reposetup(ui, repo):
|
||||
if _fbsparseexists(ui):
|
||||
return
|
||||
fbsparse.reposetup(ui, repo)
|
@ -45,6 +45,7 @@ New errors are not allowed. Warnings are strongly discouraged.
|
||||
|
||||
$ testrepohg files "set:(**.py or **.txt) - tests/**" | sed 's|\\|/|g' |
|
||||
> $PYTHON contrib/check-config.py
|
||||
undocumented: extensions.fbsparse (str) ['!']
|
||||
undocumented: extensions.treemanifest (str)
|
||||
undocumented: fastlog.debug (str)
|
||||
undocumented: fastlog.enabled (bool)
|
||||
|
Loading…
Reference in New Issue
Block a user