When making an alias for a command pull (called 'p') the hook doesn't seem to be called. The following describes how to recreate the bug with mercurial 2.0.1: $ hg clone https://bitbucket.org/seanfarley/settings $ hg clone https://bitbucket.org/seanfarley/mercurial-cli-templates $ cd settings $ echo ' [hooks] post-pull = $HG pull $@ --cwd ../mercurial-cli-templates' >> .hg/hgrc $ hg pull pulling from https://bitbucket.org/seanfarley/settings searching for changes no changes found pulling from https://bitbucket.org/seanfarley/mercurial-cli-templates searching for changes no changes found But the following does not work: $ hg --config alias.p=pull p pulling from https://bitbucket.org/seanfarley/settings searching for changes no changes found
The behavior now is call "post-%s" % cmd, and understand a alias like a command, this mean that when you call hg p, you need a post-p = $HG pull $@ --cwd ../mercurial-cli-templates The current implementation is more versatile, because you can ignore pre- and post- actions through an alias or replicate it to have the same behavior.
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:26 EDT --- This bug was previously known as _bug_ 3163 at http://mercurial.selenic.com/bts/issue3163
Bulk close: no activity for >2 years -> WONTFIX
Bulk change recent WONTFIX -> new, more descriptive ARCHIVED state (sorry for the spam)