hgext/remotefilelog/shallowstore.py
changeset 40495 3a333a582d7b
child 43076 2372284d9457
equal deleted inserted replaced
40494:9aeb9e2d28a7 40495:3a333a582d7b
       
     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 from __future__ import absolute_import
       
     8 
       
     9 def wrapstore(store):
       
    10     class shallowstore(store.__class__):
       
    11         def __contains__(self, path):
       
    12             # Assume it exists
       
    13             return True
       
    14 
       
    15     store.__class__ = shallowstore
       
    16 
       
    17     return store