HomePhabricator

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

Authored by mbolin.

Description

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

This replaces patterns such as this:

if f in self._copymap:
    del self._copymap[f]

with this:

self._copymap.pop(f, None)

Although eliminating the extra lookup/call may be a negligible performance win
in the standard dirstate, alternative implementations, such as
sqldirstate
may see a bigger win where each of these calls results in an RPC,
so the savings is greater.

Test Plan:
make tests

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