Consider the following scenario: there is a repository A that contains a subrepository S. An preupdate hook is defined in repository A's .hg/hgrc. If a particular update implies also an update on S, the preupdate hook defined for A is also executed in the context of repository S. The only way to prevent this behaviour is to explicitly define an empty preupdate hook in S's .hg/hgrc. This pattern happens for all hooks whose triggering operation may imply subrepository recurson. Apparently, subrepository recursion merges the repository's .hg/hgrc with its container's .hg/hgrc.
This is slightly tricky as we may want to inherit some settings and not others. Examples include extensions, username settings...
Certainly. For now, I've added some information regarding this behaviour to the wiki: http://mercurial.selenic.com/wiki/Subrepository#Inherited_hooks And a link to that section from the Hook page.
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:21 EDT --- This bug was previously known as _bug_ 2904 at http://mercurial.selenic.com/bts/issue2904
Fixed by http://selenic.com/repo/hg/rev/f4ee2e959696 Simon Heimberg <simohe@besonet.ch> subrepo: subrepo isolation, pass baseui when cloning a new subrepo (issue2904) Create the repo with baseui because it should only get the global configuration. After this patch issue2904 is finally fixed. (please test the fix)