[PATCH 2 of 2] Treat extension load paths as relative to the defining hgrc

Jesse Glick jesse.glick at sun.com
Mon Jan 28 07:54:00 CST 2008


Peter Arrenbrecht wrote:
>> perhaps even keeping it inside the project
> 
> Doesn't that open up the very same security hole you brought up when
> we discussed scanning parent dirs for .hgrc files to include?

I don't think so. You still need to explicitly ask to load the extension 
in your .hg/hgrc, which cannot be part of a versioned repository. People 
can already write e.g.

[hooks]
precommit.x = ./dosomething.sh

If you write that then you must trust that the file 'dosomething.sh' in 
the repository will not contain, e.g., 'sudo rm -rf /'. Similarly, if 
you ask to load an extension by relative path, you must trust that 
extension.



More information about the Mercurial-devel mailing list