making memctx more generally useful

Kevin Bullock kbullock+mercurial at ringworld.org
Fri Jan 4 22:10:26 CST 2013


On 4 Jan 2013, at 5:22 PM, David Schleimer wrote:

>>> 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.

At that rate, it might make more sense to extract a superclass for both workingctx and memctx.

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock



More information about the Mercurial-devel mailing list