Mercurial > public > mercurial-scm > hg
diff mercurial/util.py @ 33736:86aca74a063b
merge with stable
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 10 Aug 2017 14:23:41 -0400 |
parents | 1d5e497c08b3 524b13fc711f |
children | 02a745c20121 |
line wrap: on
line diff
--- a/mercurial/util.py Wed Aug 02 19:49:57 2017 +0200 +++ b/mercurial/util.py Thu Aug 10 14:23:41 2017 -0400 @@ -584,6 +584,14 @@ del self[key] super(sortdict, self).__setitem__(key, value) + if pycompat.ispypy: + # __setitem__() isn't called as of PyPy 5.8.0 + def update(self, src): + if isinstance(src, dict): + src = src.iteritems() + for k, v in src: + self[k] = v + @contextlib.contextmanager def acceptintervention(tr=None): """A context manager that closes the transaction on InterventionRequired