tests/test-check-interfaces.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Fri, 01 Oct 2021 18:52:26 +0200
changeset 48125 de793f249852
parent 47077 119790e1c67c
child 48526 04688c51f81f
permissions -rw-r--r--
dirstatemap: create `_dirs_incr/_dirs_decr` methods on the common class The Rust wrapper does not need them. However having a default, no-op, implementation will help use to write code used by both implementation. Differential Revision: https://phab.mercurial-scm.org/D11570
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33807
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     1
# Test that certain objects conform to well-defined interfaces.
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     2
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     3
from __future__ import absolute_import, print_function
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     4
37810
856f381ad74b interfaceutil: module to stub out zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37635
diff changeset
     5
from mercurial import encoding
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
     6
37810
856f381ad74b interfaceutil: module to stub out zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37635
diff changeset
     7
encoding.environ[b'HGREALINTERFACES'] = b'1'
856f381ad74b interfaceutil: module to stub out zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37635
diff changeset
     8
37181
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
     9
import os
37814
265c122b69aa tests: mark test-check-interfaces.py as requiring a repo
Martin von Zweigbergk <martinvonz@google.com>
parents: 37810
diff changeset
    10
import subprocess
265c122b69aa tests: mark test-check-interfaces.py as requiring a repo
Martin von Zweigbergk <martinvonz@google.com>
parents: 37810
diff changeset
    11
import sys
265c122b69aa tests: mark test-check-interfaces.py as requiring a repo
Martin von Zweigbergk <martinvonz@google.com>
parents: 37810
diff changeset
    12
265c122b69aa tests: mark test-check-interfaces.py as requiring a repo
Martin von Zweigbergk <martinvonz@google.com>
parents: 37810
diff changeset
    13
# Only run if tests are run in a repo
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
    14
if subprocess.call(
46176
300f6e23882a test-check-interface: do not expect bare "python" executable exists
Yuya Nishihara <yuya@tcha.org>
parents: 44664
diff changeset
    15
    [sys.executable, '%s/hghave' % os.environ['TESTDIR'], 'test-repo']
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
    16
):
37814
265c122b69aa tests: mark test-check-interfaces.py as requiring a repo
Martin von Zweigbergk <martinvonz@google.com>
parents: 37810
diff changeset
    17
    sys.exit(80)
37181
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    18
42813
268662aac075 interfaces: create a new folder for interfaces and move repository.py in it
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41159
diff changeset
    19
from mercurial.interfaces import (
42927
d459cd8ea42d interfaces: introduce an interface for dirstate implementations
Augie Fackler <augie@google.com>
parents: 42813
diff changeset
    20
    dirstate as intdirstate,
42813
268662aac075 interfaces: create a new folder for interfaces and move repository.py in it
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41159
diff changeset
    21
    repository,
268662aac075 interfaces: create a new folder for interfaces and move repository.py in it
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41159
diff changeset
    22
)
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
    23
from mercurial.thirdparty.zope import interface as zi
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
    24
from mercurial.thirdparty.zope.interface import verify as ziverify
33807
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    25
from mercurial import (
34307
afcbc6f64d27 tests: add interface checks for bundle, statichttp, and union peers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33807
diff changeset
    26
    bundlerepo,
42927
d459cd8ea42d interfaces: introduce an interface for dirstate implementations
Augie Fackler <augie@google.com>
parents: 42813
diff changeset
    27
    dirstate,
37441
a3202fa83aff filelog: declare that filelog implements a storage interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37320
diff changeset
    28
    filelog,
33807
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    29
    httppeer,
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    30
    localrepo,
38530
c82ea938efbb repository: define manifest interfaces
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37870
diff changeset
    31
    manifest,
37870
39c17718f311 tests: make test-check-interfaces.py work on Python 3
Augie Fackler <augie@google.com>
parents: 37814
diff changeset
    32
    pycompat,
39231
b41d023a412a repository: establish API for emitting revision deltas
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39230
diff changeset
    33
    revlog,
33807
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    34
    sshpeer,
34307
afcbc6f64d27 tests: add interface checks for bundle, statichttp, and union peers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33807
diff changeset
    35
    statichttprepo,
33807
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    36
    ui as uimod,
34307
afcbc6f64d27 tests: add interface checks for bundle, statichttp, and union peers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33807
diff changeset
    37
    unionrepo,
37441
a3202fa83aff filelog: declare that filelog implements a storage interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37320
diff changeset
    38
    vfs as vfsmod,
37296
78103e4138b1 wireproto: port protocol handler to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37181
diff changeset
    39
    wireprotoserver,
78103e4138b1 wireproto: port protocol handler to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37181
diff changeset
    40
    wireprototypes,
37630
e1b32dc4646c wireproto: implement command executor interface for version 1 peers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37611
diff changeset
    41
    wireprotov1peer,
37545
93397c4633f6 wireproto: extract HTTP version 2 code to own module
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37441
diff changeset
    42
    wireprotov2server,
33807
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    43
)
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    44
41159
23d5e03dad70 tests: add simplestorerepo to test-check-interfaces.py
Augie Fackler <augie@google.com>
parents: 41038
diff changeset
    45
