##// END OF EJS Templates
hook: assume relative path to hook is given from repo root
Alexander Solovyov -
r13118:789e0fa2 stable
parent child Browse files
Show More
@@ -135,7 +135,9 b' def hook(ui, repo, name, throw=False, **'
135 elif cmd.startswith('python:'):
135 elif cmd.startswith('python:'):
136 if cmd.count(':') >= 2:
136 if cmd.count(':') >= 2:
137 path, cmd = cmd[7:].rsplit(':', 1)
137 path, cmd = cmd[7:].rsplit(':', 1)
138 mod = extensions.loadpath(path, 'hghook.%s' % hname)
138 path = util.expandpath(path)
139 mod = extensions.loadpath(os.path.join(repo.root, path),
140 'hghook.%s' % hname)
139 hookfn = getattr(mod, cmd)
141 hookfn = getattr(mod, cmd)
140 else:
142 else:
141 hookfn = cmd[7:].strip()
143 hookfn = cmd[7:].strip()
General Comments 0
You need to be logged in to leave comments. Login now