I have a mercurial hook like this:
[hooks]
pretxncommit.myhook = python:path/to/file:myhook
The code is as follows:
def myhook(ui, repo, **kwargs):
but this hook works with commands that use commit logic to do something else, in my case hg shelve. is there any way to get the command that the user enters to avoid running this command?
maybe something like this:
def myhook(ui, repo, command, **kwargs):
if command is "hg shelve"
return 0
source
share