[PATCH 3 of 5] workingctx: add a way for extensions to run code at status fixup time
Siddharth Agarwal
sid at less-broken.com
Mon Jun 12 19:06:09 EDT 2017
On 6/12/17 3:59 PM, Sean Farley wrote:
> 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.
Hmm, that might be inconvenient for extensions that need to use it,
since (as in patch 4) they may plug in at the dirstate.status or
localrepo.status level.
Seems to me that creating a wctx through repo[None] just to mutate some
state that lives on the localrepo anyway is unnecessarily indirect.
This might make a bit more sense once dirstate is in workingctx, I
guess. (I don't know what your plans are around dirstate uniqueness --
if the dirstate object isn't destroyed on invalidation like it is today,
then this state can live there.)
More information about the Mercurial-devel
mailing list