[PATCH 36 of 36] changectx: if passing a context then exit __init__ immediately

Sean Farley sean.michael.farley at gmail.com
Wed Aug 7 14:18:13 CDT 2013


raf at durin42.com writes:

> On Wed, Aug 07, 2013 at 01:13:36PM -0500, Sean Farley wrote:
>> # HG changeset patch
>> # User Sean Farley <sean.michael.farley at gmail.com>
>> # Date 1375825361 18000
>> #      Tue Aug 06 16:42:41 2013 -0500
>> # Node ID 7316661a4968456c3868c178cab6e32004094504
>> # Parent  3f12610b25b6e786c81d84734ca8433ad47ab7a3
>> changectx: if passing a context then exit __init__ immediately
>
> hm, so we'd leave an uninitialized object? I feel like this should
> throw some kind of exception (TypeError? ArgumentError?) instead.

I guess this means I need to augment this commit message. We want to
exit immediately because context.__new__ takes care of copying the
object already and we don't want to clobber it with another
initialization.


More information about the Mercurial-devel mailing list