Show More
@@ -14,7 +14,6 b' allowing operations like diff and log wi' | |||||
14 | from __future__ import absolute_import |
|
14 | from __future__ import absolute_import | |
15 |
|
15 | |||
16 | from .i18n import _ |
|
16 | from .i18n import _ | |
17 | from .node import nullid |
|
|||
18 |
|
17 | |||
19 | from . import ( |
|
18 | from . import ( | |
20 | changelog, |
|
19 | changelog, | |
@@ -94,10 +93,7 b' class unionrevlog(revlog.revlog):' | |||||
94 |
|
93 | |||
95 | return mdiff.textdiff(self.revision(rev1), self.revision(rev2)) |
|
94 | return mdiff.textdiff(self.revision(rev1), self.revision(rev2)) | |
96 |
|
95 | |||
97 | def revision(self, nodeorrev, _df=None, raw=False): |
|
96 | def _revisiondata(self, nodeorrev, _df=None, raw=False): | |
98 | """return an uncompressed revision of a given node or revision |
|
|||
99 | number. |
|
|||
100 | """ |
|
|||
101 | if isinstance(nodeorrev, int): |
|
97 | if isinstance(nodeorrev, int): | |
102 | rev = nodeorrev |
|
98 | rev = nodeorrev | |
103 | node = self.node(rev) |
|
99 | node = self.node(rev) | |
@@ -105,16 +101,13 b' class unionrevlog(revlog.revlog):' | |||||
105 | node = nodeorrev |
|
101 | node = nodeorrev | |
106 | rev = self.rev(node) |
|
102 | rev = self.rev(node) | |
107 |
|
103 | |||
108 | if node == nullid: |
|
|||
109 | return "" |
|
|||
110 |
|
||||
111 | if rev > self.repotiprev: |
|
104 | if rev > self.repotiprev: | |
112 | text = self.revlog2.revision(node) |
|
105 | # work around manifestrevlog NOT being a revlog | |
113 | self._revisioncache = (node, rev, text) |
|
106 | revlog2 = getattr(self.revlog2, '_revlog', self.revlog2) | |
|
107 | func = revlog2._revisiondata | |||
114 | else: |
|
108 | else: | |
115 | text = self.baserevision(rev) |
|
109 | func = super(unionrevlog, self)._revisiondata | |
116 | # already cached |
|
110 | return func(node, _df=_df, raw=raw) | |
117 | return text |
|
|||
118 |
|
111 | |||
119 | def rawdata(self, nodeorrev, _df=None): |
|
112 | def rawdata(self, nodeorrev, _df=None): | |
120 | return self.revision(nodeorrev, _df=_df, raw=True) |
|
113 | return self.revision(nodeorrev, _df=_df, raw=True) |
General Comments 0
You need to be logged in to leave comments.
Login now