changeset 31878:4d0465dd13d2

sortdict: fix .pop() to return a value My future patch will need it.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 09 Apr 2017 11:57:09 +0900
parents 14c5a7637ecc
children 868ec199cad0
files mercurial/util.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Mon Apr 10 17:05:54 2017 +0200
+++ b/mercurial/util.py	Sun Apr 09 11:57:09 2017 +0900
@@ -555,11 +555,11 @@
         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):