[PATCH 3 of 5] workingctx: add a way for extensions to run code at status fixup time

Sean Farley sean at farley.io
Mon Jun 12 18:59:48 EDT 2017


Siddharth Agarwal <sid at less-broken.com> writes:

> On 6/12/17 3:56 PM, Sean Farley wrote:
>> The series' direction (adding a callback within a lock) looks good to
>> me. My only feedback is that I'm currently ripping out dirstate from
>> localrepo and putting it into the workingctx itself. Can these callbacks
>> live in dirstate.py? Or maybe even workingctx?
>
>
> I'm afraid not, because just like the workingctx, the dirstate isn't 
> unique per-repo. The localrepo is the only place this state can live.

The ownership could be in localrepo, for sure. But the methods could
still live in workingctx (and just call self._repo._dirstate). I'm also
ok with doing the refactor myself and can queue this as-is.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170612/10d79f49/attachment.sig>


More information about the Mercurial-devel mailing list