[PATCH STABLE] obsolete: import base85 without using a from clause, fixing --pure

Adrian Buehlmann adrian at cadifra.com
Sat Sep 1 17:11:51 CDT 2012


On 2012-09-01 23:24, Greg Ward wrote:
> On 24 August 2012, Matt Mackall said:
>> Seems to me nothing in the mercurial directory should ever need or want
>> to do "from mercurial import...". Including util, here. Not only is it
>> going to confuse pure mode, it's going to make demand-loading messier.
> 
> Clarity. Pity the poor newbie who has no idea where 'store' or
> 'scmutil' comes from. "from mercurial import scmutil" immediately
> answers that question.

Well, I somewhat find it strange to have to say "from mercurial" in a
module that's *inside* mercurial already...

But then, Python is not my home turf [1] - despite me having sent quite
a couple of patches for Mercurial already.

I'd clearly prefer keeping things easy for what the *real* needs are,
than trying to solve a negligible, dubious (non-)problem (helping newbies).

> Understanding Mercurial from the source code can be a tall order. We
> should be trying to make it *easier* IMHO.

So what do you propose specifically? After all, the "from mercurial"
import of base85 here broke setup.py.

Keeping things correct and fast seems clearly more important to me than
trying to making newbies happy.

[1] C++ hacker here (who very welcomes C++'11)


More information about the Mercurial-devel mailing list