# HG changeset patch # User Yuya Nishihara # Date 2017-04-09 02:57:09 # Node ID 4d0465dd13d28586237a62fa2db8924991ac1870 # Parent 14c5a7637ecc5f57a643cf387509bc8938d252c0 sortdict: fix .pop() to return a value My future patch will need it. diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -555,11 +555,11 @@ class sortdict(dict): dict.__delitem__(self, key) self._list.remove(key) def pop(self, key, *args, **kwargs): - dict.pop(self, key, *args, **kwargs) try: self._list.remove(key) except ValueError: pass + return dict.pop(self, key, *args, **kwargs) def keys(self): return self._list[:] def iterkeys(self):