Show More
@@ -152,8 +152,10 b' class filestorage(object):' | |||
|
152 | 152 | def rev(self, node): |
|
153 | 153 | validatenode(node) |
|
154 | 154 | |
|
155 | # Will raise KeyError. | |
|
156 | self._indexbynode[node] | |
|
155 | try: | |
|
156 | self._indexbynode[node] | |
|
157 | except KeyError: | |
|
158 | raise error.LookupError(node, self._indexpath, _('no node')) | |
|
157 | 159 | |
|
158 | 160 | for rev, entry in self._indexbyrev.items(): |
|
159 | 161 | if entry[b'node'] == node: |
@@ -171,11 +173,8 b' class filestorage(object):' | |||
|
171 | 173 | return self.node(node) |
|
172 | 174 | |
|
173 | 175 | if len(node) == 20: |
|
174 |
|
|
|
175 |
|
|
|
176 | return node | |
|
177 | except LookupError: | |
|
178 | pass | |
|
176 | self.rev(node) | |
|
177 | return node | |
|
179 | 178 | |
|
180 | 179 | try: |
|
181 | 180 | rev = int(node) |
@@ -196,10 +195,10 b' class filestorage(object):' | |||
|
196 | 195 | rawnode = bin(node) |
|
197 | 196 | self.rev(rawnode) |
|
198 | 197 | return rawnode |
|
199 |
except |
|
|
198 | except TypeError: | |
|
200 | 199 | pass |
|
201 | 200 | |
|
202 | raise LookupError(node, self._path, _('invalid lookup input')) | |
|
201 | raise error.LookupError(node, self._path, _('invalid lookup input')) | |
|
203 | 202 | |
|
204 | 203 | def linkrev(self, rev): |
|
205 | 204 | validaterev(rev) |
@@ -280,8 +279,6 b' class filestorage(object):' | |||
|
280 | 279 | if node == nullid: |
|
281 | 280 | return b'' |
|
282 | 281 | |
|
283 | self._indexbynode[node] | |
|
284 | ||
|
285 | 282 | rev = self.rev(node) |
|
286 | 283 | flags = self.flags(rev) |
|
287 | 284 |
General Comments 0
You need to be logged in to leave comments.
Login now