##// END OF EJS Templates
revlog: raise informative exception if file is missing.
Bryan O'Sullivan -
r1201:59bfbdbc default
parent child Browse files
Show More
@@ -206,11 +206,15 b' class revlog:'
206 def tip(self): return self.node(len(self.index) - 1)
206 def tip(self): return self.node(len(self.index) - 1)
207 def count(self): return len(self.index)
207 def count(self): return len(self.index)
208 def node(self, rev): return (rev < 0) and nullid or self.index[rev][6]
208 def node(self, rev): return (rev < 0) and nullid or self.index[rev][6]
209 def rev(self, node): return self.nodemap[node]
209 def rev(self, node):
210 def linkrev(self, node): return self.index[self.nodemap[node]][3]
210 try:
211 return self.nodemap[node]
212 except KeyError:
213 raise KeyError('%s: no node %s' % (self.indexfile, hex(node)))
214 def linkrev(self, node): return self.index[self.rev(node)][3]
211 def parents(self, node):
215 def parents(self, node):
212 if node == nullid: return (nullid, nullid)
216 if node == nullid: return (nullid, nullid)
213 return self.index[self.nodemap[node]][4:6]
217 return self.index[self.rev(node)][4:6]
214
218
215 def start(self, rev): return self.index[rev][0]
219 def start(self, rev): return self.index[rev][0]
216 def length(self, rev): return self.index[rev][1]
220 def length(self, rev): return self.index[rev][1]
General Comments 0
You need to be logged in to leave comments. Login now