[PATCH 1 of 2] Add allowfallbackext function for pure python fallbacks

Matt Mackall mpm at selenic.com
Wed Dec 31 01:59:54 CST 2008


On Tue, 2008-12-30 at 19:00 -0800, Brendan Cully wrote:
> # HG changeset patch
> # User Brendan Cully <brendan at kublai.com>
> # Date 1230692335 28800
> # Node ID b7048751b5eec7ba2626c52cdef99dfd3c1509af
> # Parent  6abb141724c51b4d4d481e7d9ddd6cce4449010d
> Add allowfallbackext function for pure python fallbacks
> Fallback implementations should call this function before doing anything else.
> If the HGALLOWFALLBACKS environment variable is not set, this function will
> issue a warning and abort.

Here's how I think this should work. Either

a) make install-pure 
   (simply install the fallback modules instead of building and
installing the extensions)

or

b) PYTHONPATH += mercurial/pure
   (mostly useful for running out of the project directory)

Note that neither of these require any special logic in the Mercurial
code.

Run-time switching between pure Python and extensions is silly. The only
reason you'd ever not use the extensions is if the extensions were
simply not available. 

In fact, we don't really want to encourage people to use this mode, we
just want it to be possible for people who want to do silly things like
trying to use hg inside of Jython.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list