hgext/remotefilelog/shallowstore.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 01 Dec 2022 18:19:08 +0100
changeset 49830 e64b1e9f4892
parent 48966 6000f5b25c9b
permissions -rw-r--r--
path: pass `path` to `peer` in `hg incoming` We directly use the `path` object to build the `peer` object. We don't use it for sub-repositories yet, which will have to be fixed at some point.

# 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.


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

    store.__class__ = shallowstore

    return store