testdir = os.path.dirname(__file__)
23d5e03dad70 tests: add simplestorerepo to test-check-interfaces.py
Augie Fackler <augie@google.com>
parents: 41038
diff changeset
    46
rootdir = pycompat.fsencode(os.path.normpath(os.path.join(testdir, '..')))
23d5e03dad70 tests: add simplestorerepo to test-check-interfaces.py
Augie Fackler <augie@google.com>
parents: 41038
diff changeset
    47
23d5e03dad70 tests: add simplestorerepo to test-check-interfaces.py
Augie Fackler <augie@google.com>
parents: 41038
diff changeset
    48
sys.path[0:0] = [testdir]
23d5e03dad70 tests: add simplestorerepo to test-check-interfaces.py
Augie Fackler <augie@google.com>
parents: 41038
diff changeset
    49
import simplestorerepo
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
    50
41159
23d5e03dad70 tests: add simplestorerepo to test-check-interfaces.py
Augie Fackler <augie@google.com>
parents: 41038
diff changeset
    51
del sys.path[0]
37181
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    52
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
    53
37441
a3202fa83aff filelog: declare that filelog implements a storage interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37320
diff changeset
    54
def checkzobject(o, allowextra=False):
37181
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    55
    """Verify an object with a zope interface."""
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    56
    ifaces = zi.providedBy(o)
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    57
    if not ifaces:
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    58
        print('%r does not provide any zope interfaces' % o)
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    59
        return
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    60
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    61
    # Run zope.interface's built-in verification routine. This verifies that
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    62
    # everything that is supposed to be present is present.
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    63
    for iface in ifaces:
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    64
        ziverify.verifyObject(iface, o)
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    65
37441
a3202fa83aff filelog: declare that filelog implements a storage interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37320
diff changeset
    66
    if allowextra:
a3202fa83aff filelog: declare that filelog implements a storage interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37320
diff changeset
    67
        return
a3202fa83aff filelog: declare that filelog implements a storage interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37320
diff changeset
    68
