Show More
@@ -1961,6 +1961,8 b' def dispatch(args):' | |||
|
1961 | 1961 | raise |
|
1962 | 1962 | except hg.RepoError, inst: |
|
1963 | 1963 | u.warn("abort: ", inst, "!\n") |
|
1964 | except revlog.RevlogError, inst: | |
|
1965 | u.warn("abort: ", inst, "!\n") | |
|
1964 | 1966 | except SignalInterrupt: |
|
1965 | 1967 | u.warn("killed!\n") |
|
1966 | 1968 | except KeyboardInterrupt: |
@@ -111,7 +111,8 b' class lazymap:' | |||
|
111 | 111 | def load(self, key): |
|
112 | 112 | if self.p.all: return |
|
113 | 113 | n = self.p.data.find(key) |
|
114 | if n < 0: raise KeyError("node " + hex(key)) | |
|
114 | if n < 0: | |
|
115 | raise KeyError(key) | |
|
115 | 116 | pos = n / self.p.s |
|
116 | 117 | self.p.load(pos) |
|
117 | 118 | def __contains__(self, key): |
@@ -210,7 +211,7 b' class revlog:' | |||
|
210 | 211 | try: |
|
211 | 212 | return self.nodemap[node] |
|
212 | 213 | except KeyError: |
|
213 |
raise |
|
|
214 | raise RevlogError('%s: no node %s' % (self.indexfile, hex(node))) | |
|
214 | 215 | def linkrev(self, node): return self.index[self.rev(node)][3] |
|
215 | 216 | def parents(self, node): |
|
216 | 217 | if node == nullid: return (nullid, nullid) |
@@ -290,8 +291,8 b' class revlog:' | |||
|
290 | 291 | for n in self.nodemap: |
|
291 | 292 | if hex(n).startswith(id): |
|
292 | 293 | c.append(n) |
|
293 |
if len(c) > 1: raise |
|
|
294 |
if len(c) < 1: raise |
|
|
294 | if len(c) > 1: raise RevlogError("Ambiguous identifier") | |
|
295 | if len(c) < 1: raise RevlogError("No match found") | |
|
295 | 296 | return c[0] |
|
296 | 297 | |
|
297 | 298 | return None |
@@ -353,7 +354,7 b' class revlog:' | |||
|
353 | 354 | text = mdiff.patches(text, bins) |
|
354 | 355 | |
|
355 | 356 | if node != hash(text, p1, p2): |
|
356 |
raise |
|
|
357 | raise RevlogError("integrity check failed on %s:%d" | |
|
357 | 358 | % (self.datafile, rev)) |
|
358 | 359 | |
|
359 | 360 | self.cache = (node, rev, text) |
General Comments 0
You need to be logged in to leave comments.
Login now