hgext/remotefilelog/shallowstore.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 03 Sep 2019 22:55:04 +0200
changeset 42983 a45d670c2bfc
parent 40495 3a333a582d7b
child 43076 2372284d9457
permissions -rw-r--r--
flagprocessors: return sidedata map in `_processflagsread` Right now, flag processors does not return sidedata, by they will. So, we prepare the caller to receive it. Differential Revision: https://phab.mercurial-scm.org/D6811

# shallowstore.py - shallow store for interacting with shallow repos
#
# Copyright 2013 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

def wrapstore(store):
    class shallowstore(store.__class__):
        def __contains__(self, path):
            # Assume it exists
            return True

    store.__class__ = shallowstore

    return store