This is an archive of the discontinued Mercurial Phabricator instance.

dirstate: gate access to self._map.dirs
Needs RevisionPublic

Authored by mbolin on Nov 3 2017, 6:59 PM.

Details

Reviewers
mbthomas
Group Reviewers
hg-reviewers
Summary

_droppath() already checks "dirs" in self._map.__dict__ before accessing
self._map.dirs. This updates _addpath() to be equally cautious.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

mbolin created this revision.Nov 3 2017, 6:59 PM
mbthomas requested changes to this revision.Nov 3 2017, 7:15 PM
mbthomas added inline comments.
mercurial/dirstate.py
405

I don't think it's safe to do this. We're looking for clashes between files and directories, so we do need to look in self.dirs, even if that means generating it because we're accessing it for the first time.

This revision now requires changes to proceed.Nov 3 2017, 7:15 PM
pulkit added a subscriber: pulkit.Jun 14 2018, 3:55 PM

Do we need this anymore or can this be abandoned? (trying to close some not-required-any-more differentials)