ignore certain mercurial commands in mercurial hook
I have a mercurial hook like so: [hooks] pretxncommit.myhook = python:path/to/file:myhook with the code looking like this: def myhook(ui, repo, **kwargs): #do some stuff but this hook runs on commands that use the commit logic to do something else, in my case hg shelve . is there a way to get the command that the user has input to avoid running the hook on that command? perhaps something like this: def myhook(ui, repo, command, **kwargs): if command is "hg shelve" return 0 #do some stuff Unfortunately the answer seems to be no. I just debugged into the hook mechanism of hg 3.1, and the