diff -r 6788e648efcf -r 524b13fc711f mercurial/util.py --- a/mercurial/util.py Wed Aug 02 22:58:38 2017 +0900 +++ b/mercurial/util.py Wed Aug 02 22:51:19 2017 +0900 @@ -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