Show More
@@ -188,6 +188,18 class revlog: | |||||
188 | def patches(self, t, pl): |
|
188 | def patches(self, t, pl): | |
189 | return mdiff.patches(t, pl) |
|
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 | def revision(self, node): |
|
203 | def revision(self, node): | |
192 | if node == nullid: return "" |
|
204 | if node == nullid: return "" | |
193 | if self.cache and self.cache[0] == node: return self.cache[2] |
|
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