comparison doc/hgrc.5.txt @ 7916:f779e1996e23

ability to load hooks from arbitrary python module
author Alexander Solovyov <piranha@piranha.org.ua>
date Fri, 27 Mar 2009 01:28:09 +0200
parents 613f3c88a388
children 4f3fdfaa3874
comparison
equal deleted inserted replaced
7915:fba93bbbca02 7916:f779e1996e23
473 set to an empty value under Unix-like systems. 473 set to an empty value under Unix-like systems.
474 474
475 The syntax for Python hooks is as follows: 475 The syntax for Python hooks is as follows:
476 476
477 hookname = python:modulename.submodule.callable 477 hookname = python:modulename.submodule.callable
478 hookname = python:/path/to/python/module.py:callable
478 479
479 Python hooks are run within the Mercurial process. Each hook is 480 Python hooks are run within the Mercurial process. Each hook is
480 called with at least three keyword arguments: a ui object (keyword 481 called with at least three keyword arguments: a ui object (keyword
481 "ui"), a repository object (keyword "repo"), and a "hooktype" 482 "ui"), a repository object (keyword "repo"), and a "hooktype"
482 keyword that tells what kind of hook is used. Arguments listed as 483 keyword that tells what kind of hook is used. Arguments listed as