comparison tests/simplestorerepo.py @ 38547:404eab7ff33f

tests: use interfaceutil in simplestorerepo Without it, we crash at module import time. This has likely been busted since 856f381ad74b. Differential Revision: https://phab.mercurial-scm.org/D3884
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 30 Jun 2018 18:55:04 -0700
parents 0596d27457c6
children b41d023a412a
comparison
equal deleted inserted replaced
38546:731debab233f 38547:404eab7ff33f
21 nullid, 21 nullid,
22 nullrev, 22 nullrev,
23 ) 23 )
24 from mercurial.thirdparty import ( 24 from mercurial.thirdparty import (
25 cbor, 25 cbor,
26 )
27 from mercurial.thirdparty.zope import (
28 interface as zi,
29 ) 26 )
30 from mercurial import ( 27 from mercurial import (
31 ancestor, 28 ancestor,
32 bundlerepo, 29 bundlerepo,
33 error, 30 error,
38 repository, 35 repository,
39 revlog, 36 revlog,
40 store, 37 store,
41 verify, 38 verify,
42 ) 39 )
40 from mercurial.utils import (
41 interfaceutil,
42 )
43 43
44 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for 44 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
45 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should 45 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
46 # be specifying the version(s) of Mercurial they are tested with, or 46 # be specifying the version(s) of Mercurial they are tested with, or
47 # leave the attribute unspecified. 47 # leave the attribute unspecified.
58 58
59 def validaterev(rev): 59 def validaterev(rev):
60 if not isinstance(rev, int): 60 if not isinstance(rev, int):
61 raise ValueError('expected int') 61 raise ValueError('expected int')
62 62
63 @zi.implementer(repository.ifilestorage) 63 @interfaceutil.implementer(repository.ifilestorage)
64 class filestorage(object): 64 class filestorage(object):
65 """Implements storage for a tracked path. 65 """Implements storage for a tracked path.
66 66
67 Data is stored in the VFS in a directory corresponding to the tracked 67 Data is stored in the VFS in a directory corresponding to the tracked
68 path. 68 path.