[Python-Dev] Mercurial migration: help needed (original) (raw)

Martin Geisler mg at lazybytes.net
Sat Aug 22 01:17:53 CEST 2009


Dj Gilcrease <digitalxero at gmail.com> writes:

On Fri, Aug 21, 2009 at 8:19 AM, Dirkjan Ochtman<dirkjan at ochtman.nl> wrote:

Enabling extensions in a versioned file is not going to fly. any specific reason?

In the general case, you can specify an extension to be enabled by filename:

[extensions] foo = ~/src/foo

So if I can enable an extension like that on your system, I might be evil and commit a bad extension and enable it at the same time.

You might argue that one should then limit which extensions one can enable in a versioned file, but it seems hard to come up with a good mechanism for this. The current "mechanism" is the users own ~/.hgrc file which can be seen as a whitelist of extensions he trust.

An alternative could be the new %include syntax for configuration files, which was introduced in Mercurial 1.3. If you add

%include ../config

to your .hg/hgrc file, the (versioned!) file named 'config' from the root of your repository will be included on the spot. The catch is that you have to add such a line to all your Python clones.

-- Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 196 bytes Desc: not available URL: <http://mail.python.org/pipermail/python-dev/attachments/20090822/d7c4a250/attachment.pgp>



More information about the Python-Dev mailing list