##// END OF EJS Templates
Add code to retrieve or construct a revlog delta
mpm@selenic.com -
r119:c7a66f97 default
parent child Browse files
Show More
@@ -188,6 +188,18 class revlog:
188 188 def patches(self, t, pl):
189 189 return mdiff.patches(t, pl)
190 190
191 def delta(self, node):
192 r = self.rev(node)
193 b = self.base(r)
194 if r == b:
195 return self.diff(self.revision(self.node(r - 1)),
196 self.revision(node))
197 else:
198 f = self.opener(self.datafile)
199 f.seek(self.start(r))
200 data = f.read(self.length(r))
201 return decompress(data)
202
191 203 def revision(self, node):
192 204 if node == nullid: return ""
193 205 if self.cache and self.cache[0] == node: return self.cache[2]
General Comments 0
You need to be logged in to leave comments. Login now