D392: util: add base class for transactional context managers

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue Aug 15 01:59:09 EDT 2017


martinvonz added inline comments.

INLINE COMMENTS

> indygreg wrote in util.py:597-601
> How do you feel about changing this to use `abc.ABCMeta` so the interface is enforced as type creation time? I'm doing this in https://phab.mercurial-scm.org/D332 and people seem to be on board.

Sounds good. I had heard you mention abc before, but I was simply too lazy to bother checking how to do it. Now that I have an example: done! Let me know how it looks.

We should probably do that for matchers too, in case someone feels like it...

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list