comparison mercurial/hook.py @ 8312:b87a50b7125c

separate import lines from mercurial and general python modules
author Simon Heimberg <simohe@besonet.ch>
date Tue, 28 Apr 2009 17:40:46 +0200
parents 46293a0c7e9f
children 0bf0045000b5
comparison
equal deleted inserted replaced
8311:e0eb03bfa5af 8312:b87a50b7125c
4 # 4 #
5 # This software may be used and distributed according to the terms of the 5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2, incorporated herein by reference. 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 from i18n import _ 8 from i18n import _
9 import util, os, sys 9 import os, sys
10 from mercurial import extensions 10 import extensions, util
11 11
12 def _pythonhook(ui, repo, name, hname, funcname, args, throw): 12 def _pythonhook(ui, repo, name, hname, funcname, args, throw):
13 '''call python hook. hook is callable object, looked up as 13 '''call python hook. hook is callable object, looked up as
14 name in python module. if callable returns "true", hook 14 name in python module. if callable returns "true", hook
15 fails, else passes. if hook raises exception, treated as 15 fails, else passes. if hook raises exception, treated as