37181
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    69
    # Now verify that the object provides no extra public attributes that
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    70
    # aren't declared as part of interfaces.
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    71
    allowed = set()
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    72
    for iface in ifaces:
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    73
        allowed |= set(iface.names(all=True))
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    74
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    75
    public = {a for a in dir(o) if not a.startswith('_')}
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    76
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    77
    for attr in sorted(public - allowed):
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
    78
        print(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
    79
            'public attribute not declared in interfaces: %s.%s'
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
    80
            % (o.__class__.__name__, attr)
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
    81
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
    82
37181
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
    83
33807
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    84
# Facilitates testing localpeer.
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    85
class dummyrepo(object):
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    86
    def __init__(self):
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    87
        self.ui = uimod.ui()
46713
bc2519513ae0 sidedata-exchange: add `wanted_sidedata` and `sidedata_computers` to repos
Raphaël Gomès <rgomes@octobus.net>
parents: 46711
diff changeset
    88
        self._wanted_sidedata = set()
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
    89
33807
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    90
    def filtered(self, name):
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    91
        pass
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
    92
33807
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    93
    def _restrictcapabilities(self, caps):
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    94
        pass
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    95
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
    96
37006
8e89c2bec1f7 httppeer: refactor how httppeer is created (API)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36370
diff changeset
    97
class dummyopener(object):
8e89c2bec1f7 httppeer: refactor how httppeer is created (API)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36370
diff changeset
    98
    handlers = []
8e89c2bec1f7 httppeer: refactor how httppeer is created (API)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36370
diff changeset
    99
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   100
37552
8b8a845c85fc httppeer: perform capabilities request in makepeer()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37547
diff changeset
   101
# Facilitates testing sshpeer without requiring a server.
33807
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   102
class badpeer(httppeer.httppeer):
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   103
    def __init__(self):
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   104
        super(badpeer, self).__init__(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   105
            None, None, None, dummyopener(), None, None
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   106
        )
33807
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   107
        self.badattribute = True
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   108
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   109
    def badmethod(self):
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   110
        pass
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   111
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   112
36370
11ba1a96f946 sshpeer: defer pipe buffering and stderr sidechannel binding
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35978
diff changeset
   113
class dummypipe(object):
11ba1a96f946 sshpeer: defer pipe buffering and stderr sidechannel binding
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35978
diff changeset
   114
    def close(self):
11ba1a96f946 sshpeer: defer pipe buffering and stderr sidechannel binding
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35978
diff changeset
   115
        pass
11ba1a96f946 sshpeer: defer pipe buffering and stderr sidechannel binding
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35978
diff changeset
   116
46660
0738bc25d6ac sshpeer: add a method to check if a doublepipe is closed
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 46176
diff changeset
   117
    @property
0738bc25d6ac sshpeer: add a method to check if a doublepipe is closed
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 46176
diff changeset
   118
    def closed(self):
0738bc25d6ac sshpeer: add a method to check if a doublepipe is closed
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 46176
diff changeset
   119
        pass
0738bc25d6ac sshpeer: add a method to check if a doublepipe is closed
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 46176
diff changeset
   120
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   121
33807
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   122
def main():
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   123
    ui = uimod.ui()
37181
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
   124
    # Needed so we can open a local repo with obsstore without a warning.
40153
0ae20d2141ed py3: use b'' in test-check-interfaces.py
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39866
diff changeset
   125
    ui.setconfig(b'experimental', b'evolution.createmarkers', True)
33807
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   126
37320
39f7d4ee8bcd repository: port peer interfaces to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37296
diff changeset
   127
    checkzobject(badpeer())
39f7d4ee8bcd repository: port peer interfaces to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37296
diff changeset
   128
37635
cc8c06835097 wireproto: convert legacy commands to command executor
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37630
diff changeset
   129
    ziverify.verifyClass(repository.ipeerbase, httppeer.httppeer)
37552
8b8a845c85fc httppeer: perform capabilities request in makepeer()
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37547
diff changeset
   130
    checkzobject(httppeer.httppeer(None, None, None, dummyopener(), None, None))
37320
39f7d4ee8bcd repository: port peer interfaces to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37296
diff changeset
   131
40171
dac438b7346e httppeer: expose API descriptor on httpv2peer
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40153
diff changeset
   132
    ziverify.verifyClass(repository.ipeerv2, httppeer.httpv2peer)
37870
39c17718f311 tests: make test-check-interfaces.py work on Python 3
Augie Fackler <augie@google.com>
parents: 37814
diff changeset
   133
    checkzobject(httppeer.httpv2peer(None, b'', b'', None, None, None))
37609
01bfe5ad0c53 httppeer: implement ipeerconnection
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37552
diff changeset
   134
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   135
    ziverify.verifyClass(repository.ipeerbase, localrepo.localpeer)
37320
39f7d4ee8bcd repository: port peer interfaces to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37296
diff changeset
   136
    checkzobject(localrepo.localpeer(dummyrepo()))
39f7d4ee8bcd repository: port peer interfaces to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37296
diff changeset
   137
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   138
    ziverify.verifyClass(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   139
        repository.ipeercommandexecutor, localrepo.localcommandexecutor
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   140
    )
37630
e1b32dc4646c wireproto: implement command executor interface for version 1 peers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37611
diff changeset
   141
    checkzobject(localrepo.localcommandexecutor(None))
e1b32dc4646c wireproto: implement command executor interface for version 1 peers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37611
diff changeset
   142
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   143
    ziverify.verifyClass(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   144
        repository.ipeercommandexecutor, wireprotov1peer.peerexecutor
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   145
    )
37630
e1b32dc4646c wireproto: implement command executor interface for version 1 peers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37611
diff changeset
   146
    checkzobject(wireprotov1peer.peerexecutor(None))
e1b32dc4646c wireproto: implement command executor interface for version 1 peers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37611
diff changeset
   147
37635
cc8c06835097 wireproto: convert legacy commands to command executor
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37630
diff changeset
   148
    ziverify.verifyClass(repository.ipeerbase, sshpeer.sshv1peer)
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   149
    checkzobject(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   150
        sshpeer.sshv1peer(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   151
            ui,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   152
            b'ssh://localhost/foo',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   153
            b'',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   154
            dummypipe(),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   155
            dummypipe(),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   156
            None,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   157
            None,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   158
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   159
    )
37320
39f7d4ee8bcd repository: port peer interfaces to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37296
diff changeset
   160
37635
cc8c06835097 wireproto: convert legacy commands to command executor
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37630
diff changeset
   161
    ziverify.verifyClass(repository.ipeerbase, sshpeer.sshv2peer)
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   162
    checkzobject(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   163
        sshpeer.sshv2peer(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   164
            ui,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   165
            b'ssh://localhost/foo',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   166
            b'',
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   167
            dummypipe(),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   168
            dummypipe(),
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   169
            None,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   170
            None,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   171
        )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   172
    )
37320
39f7d4ee8bcd repository: port peer interfaces to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37296
diff changeset
   173
39f7d4ee8bcd repository: port peer interfaces to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37296
diff changeset
   174
    ziverify.verifyClass(repository.ipeerbase, bundlerepo.bundlepeer)
39f7d4ee8bcd repository: port peer interfaces to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37296
diff changeset
   175
    checkzobject(bundlerepo.bundlepeer(dummyrepo()))
39f7d4ee8bcd repository: port peer interfaces to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37296
diff changeset
   176
39f7d4ee8bcd repository: port peer interfaces to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37296
diff changeset
   177
    ziverify.verifyClass(repository.ipeerbase, statichttprepo.statichttppeer)
39f7d4ee8bcd repository: port peer interfaces to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37296
diff changeset
   178
    checkzobject(statichttprepo.statichttppeer(dummyrepo()))
39f7d4ee8bcd repository: port peer interfaces to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37296
diff changeset
   179
39f7d4ee8bcd repository: port peer interfaces to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37296
diff changeset
   180
    ziverify.verifyClass(repository.ipeerbase, unionrepo.unionpeer)
39f7d4ee8bcd repository: port peer interfaces to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37296
diff changeset
   181
    checkzobject(unionrepo.unionpeer(dummyrepo()))
33807
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   182
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   183
    ziverify.verifyClass(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   184
        repository.ilocalrepositorymain, localrepo.localrepository
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   185
    )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   186
    ziverify.verifyClass(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   187
        repository.ilocalrepositoryfilestorage, localrepo.revlogfilestorage
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   188
    )
39687
bfeab472e3c0 localrepo: create new function for instantiating a local repo object
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39314
diff changeset
   189
    repo = localrepo.makelocalrepository(ui, rootdir)
37181
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
   190
    checkzobject(repo)
0dfb5672f015 repository: define interface for local repositories
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37006
diff changeset
   191
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   192
    ziverify.verifyClass(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   193
        wireprototypes.baseprotocolhandler, wireprotoserver.sshv1protocolhandler
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   194
    )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   195
    ziverify.verifyClass(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   196
        wireprototypes.baseprotocolhandler, wireprotoserver.sshv2protocolhandler
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   197
    )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   198
    ziverify.verifyClass(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   199
        wireprototypes.baseprotocolhandler,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   200
        wireprotoserver.httpv1protocolhandler,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   201
    )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   202
    ziverify.verifyClass(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   203
        wireprototypes.baseprotocolhandler,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   204
        wireprotov2server.httpv2protocolhandler,
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   205
    )
37296
78103e4138b1 wireproto: port protocol handler to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37181
diff changeset
   206
78103e4138b1 wireproto: port protocol handler to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37181
diff changeset
   207
    sshv1 = wireprotoserver.sshv1protocolhandler(None, None, None)
78103e4138b1 wireproto: port protocol handler to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37181
diff changeset
   208
    checkzobject(sshv1)
78103e4138b1 wireproto: port protocol handler to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37181
diff changeset
   209
    sshv2 = wireprotoserver.sshv2protocolhandler(None, None, None)
78103e4138b1 wireproto: port protocol handler to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37181
diff changeset
   210
    checkzobject(sshv2)
78103e4138b1 wireproto: port protocol handler to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37181
diff changeset
   211
78103e4138b1 wireproto: port protocol handler to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37181
diff changeset
   212
    httpv1 = wireprotoserver.httpv1protocolhandler(None, None, None)
78103e4138b1 wireproto: port protocol handler to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37181
diff changeset
   213
    checkzobject(httpv1)
37545
93397c4633f6 wireproto: extract HTTP version 2 code to own module
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37441
diff changeset
   214
    httpv2 = wireprotov2server.httpv2protocolhandler(None, None)
37296
78103e4138b1 wireproto: port protocol handler to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37181
diff changeset
   215
    checkzobject(httpv2)
78103e4138b1 wireproto: port protocol handler to zope.interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37181
diff changeset
   216
37441
a3202fa83aff filelog: declare that filelog implements a storage interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37320
diff changeset
   217
    ziverify.verifyClass(repository.ifilestorage, filelog.filelog)
38530
c82ea938efbb repository: define manifest interfaces
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37870
diff changeset
   218
    ziverify.verifyClass(repository.imanifestdict, manifest.manifestdict)
44664
8c66a680f396 manifest: also declare treemanifest as implementing imanifestdict
Augie Fackler <augie@google.com>
parents: 44262
diff changeset
   219
    ziverify.verifyClass(repository.imanifestdict, manifest.treemanifest)
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   220
    ziverify.verifyClass(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   221
        repository.imanifestrevisionstored, manifest.manifestctx
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   222
    )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   223
    ziverify.verifyClass(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   224
        repository.imanifestrevisionwritable, manifest.memmanifestctx
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   225
    )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   226
    ziverify.verifyClass(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   227
        repository.imanifestrevisionstored, manifest.treemanifestctx
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   228
    )
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   229
    ziverify.verifyClass(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   230
        repository.imanifestrevisionwritable, manifest.memtreemanifestctx
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   231
    )
38530
c82ea938efbb repository: define manifest interfaces
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37870
diff changeset
   232
    ziverify.verifyClass(repository.imanifestlog, manifest.manifestlog)
39314
7f5e6d3e9032 manifest: proxy to revlog instance instead of inheriting
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39231
diff changeset
   233
    ziverify.verifyClass(repository.imanifeststorage, manifest.manifestrevlog)
37441
a3202fa83aff filelog: declare that filelog implements a storage interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37320
diff changeset
   234
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   235
    ziverify.verifyClass(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   236
        repository.irevisiondelta, simplestorerepo.simplestorerevisiondelta
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   237
    )
41159
23d5e03dad70 tests: add simplestorerepo to test-check-interfaces.py
Augie Fackler <augie@google.com>
parents: 41038
diff changeset
   238
    ziverify.verifyClass(repository.ifilestorage, simplestorerepo.filestorage)
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   239
    ziverify.verifyClass(
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   240
        repository.iverifyproblem, simplestorerepo.simplefilestoreproblem
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   241
    )
41159
23d5e03dad70 tests: add simplestorerepo to test-check-interfaces.py
Augie Fackler <augie@google.com>
parents: 41038
diff changeset
   242
42927
d459cd8ea42d interfaces: introduce an interface for dirstate implementations
Augie Fackler <augie@google.com>
parents: 42813
diff changeset
   243
    ziverify.verifyClass(intdirstate.idirstate, dirstate.dirstate)
d459cd8ea42d interfaces: introduce an interface for dirstate implementations
Augie Fackler <augie@google.com>
parents: 42813
diff changeset
   244
37870
39c17718f311 tests: make test-check-interfaces.py work on Python 3
Augie Fackler <augie@google.com>
parents: 37814
diff changeset
   245
    vfs = vfsmod.vfs(b'.')
39c17718f311 tests: make test-check-interfaces.py work on Python 3
Augie Fackler <augie@google.com>
parents: 37814
diff changeset
   246
    fl = filelog.filelog(vfs, b'dummy.i')
37441
a3202fa83aff filelog: declare that filelog implements a storage interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37320
diff changeset
   247
    checkzobject(fl, allowextra=True)
a3202fa83aff filelog: declare that filelog implements a storage interface
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37320
diff changeset
   248
38530
c82ea938efbb repository: define manifest interfaces
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37870
diff changeset
   249
    # Conforms to imanifestlog.
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   250
    ml = manifest.manifestlog(
46780
6266d19556ad node: introduce nodeconstants class
Joerg Sonnenberger <joerg@bec.de>
parents: 46713
diff changeset
   251
        vfs,
6266d19556ad node: introduce nodeconstants class
Joerg Sonnenberger <joerg@bec.de>
parents: 46713
diff changeset
   252
        repo,
6266d19556ad node: introduce nodeconstants class
Joerg Sonnenberger <joerg@bec.de>
parents: 46713
diff changeset
   253
        manifest.manifestrevlog(repo.nodeconstants, repo.svfs),
6266d19556ad node: introduce nodeconstants class
Joerg Sonnenberger <joerg@bec.de>
parents: 46713
diff changeset
   254
        repo.narrowmatch(),
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   255
    )
38530
c82ea938efbb repository: define manifest interfaces
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37870
diff changeset
   256
    checkzobject(ml)
c82ea938efbb repository: define manifest interfaces
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37870
diff changeset
   257
    checkzobject(repo.manifestlog)
c82ea938efbb repository: define manifest interfaces
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37870
diff changeset
   258
c82ea938efbb repository: define manifest interfaces
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37870
diff changeset
   259
    # Conforms to imanifestrevision.
c82ea938efbb repository: define manifest interfaces
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37870
diff changeset
   260
    mctx = ml[repo[0].manifestnode()]
c82ea938efbb repository: define manifest interfaces
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37870
diff changeset
   261
    checkzobject(mctx)
c82ea938efbb repository: define manifest interfaces
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37870
diff changeset
   262
c82ea938efbb repository: define manifest interfaces
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37870
diff changeset
   263
    # Conforms to imanifestrevisionwritable.
c82ea938efbb repository: define manifest interfaces
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37870
diff changeset
   264
    checkzobject(mctx.copy())
c82ea938efbb repository: define manifest interfaces
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37870
diff changeset
   265
c82ea938efbb repository: define manifest interfaces
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37870
diff changeset
   266
    # Conforms to imanifestdict.
c82ea938efbb repository: define manifest interfaces
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37870
diff changeset
   267
    checkzobject(mctx.read())
c82ea938efbb repository: define manifest interfaces
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37870
diff changeset
   268
46780
6266d19556ad node: introduce nodeconstants class
Joerg Sonnenberger <joerg@bec.de>
parents: 46713
diff changeset
   269
    mrl = manifest.manifestrevlog(repo.nodeconstants, vfs)
39314
7f5e6d3e9032 manifest: proxy to revlog instance instead of inheriting
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39231
diff changeset
   270
    checkzobject(mrl)
7f5e6d3e9032 manifest: proxy to revlog instance instead of inheriting
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39231
diff changeset
   271
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   272
    ziverify.verifyClass(repository.irevisiondelta, revlog.revlogrevisiondelta)
39230
b518d495a560 repository: formalize interfaces for revision deltas and requests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38530
diff changeset
   273
39231
b41d023a412a repository: establish API for emitting revision deltas
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39230
diff changeset
   274
    rd = revlog.revlogrevisiondelta(
39230
b518d495a560 repository: formalize interfaces for revision deltas and requests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38530
diff changeset
   275
        node=b'',
b518d495a560 repository: formalize interfaces for revision deltas and requests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38530
diff changeset
   276
        p1node=b'',
b518d495a560 repository: formalize interfaces for revision deltas and requests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38530
diff changeset
   277
        p2node=b'',
b518d495a560 repository: formalize interfaces for revision deltas and requests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38530
diff changeset
   278
        basenode=b'',
b518d495a560 repository: formalize interfaces for revision deltas and requests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38530
diff changeset
   279
        linknode=b'',
b518d495a560 repository: formalize interfaces for revision deltas and requests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38530
diff changeset
   280
        flags=b'',
b518d495a560 repository: formalize interfaces for revision deltas and requests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38530
diff changeset
   281
        baserevisionsize=None,
b518d495a560 repository: formalize interfaces for revision deltas and requests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38530
diff changeset
   282
        revision=b'',
46711
a41565bef69f changegroup: add v4 changegroup for revlog v2 exchange
Raphaël Gomès <rgomes@octobus.net>
parents: 46660
diff changeset
   283
        sidedata=b'',
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   284
        delta=None,
47077
119790e1c67c cg4: introduce protocol flag to signify the presence of sidedata
Raphaël Gomès <rgomes@octobus.net>
parents: 46780
diff changeset
   285
        protocol_flags=b'',
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   286
    )
39230
b518d495a560 repository: formalize interfaces for revision deltas and requests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38530
diff changeset
   287
    checkzobject(rd)
b518d495a560 repository: formalize interfaces for revision deltas and requests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38530
diff changeset
   288
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   289
    ziverify.verifyClass(repository.iverifyproblem, revlog.revlogproblem)
39842
97986c9c69d3 verify: start to abstract file verification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39764
diff changeset
   290
    checkzobject(revlog.revlogproblem())
97986c9c69d3 verify: start to abstract file verification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39764
diff changeset
   291
43076
2372284d9457 formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents: 42927
diff changeset
   292
33807
b70029f355a3 tests: verify that peer instances only expose interface members
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   293
main()