[PATCH 0 of 2] Pure python fallback for base85

Brendan Cully brendan at kublai.com
Tue Dec 30 21:00:51 CST 2008


This set of patches includes a pure python base85 implementation as
well as a simple mechanism for allowing pure python fallbacks for C
extensions. Fallbacks should call util.allowfallbacks before doing
anything else. This function checks whether the environment variable
HGALLOWFALLBACKS is 1, y, yes, or true and aborts with a warning if
not.

I looked into setting up fallbacks at install time instead of checking
at run time but it seemed to require some trickier distutils hacking,
so I'm posting this simple approach for posterity. The advantage of
doing things at install time is no environment variable would be
needed. On the other hand, it makes it easier for a clueless sysadmin
to set up a slow hg without making it obvious to her users.



More information about the Mercurial-devel mailing list