HomePhabricator

cleanup: fix leakage of dirstate._map to client code

Authored by durin42.

Description

cleanup: fix leakage of dirstate._map to client code

We already had proper accessors for most of the behavior of
dirstate._map that callers cared about exposed in the actual dirstate
class as public methods. Sigh.

There are two remaining privacy violations in the codebase after this change:

  1. In the perf extension, which I suspect has to stick around because it's really testing the dirstate implementation directly
  2. In largefiles, where we deal with standins and mutating status. Looking at this, I _strongly_ suspect a formal dirstate interface would allow this to work via composition instead of inheritance and monkeypatching. Fortunately, such wins are a part of my motivation for this work. I anticipate we'll come back to this in due time.

Differential Revision: https://phab.mercurial-scm.org/D6837

Details

Committed
durin42Sep 10 2019, 9:41 AM
Differential Revision
D6837: cleanup: fix leakage of dirstate._map to client code
Parents
rHG9fd7710d9ae2: exchange: convert bookmark nodes from hex to bin ASAP
Branches
Unknown
Tags
Unknown