##// END OF EJS Templates
remotenames: port partway to python3 by using collections.MutableMapping...
Augie Fackler -
r36266:e37be270 default
parent child Browse files
Show More
@@ -22,7 +22,7 b' remotenames.branches'
22
22
23 from __future__ import absolute_import
23 from __future__ import absolute_import
24
24
25 import UserDict
25 import collections
26
26
27 from mercurial.i18n import _
27 from mercurial.i18n import _
28
28
@@ -57,7 +57,7 b" configitem('remotenames', 'branches',"
57 default=True,
57 default=True,
58 )
58 )
59
59
60 class lazyremotenamedict(UserDict.DictMixin):
60 class lazyremotenamedict(collections.MutableMapping):
61 """
61 """
62 Read-only dict-like Class to lazily resolve remotename entries
62 Read-only dict-like Class to lazily resolve remotename entries
63
63
@@ -110,6 +110,18 b' class lazyremotenamedict(UserDict.DictMi'
110 else:
110 else:
111 raise KeyError()
111 raise KeyError()
112
112
113 def __iter__(self):
114 return iter(self.potentialentries)
115
116 def __len__(self):
117 return len(self.potentialentries)
118
119 def __setitem__(self):
120 raise NotImplementedError
121
122 def __delitem__(self):
123 raise NotImplementedError
124
113 def _fetchandcache(self, key):
125 def _fetchandcache(self, key):
114 if key in self.cache:
126 if key in self.cache:
115 return self.cache[key]
127 return self.cache[key]
General Comments 0
You need to be logged in to leave comments. Login now