comparison hgext/hooklib/__init__.py @ 44440:4cabeea6d214

hgext: start building a library for simple hooks Many workflows depend on hooks to enforce certain policies, e.g. to prevent forced pushes. The Mercurial Guide includes some cases and Google can help finding others, but it can save users a lot of time if hg itself has a couple of examples for further customization. Differential Revision: https://phab.mercurial-scm.org/D6825
author Joerg Sonnenberger <joerg@bec.de>
date Sat, 07 Sep 2019 14:50:39 +0200
parents
children 6000f5b25c9b
comparison
equal deleted inserted replaced
44439:edc8504bc26b 44440:4cabeea6d214
1 """collection of simple hooks for common tasks (EXPERIMENTAL)
2
3 This extension provides a number of simple hooks to handle issues
4 commonly found in repositories with many contributors:
5 - email notification when changesets move from draft to public phase
6 - email notification when changesets are obsoleted
7 - enforcement of draft phase for all incoming changesets
8 - enforcement of a no-branch-merge policy
9 - enforcement of a no-multiple-heads policy
10
11 The implementation of the hooks is subject to change, e.g. whether to
12 implement them as individual hooks or merge them into the notify
13 extension as option. The functionality itself is planned to be supported
14 long-term.
15 """
16 from __future__ import absolute_import
17 from . import (
18 changeset_obsoleted,
19 changeset_published,
20 )
21
22 # configtable is only picked up from the "top-level" module of the extension,
23 # so expand it here to ensure all items are properly loaded
24 configtable = {}
25 configtable.update(changeset_published.configtable)
26 configtable.update(changeset_obsoleted.configtable)