##// END OF EJS Templates
unionrepo: drop `baserevdiff`...
marmoute -
r43096:f8b5da99 default
parent child Browse files
Show More
@@ -112,12 +112,6 b' class unionrevlog(revlog.revlog):'
112 def rawdata(self, nodeorrev, _df=None):
112 def rawdata(self, nodeorrev, _df=None):
113 return self.revision(nodeorrev, _df=_df, raw=True)
113 return self.revision(nodeorrev, _df=_df, raw=True)
114
114
115 def baserevdiff(self, rev1, rev2):
116 # Revlog subclasses may override 'revdiff' method to modify format of
117 # content retrieved from revlog. To use unionrevlog with such class one
118 # needs to override 'baserevdiff' and make more specific call here.
119 return revlog.revlog.revdiff(self, rev1, rev2)
120
121 def addrevision(self, text, transaction, link, p1=None, p2=None, d=None):
115 def addrevision(self, text, transaction, link, p1=None, p2=None, d=None):
122 raise NotImplementedError
116 raise NotImplementedError
123 def addgroup(self, deltas, linkmapper, transaction, addrevisioncb=None,
117 def addgroup(self, deltas, linkmapper, transaction, addrevisioncb=None,
@@ -136,12 +130,6 b' class unionchangelog(unionrevlog, change'
136 unionrevlog.__init__(self, opener, self.indexfile, changelog2,
130 unionrevlog.__init__(self, opener, self.indexfile, changelog2,
137 linkmapper)
131 linkmapper)
138
132
139 def baserevdiff(self, rev1, rev2):
140 # Although changelog doesn't override 'revdiff' method, some extensions
141 # may replace this class with another that does. Same story with
142 # manifest and filelog classes.
143 return changelog.changelog.revdiff(self, rev1, rev2)
144
145 class unionmanifest(unionrevlog, manifest.manifestrevlog):
133 class unionmanifest(unionrevlog, manifest.manifestrevlog):
146 def __init__(self, opener, opener2, linkmapper):
134 def __init__(self, opener, opener2, linkmapper):
147 manifest.manifestrevlog.__init__(self, opener)
135 manifest.manifestrevlog.__init__(self, opener)
@@ -149,9 +137,6 b' class unionmanifest(unionrevlog, manifes'
149 unionrevlog.__init__(self, opener, self.indexfile, manifest2,
137 unionrevlog.__init__(self, opener, self.indexfile, manifest2,
150 linkmapper)
138 linkmapper)
151
139
152 def baserevdiff(self, rev1, rev2):
153 return manifest.manifestrevlog.revdiff(self, rev1, rev2)
154
155 class unionfilelog(filelog.filelog):
140 class unionfilelog(filelog.filelog):
156 def __init__(self, opener, path, opener2, linkmapper, repo):
141 def __init__(self, opener, path, opener2, linkmapper, repo):
157 filelog.filelog.__init__(self, opener, path)
142 filelog.filelog.__init__(self, opener, path)
@@ -162,9 +147,6 b' class unionfilelog(filelog.filelog):'
162 self.repotiprev = self._revlog.repotiprev
147 self.repotiprev = self._revlog.repotiprev
163 self.revlog2 = self._revlog.revlog2
148 self.revlog2 = self._revlog.revlog2
164
149
165 def baserevdiff(self, rev1, rev2):
166 return filelog.filelog.revdiff(self, rev1, rev2)
167
168 def iscensored(self, rev):
150 def iscensored(self, rev):
169 """Check if a revision is censored."""
151 """Check if a revision is censored."""
170 if rev <= self.repotiprev:
152 if rev <= self.repotiprev:
General Comments 0
You need to be logged in to leave comments. Login now