This is in the same style as https://phab.mercurial-scm.org/D493.
In general, this replaces patterns such as:
f in self._map:
entry = self._map[f]with:
entry = self._map.get(f):
if entry is not None:
# use entryThis is in the same style as https://phab.mercurial-scm.org/D493.
In general, this replaces patterns such as:
f in self._map:
entry = self._map[f]with:
entry = self._map.get(f):
if entry is not None:
# use entrymake tests
| Lint Skipped |
| Unit Tests Skipped |
These look good to me.
| mercurial/dirstate.py | ||
|---|---|---|
| 585–588 | Possibly move this comment to just above line 590? | |
| mercurial/dirstate.py | ||
|---|---|---|
| 554 | My bad: fixed without bringing the extra lookup back. | |
test-add.t fails here. It was self[d], not self._map[d].