Bug 3164 - alias command does not call post-pull hook
Summary: alias command does not call post-pull hook
Status: RESOLVED ARCHIVED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-19 16:19 UTC by Sean Farley
Modified: 2014-07-31 13:22 UTC (History)
2 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Farley 2011-12-19 16:19 UTC
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
Comment 1 Jesús Esptino 2012-01-21 08:19 UTC
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.
Comment 2 Bugzilla 2012-05-12 09:26 UTC

--- 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
Comment 3 Matt Mackall 2014-07-25 17:22 UTC
Bulk close: no activity for >2 years -> WONTFIX
Comment 4 Matt Mackall 2014-07-31 13:22 UTC
Bulk change recent WONTFIX -> new, more descriptive ARCHIVED state (sorry for the spam)