I have a script that is at the top level of my working copy and would like to use it as a Mercurial hook. If I use the absolute path to the hook, then everything will be fine, but I want a relative path so that all of this can be easily moved, used in other working copies, and other developers can copy hgrc as it is.
/space/project/.hg/hgrc contains
[hooks]
update = genid
The genid script is located in / space / project / genid
The hook is called just fine if I go into / space / project, but if my current directory is / space / project / src / tools, then "hg update" will throw an error because the hook cannot be found.
source
share