Show More
@@ -147,7 +147,7 b' class lazyremotenamedict(collections.Mut' | |||
|
147 | 147 | for k, vtup in self.potentialentries.iteritems(): |
|
148 | 148 | yield (k, [bin(vtup[0])]) |
|
149 | 149 | |
|
150 |
class remotenames( |
|
|
150 | class remotenames(object): | |
|
151 | 151 | """ |
|
152 | 152 | This class encapsulates all the remotenames state. It also contains |
|
153 | 153 | methods to access that state in convenient ways. Remotenames are lazy |
@@ -156,14 +156,13 b' class remotenames(dict):' | |||
|
156 | 156 | """ |
|
157 | 157 | |
|
158 | 158 | def __init__(self, repo, *args): |
|
159 | dict.__init__(self, *args) | |
|
160 | 159 | self._repo = repo |
|
161 | 160 | self.clearnames() |
|
162 | 161 | |
|
163 | 162 | def clearnames(self): |
|
164 | 163 | """ Clear all remote names state """ |
|
165 |
self |
|
|
166 |
self |
|
|
164 | self.bookmarks = lazyremotenamedict("bookmarks", self._repo) | |
|
165 | self.branches = lazyremotenamedict("branches", self._repo) | |
|
167 | 166 | self._invalidatecache() |
|
168 | 167 | |
|
169 | 168 | def _invalidatecache(self): |
@@ -171,7 +170,7 b' class remotenames(dict):' | |||
|
171 | 170 | self._nodetobranch = None |
|
172 | 171 | |
|
173 | 172 | def bmarktonodes(self): |
|
174 |
return self |
|
|
173 | return self.bookmarks | |
|
175 | 174 | |
|
176 | 175 | def nodetobmarks(self): |
|
177 | 176 | if not self._nodetobmarks: |
@@ -182,7 +181,7 b' class remotenames(dict):' | |||
|
182 | 181 | return self._nodetobmarks |
|
183 | 182 | |
|
184 | 183 | def branchtonodes(self): |
|
185 |
return self |
|
|
184 | return self.branches | |
|
186 | 185 | |
|
187 | 186 | def nodetobranch(self): |
|
188 | 187 | if not self._nodetobranch: |
General Comments 0
You need to be logged in to leave comments.
Login now