This is an archive of the discontinued Mercurial Phabricator instance.

narrow: avoid looking up dirstate again when editing dirstate
ClosedPublic

Authored by martinvonz on Oct 1 2018, 6:48 PM.

Details

Summary

The narrow extension overrides the dirstate editing functions to
restrict paths outside the narrowspec. These overrides access the
dirstate from repo.dirstate instead of using the "self" reference
passed to the overridden functions. I don't see a reason for this and
it caused me problems with a later patch (it caused infinite recursion
when I modified localrepo.dirstate()), so let's change it.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Oct 1 2018, 6:48 PM
This revision was automatically updated to reflect the committed changes.