HomePhabricator

dirstate: perform transactions with _map using single call, where possible

Authored by mbolin.

Description

dirstate: perform transactions with _map using single call, where possible

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

Test Plan:
make tests

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

Details

Committed
mbolinSep 14 2017, 12:41 PM
Differential Revision
D663: dirstate: perform transactions with _map using single call, where possible
Parents
rHG4c5730c21523: extensions: register config item early
Branches
Unknown
Tags
Unknown