diff -r e6d8ee3c9ec3 -r 86aca74a063b mercurial/util.py --- 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