Mercurial > public > mercurial-scm > hg-stable
diff tests/simplestorerepo.py @ 37441:a3202fa83aff
filelog: declare that filelog implements a storage interface
Now that we have a declared interface, let's declare that filelog
implements it.
Tests have been added that confirm the object conforms to the
interface.
The existing interface checks verify there are no extra public
attributes outside the declared interface. filelog has several
extra attributes. So we added a mechanism to suppress this check.
The goal is to modify the filelog class so we can drop this check.
Differential Revision: https://phab.mercurial-scm.org/D3149
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 05 Apr 2018 15:18:23 -0700 |
parents | 9d4f09bfe3ec |
children | 0596d27457c6 |
line wrap: on
line diff
--- a/tests/simplestorerepo.py Thu Apr 05 15:09:41 2018 -0700 +++ b/tests/simplestorerepo.py Thu Apr 05 15:18:23 2018 -0700 @@ -24,6 +24,9 @@ from mercurial.thirdparty import ( cbor, ) +from mercurial.thirdparty.zope import ( + interface as zi, +) from mercurial import ( ancestor, bundlerepo, @@ -33,6 +36,7 @@ localrepo, mdiff, pycompat, + repository, revlog, store, verify, @@ -57,6 +61,7 @@ if not isinstance(rev, int): raise ValueError('expected int') +@zi.implementer(repository.ifilestorage) class filestorage(object): """Implements storage for a tracked path.