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

Augie Fackler raf at durin42.com
Thu Jun 1 14:21:13 UTC 2017


On Wed, May 31, 2017 at 05:28:49PM -0700, Sean Farley wrote:
> 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.

+1 - I love things that make it easier to inject alternate backends
for things into localrepo. Sounds like this is going in a good direction.

>
> That would make future work for in-memory operations easy to swap out by
> just passing in a memctx instead of workingctx.



> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list