[PATCH 1 of 6] context: let workingctx parents be overriden

Patrick Mézard pmezard at gmail.com
Wed Jun 18 17:18:39 CDT 2008


Patrick Mézard a écrit :
> Matt Mackall a écrit :
>> On Sun, 2008-06-15 at 19:21 +0200, Patrick Mezard wrote:
>>> # HG changeset patch
>>> # User Patrick Mezard <pmezard at gmail.com>
>>> # Date 1213549476 -7200
>>> # Node ID 801e6c072d4e787a0929926f9d8e922d58d72867
>>> # Parent  76021ec849c876bde6fc85485e81cc4d835036fd
>>> context: let workingctx parents be overriden
>> Puzzled. Why don't we just use another class here?
>>
>> We could, for example, have a memctx class derived from ctx, with
>> workingctx derived from memctx.
> 
> My plan is:
> 1- Refactor localrepo.commit() so we can pass it a changectx like object, and ensure there is a simple code path not involving any dirstate related operation. This is addressed by the current patch series.
> 2- Implement a memctx proposal and use it in convert. It will make convert stop using it's working directory as a storage for temporary files, and give a concrete example to discuss *ctx refactoring. At this point, the memctx support is marked experimental.
> 3- Refactor *ctx classes until we are happy with them.

I pushed [1] and [2], I don't consider the code to be perfect, especially [2] but it already solves a couple of important issues. I am ready to discuss and perform suggested refactoring/improvements about these.

--
Patrick Mézard


More information about the Mercurial-devel mailing list