making memctx more generally useful

David Schleimer dschleimer at fb.com
Fri Jan 4 17:22:30 CST 2013


> > When this was discussed on IRC; someone (I sometimes wish we kept IRC
> > logs) mentioned they had a patch series that accomplished most of
> > option #2.  Now would be a good time to post them, since it seems to
> > be recognized as the best way to start this process.

I've gone a fair way down the route of refactoring the localrepo.commit() logic into smaller methods on the working context while trying to make graft faster in an mpm-acceptable way.  I thought I would have time to pull out the refactoring bits of that series, pull a little more into the working context so that it's a complete series, and send it this week.  Unfortunately, one of our repos got wiped out over the break and I haven't been able to put as much time into it as I expected.  I should be able to send a patch series worth discussing on Monday.

>> - Moving commit logic outside local repo would be a net win
>> - I'm not sure #2 solve alone the amend problem. We needs to:
>>   1) copy "." into a memctx,
>>   2) apply commit logic with content from the wctx to our memctx,
>>
>> A mix of #2 and #3 is probably the way to

I'm splitting localrepo.commit() because it's easier to pull into the working context piecewise.  I think we will probably want to have memctx extend workingctx so that they can share a lot of the munging logic localrepo.commit() currently does.

--David


More information about the Mercurial-devel mailing list