hgext/remotenames.py
changeset 36493 1bd132a021dd
parent 36470 bb852a525633
child 36620 121a20e5da56
--- a/hgext/remotenames.py	Sun Feb 25 17:22:25 2018 -0500
+++ b/hgext/remotenames.py	Wed Feb 21 14:36:42 2018 +0530
@@ -147,7 +147,7 @@
         for k, vtup in self.potentialentries.iteritems():
             yield (k, [bin(vtup[0])])
 
-class remotenames(dict):
+class remotenames(object):
     """
     This class encapsulates all the remotenames state. It also contains
     methods to access that state in convenient ways. Remotenames are lazy
@@ -156,14 +156,13 @@
     """
 
     def __init__(self, repo, *args):
-        dict.__init__(self, *args)
         self._repo = repo
         self.clearnames()
 
     def clearnames(self):
         """ Clear all remote names state """
-        self['bookmarks'] = lazyremotenamedict("bookmarks", self._repo)
-        self['branches'] = lazyremotenamedict("branches", self._repo)
+        self.bookmarks = lazyremotenamedict("bookmarks", self._repo)
+        self.branches = lazyremotenamedict("branches", self._repo)
         self._invalidatecache()
 
     def _invalidatecache(self):
@@ -171,7 +170,7 @@
         self._nodetobranch = None
 
     def bmarktonodes(self):
-        return self['bookmarks']
+        return self.bookmarks
 
     def nodetobmarks(self):
         if not self._nodetobmarks:
@@ -182,7 +181,7 @@
         return self._nodetobmarks
 
     def branchtonodes(self):
-        return self['branches']
+        return self.branches
 
     def nodetobranch(self):
         if not self._nodetobranch: