Hook not launched
Created originally on Bitbucket by pzerlauth (pascale zerlauth)
Context : TortoiseHg version 2.1.2 with Mercurial-1.9.1, Python-2.6.6, PyQt-4.8.3, Qt-4.7.1 on windows xp Two repositories cat and cat1
Cat hgrc content :
[extensions]
verifyTags = D:\Documents and Settings<name>\My Documents\MercurialData\tst.py
[hooks]
pretxnchangegroup.verifyTags = python:verifyTags.verifyTags
tst.py content :
#!/usr/bin/python """ Test.py : """
from mercurial import ui from mercurial import hg from mercurial.node import *
def verifyTags( ui, repo, hooktype, node, **kwargs ): ui.write ("--- Test ---\n\n") # change working directory to repository root return 1
On command line in cat1 directory:
hg push
pushing to d:\Documents and Settings\ZERLAUTH\My Documents\MercurialData\tst\cat
searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files
--- Test ---
transaction abort! rollback completed
abort: pretxnchangegroup.verifyTags hook failed
With tortoise workbench, I launch tortoise after the try on command line.
% hg --repository D:\Documents and Settings\ZERLAUTH\My Documents\MercurialData\tst\cat1 push D:\Documents and Settings\ZERLAUTH\My Documents\MercurialData\tst\cat pushing to D:\Documents and Settings\ZERLAUTH\My Documents\MercurialData\tst\cat
searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files
--- verifyTags ---
[command completed successfully Mon Aug 08 09:39:41 2011]
**The hook which is called is not declared in repository cat but in another repository. **
Related problem :
sometimes it is not possible to launch a rollback via tortoise (nothing need to be rollback)