[PATCH 1 of 3 RFC] context: move dirstate to workingctx

Sean Farley sean at farley.io
Wed May 31 20:28:49 EDT 2017


Sean Farley <sean at farley.io> writes:

> # HG changeset patch
> # User Sean Farley <sean at farley.io>
> # Date 1494536549 25200
> #      Thu May 11 14:02:29 2017 -0700
> # Branch wctxds
> # Node ID 498dae194ccf1e82caed51a02e6ce0b77f8d92e8
> # Parent  c8f9bb73d4308b5629ac786fd5e671ed717b2b58
> context: move dirstate to workingctx
>
> This commit eventually needs to be broken up (so consider this a WIP).
> Currently, dirstate is mostly an implementation optimization to prevent
> reading the status from disk. It's also a staging area for metadata for
> the next commit (never mind the branch name ;-)).
>
> As such, let's move the dirstate to workingctx and split up the logic
> for the metadata at some point later.

This is a request-for-comment about removing the dirstate property from
localrepo before going all the way through with it. The general idea is
that things involving the working directory will be migrated to
workingctx and localrepo will no long having methods to access the disk.

That would make future work for in-memory operations easy to swap out by
just passing in a memctx instead of workingctx.
-------------- 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/20170531/a83b1e6d/attachment.sig>


More information about the Mercurial-devel mailing list