D2933: repository: define interface for local repositories

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Fri Mar 30 13:17:50 EDT 2018


indygreg marked 2 inline comments as done.
indygreg added inline comments.

INLINE COMMENTS

> durin42 wrote in repository.py:273
> I'm unclear: are all the methods supposed to be abstract, or are some of them default implementations?

In `zope.interface`, the interface declaration is its own type which is completely independent from the implementation. This is different from `abc`, where the implementation inherits the abstract base class.

This means you can't have default implementations in the interface. Also, there is no `self` argument on methods. That's kind of wonky and confuses my IDE. But it does work.

> durin42 wrote in repository.py:484
> Is this really the right default impl?

No. I just didn't feel like adding a docstring because I didn't feel like researching what this is used for :)

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2933

To: indygreg, #hg-reviewers
Cc: durin42, mercurial-devel


More information about the Mercurial-devel mailing list