Mercurial > hg > mercurial-crew-with-dirclash
annotate MANIFEST.in @ 2155:ff255b41b4aa
support hooks written in python.
to write hook in python, create module with hook function inside.
make sure mercurial can import module (put it in $PYTHONPATH or load it
as extension). hook function should look like this:
def myhook(ui, repo, hooktype, **kwargs):
if hook_passes:
return True
elif hook_explicitly_fails:
return False
elif some_other_failure:
import util
raise util.Abort('helpful failure message')
else:
return
# implicit return of None makes hook fail!
then in .hgrc, add hook with "python:" prefix:
[hooks]
commit = python:mymodule.myhook
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 28 Apr 2006 15:50:22 -0700 |
parents | bd94dda70bbe |
children | 8a2a7f7d9df6 |
rev | line source |
---|---|
7 | 1 include hg |
2 recursive-include mercurial *.py | |
954 | 3 include hgweb.cgi hgwebdir.cgi |
589 | 4 include hgeditor rewrite-log |
2053
0f17f54333b8
Include tests/md5sum.py in manifest.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1992
diff
changeset
|
5 include tests/README tests/run-tests tests/md5sum.py tests/test-*[a-z0-9] tests/*.out |
805
ec7107c5d8ad
Drop .err files generated by failed tests from the MANIFEST.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
740
diff
changeset
|
6 prune tests/*.err |
7 | 7 include *.txt |
807
5e779f96edb0
Include tests (or possibly maps) ending in numbers in MANIFEST, too.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
806
diff
changeset
|
8 include templates/map templates/map-*[a-z0-9] |
188 | 9 include templates/*.tmpl |
1992
ea8345a7a29d
Include templates/static/* in MANIFEST.in so that distutils setup will include them.
Lee Cantey <lcantey@gmail.com>
parents:
1021
diff
changeset
|
10 include templates/static/* |
2055
bd94dda70bbe
Added doc/gendoc.py to MANIFEST.in, so docs can be regenerated on demand.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2053
diff
changeset
|
11 include doc/README doc/Makefile doc/gendoc.py doc/*.txt doc/*.html doc/*.[0-9] |
673
8e518e11f6cf
Change MANIFEST.in to recursive-include the contrib/ folder.
Andrew Thompson <andrewkt@aktzero.com>
parents:
589
diff
changeset
|
12 recursive-include contrib * |
7 | 13 include README |
589 | 14 include CONTRIBUTORS |
15 include COPYING | |
1021 | 16 include Makefile |
589 | 17 include MANIFEST.in |