[PATCH 3 of 4 V3] dirstate: add code to update the non-normal map when it should be

Bryan O'Sullivan bos at serpentine.com
Thu Dec 17 14:49:05 CST 2015


On Thu, Dec 17, 2015 at 10:24 AM, Laurent Charignon <lcharignon at fb.com>
wrote:

> +        if f in self._nonnormalmap:
> +            del self._nonnormalmap[f]
>

Pro tip for this kind of code is that it can be written as a more efficient
one-liner.

self._nonnormalmap.pop(f, None)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20151217/6530a54d/attachment.html>


More information about the Mercurial-devel mailing list