hghooks/mozhghooks/checks.py [38:92]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    __metaclass__ = abc.ABCMeta

    def __init__(self, ui, repo, info):
        if not RE_VALID_NAME.match(self.name):
            raise Exception(b"check name is invalid: %s" % self.name)

        self.ui = ui
        self.repo = repo
        self.repo_metadata = info

    @abc.abstractproperty
    def name(self):
        """Name of this check.

        This is used to facilitate force enabling or disabling the check on a
        per-repo basis. It may also be displayed in logging or user output.
        """

    @abc.abstractmethod
    def relevant(self):
        """Allows checks to declare if they are relevant.

        Implementations can look at the repo or its metadata to see if they
        should be run.

        Returns True if the check should run. False otherwise.

        The return value of this method is tightly validated to help prevent
        logic bugs.
        """

    @abc.abstractmethod
    def pre(self, node):
        """Called once before any changesets are examined.

        Allows derived classes to set additional instance state without having
        to call parent methods.

        `node` - the first changeset in the group that was added (as per
                 pretxnchangegroup).

        Return value is ignored.
        """

    @abc.abstractmethod
    def check(self, ctx):
        """Verifies a single changeset.

        `ctx` - changectx object.

        Returns True if the check passes. False otherwise.
        """

    @abc.abstractmethod
    def post_check(self):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



hghooks/mozhghooks/checks.py [157:211]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    __metaclass__ = abc.ABCMeta

    def __init__(self, ui, repo, info):
        if not RE_VALID_NAME.match(self.name):
            raise Exception(b"check name is invalid: %s" % self.name)

        self.ui = ui
        self.repo = repo
        self.repo_metadata = info

    @abc.abstractproperty
    def name(self):
        """Name of this check.

        This is used to facilitate force enabling or disabling the check on a
        per-repo basis. It may also be displayed in logging or user output.
        """

    @abc.abstractmethod
    def relevant(self):
        """Allows checks to declare if they are relevant.

        Implementations can look at the repo or its metadata to see if they
        should be run.

        Returns True if the check should run. False otherwise.

        The return value of this method is tightly validated to help prevent
        logic bugs.
        """

    @abc.abstractmethod
    def pre(self, node):
        """Called once before any changesets are examined.

        Allows derived classes to set additional instance state without having
        to call parent methods.

        `node` - the first changeset in the group that was added (as per
                 pretxnclose).

        Return value is ignored.
        """

    @abc.abstractmethod
    def check(self, ctx):
        """Verifies a single changeset.

        `ctx` - changectx object.

        Returns True if the check passes. False otherwise.
        """

    @abc.abstractmethod
    def post_check(self):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



