[PATCH 1 of 2] status: cache dirstate status in _dirstatestatus()

Sean Farley sean.michael.farley at gmail.com
Thu Jan 8 19:17:27 CST 2015


Martin von Zweigbergk writes:

> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz at google.com>
> # Date 1420751564 28800
> #      Thu Jan 08 13:12:44 2015 -0800
> # Node ID f6dfcd963a13b9559445ea2c67d33bc06e58cbb6
> # Parent  7ad155e13f0f51df8e986a0ec4e58ac9a0ccedbb
> status: cache dirstate status in _dirstatestatus()
>
> Since it's only the dirstate status we cache, it makes more sense to
> cache it in the _dirstatestatus() method. Note that this change means
> the dirstate status will also be cached when status is requested
> between the working copy and some other revision, while we currently
> only cache the result if exactly the status between the working copy
> and its parent is requested.

Your analysis is correct. I kept the dirstate cache on workingctx
because it made organizational sense (workingctx is the only thing
that would care about the dirstate).

I think this reorganization is fine and caching for the other case is
fine, too (if I recall, we still use that information elsewhere?).
Anyway, these two patches look good. Nice cleanup, Martin!


More information about the Mercurial-devel mailing list