Debian Codegraph @

hgext/remotefilelog/shallowstore.py

raw
1 # shallowstore.py - shallow store for interacting with shallow repos
2 #
3 # Copyright 2013 Facebook, Inc.
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
8 from __future__ import annotations
9
10
11 def wrapstore(store):
12 class shallowstore(store.__class__):
13 def __contains__(self, path):
14 # Assume it exists
15 return True
16
17 store.__class__ = shallowstore
18
19 return store