[PATCH] util, posix: eliminate encodinglower and encodingupper

Adrian Buehlmann adrian at cadifra.com
Wed Jul 18 12:39:57 CDT 2012


On 2012-07-18 17:06, FUJIWARA Katsunori wrote:
> 
> At Wed, 18 Jul 2012 15:12:48 +0200,
> Adrian Buehlmann wrote:
>>
>> # HG changeset patch
>> # User Adrian Buehlmann <adrian at cadifra.com>
>> # Date 1342615318 -7200
>> # Node ID 608ffa7a070f27d6b296e335fa200bbf4b1dfc2d
>> # Parent  afd75476939e0a229816e6683607fbe5ab222c11
>> util, posix: eliminate encodinglower and encodingupper
>>
>> 2ebe3d0ce91d claims this was needed "to avoid cyclic dependency", but there is
>> no cyclic dependency.
>>
>> windows.py already imports encoding, posix.py can import it too, so we can
>> simply use encoding.upper in windows.py and in posix.py.
>>
>> (this is a partial backout of 2ebe3d0ce91d)
> 
> At 2ebe3d0ce91d changing, I avoided adding "import encoding" into
> windows.py and posix.py to follow the suggestion by Mads:
> 
>     http://www.selenic.com/pipermail/mercurial-devel/2011-November/035939.html
> 
> Would you think that this adding "import encoding" into posix.py is
> safe, Mads ?

Well, for windows.py, the import of module encoding is already there.

And I don't see a cycle for posix.py either with my patch. What cycle
does my patch introduce exactly?


More information about the Mercurial-devel mailing list