Skip to content
Snippets Groups Projects
Commit 43d3b09b authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

repo: move unfiltered-repo optimization to workingctx

localrepo.__getitem__ special-cased lookup of the working copy parent
to avoid looking up obsmarkers. I think the reason for that code
(which I once wrote myself) was to make `hg commit` not load
obsmarkers, which it would otherwise do via ctx.p1() in
localrepo.commitctx().

That had the somewhat unfortunate consequence of making lookup of an
unrelated binary nodeid load the dirstate. Now that changectx's
constructor is dumb, we can let workingctx._parents() have the
opmtimization instead.

This affects two tests, because they no longer end up loading the
dirstate and their "warning: ignoring unknown working parent ..."
messages therefore go way.

Differential Revision: https://phab.mercurial-scm.org/D4828
parent 3d35304b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment