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 entry
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 entry
make tests
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
These look good to me.
mercurial/dirstate.py | ||
---|---|---|
585–588 | Possibly move this comment to just above line 590? |
mercurial/dirstate.py | ||
---|---|---|
554 | test-add.t fails here. It was self[d], not self._map[d]. |
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].