hgext/hooklib/__init__.py
author Joerg Sonnenberger <joerg@bec.de>
Sun, 30 Jun 2024 13:22:23 +0200
changeset 51829 c1ed5ee2ad82
parent 48875 6000f5b25c9b
child 51863 f4733654f144
permissions -rw-r--r--
http: reuse Python's implementation of read/readline/readinto Since Python 3 already provides a working implementation of readline, there is no need for our own buffering implementation. Reduce the code to transfer accounting only.

"""collection of simple hooks for common tasks (EXPERIMENTAL)

This extension provides a number of simple hooks to handle issues
commonly found in repositories with many contributors:
- email notification when changesets move from draft to public phase
- email notification when changesets are obsoleted
- enforcement of draft phase for all incoming changesets
- enforcement of a no-branch-merge policy
- enforcement of a no-multiple-heads policy

The implementation of the hooks is subject to change, e.g. whether to
implement them as individual hooks or merge them into the notify
extension as option. The functionality itself is planned to be supported
long-term.
"""
from . import (
    changeset_obsoleted,
    changeset_published,
)

# configtable is only picked up from the "top-level" module of the extension,
# so expand it here to ensure all items are properly loaded
configtable = {}
configtable.update(changeset_published.configtable)
configtable.update(changeset_obsoleted.configtable)