mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
clfilter: introduce an unfilteredmethod
decorator
This decorator ensure the method in run on an unfiltered version of the repository. See follow-up commit for details. This decorator is not named `unfiltered` because it would clash with the `unfilteredmethod` on `localrepo` itself.
This commit is contained in:
parent
8d8e5b22ad
commit
edc0b7dbec
@ -23,6 +23,12 @@ class storecache(filecache):
|
||||
def join(self, obj, fname):
|
||||
return obj.sjoin(fname)
|
||||
|
||||
def unfilteredmeth(orig):
|
||||
"""decorate method that always need to be run on unfiltered version"""
|
||||
def wrapper(repo, *args, **kwargs):
|
||||
return orig(repo.unfiltered(), *args, **kwargs)
|
||||
return wrapper
|
||||
|
||||
MODERNCAPS = set(('lookup', 'branchmap', 'pushkey', 'known', 'getbundle'))
|
||||
LEGACYCAPS = MODERNCAPS.union(set(['changegroupsubset']))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user