[PATCH 02 of 14 RFC] context: add a method to convert node to ctx

Sean Farley sean.michael.farley at gmail.com
Tue Jul 9 17:17:52 CDT 2013


mpm at selenic.com writes:

> On Tue, 2013-07-09 at 16:54 -0500, Sean Farley wrote:
>> # HG changeset patch
>> # User Sean Farley <sean.michael.farley at gmail.com>
>> # Date 1373322965 18000
>> #      Mon Jul 08 17:36:05 2013 -0500
>> # Node ID bf0f87c072f524b8e054de72af143a0dfc2fcffb
>> # Parent  2bda9c94e65cff8c6968d82cfc07ec6049b194c0
>> context: add a method to convert node to ctx
>> 
>> I had a hard time deciding where to place this function. Perhaps it could go
>> into scmutil or util?
>> 
>> This adds a method as a common place for testing if an object is a context
>> object, and if it isn't, then to find the corresponding context object in the
>> repo.
>
> How about simply letting the context constructor.. accept contexts? It
> already accepts everything else.

Heh, fair enough. I'll change it in the next version.


More information about the Mercurial-devel mailing list