##// END OF EJS Templates
support hooks written in python....
support hooks written in python. to write hook in python, create module with hook function inside. make sure mercurial can import module (put it in $PYTHONPATH or load it as extension). hook function should look like this: def myhook(ui, repo, hooktype, **kwargs): if hook_passes: return True elif hook_explicitly_fails: return False elif some_other_failure: import util raise util.Abort('helpful failure message') else: return # implicit return of None makes hook fail! then in .hgrc, add hook with "python:" prefix: [hooks] commit = python:mymodule.myhook

File last commit:

r2152:57729c56 default
r2155:ff255b41 default
Show More
test-undo.out
20 lines | 510 B | text/plain | TextLexer
repository uses revlog format 0
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
1 files, 1 changesets, 1 total revisions
changeset: 0:0acdaf898367
tag: tip
user: test
date: Mon Jan 12 13:46:40 1970 +0000
summary: test
rolling back last transaction
repository uses revlog format 0
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
0 files, 0 changesets, 0 total revisions
A a