Mercurial > hg-stable
changeset 42835:62a39c868b20
unionrepo: get rid of `baserevision`
The method is not called anywhere anymore, so we can safely drop it.
Some of the comment get moved to `baserevdiff` because we did not got rid of it
(yet).
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 30 Aug 2019 18:05:24 +0200 |
parents | 64c3db458d08 |
children | 3e2520acf17b |
files | mercurial/unionrepo.py |
diffstat | 1 files changed, 5 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/unionrepo.py Fri Aug 30 17:45:38 2019 +0200 +++ b/mercurial/unionrepo.py Fri Aug 30 18:05:24 2019 +0200 @@ -112,14 +112,10 @@ def rawdata(self, nodeorrev, _df=None): return self.revision(nodeorrev, _df=_df, raw=True) - def baserevision(self, nodeorrev): - # Revlog subclasses may override 'revision' method to modify format of + def baserevdiff(self, rev1, rev2): + # Revlog subclasses may override 'revdiff' method to modify format of # content retrieved from revlog. To use unionrevlog with such class one - # needs to override 'baserevision' and make more specific call here. - return revlog.revlog.revision(self, nodeorrev) - - def baserevdiff(self, rev1, rev2): - # Exists for the same purpose as baserevision. + # needs to override 'baserevdiff' and make more specific call here. return revlog.revlog.revdiff(self, rev1, rev2) def addrevision(self, text, transaction, link, p1=None, p2=None, d=None): @@ -140,13 +136,10 @@ unionrevlog.__init__(self, opener, self.indexfile, changelog2, linkmapper) - def baserevision(self, nodeorrev): - # Although changelog doesn't override 'revision' method, some extensions + def baserevdiff(self, rev1, rev2): + # Although changelog doesn't override 'revdiff' method, some extensions # may replace this class with another that does. Same story with # manifest and filelog classes. - return changelog.changelog.revision(self, nodeorrev) - - def baserevdiff(self, rev1, rev2): return changelog.changelog.revdiff(self, rev1, rev2) class unionmanifest(unionrevlog, manifest.manifestrevlog): @@ -156,9 +149,6 @@ unionrevlog.__init__(self, opener, self.indexfile, manifest2, linkmapper) - def baserevision(self, nodeorrev): - return manifest.manifestrevlog.revision(self, nodeorrev) - def baserevdiff(self, rev1, rev2): return manifest.manifestrevlog.revdiff(self, rev1, rev2) @@ -172,9 +162,6 @@ self.repotiprev = self._revlog.repotiprev self.revlog2 = self._revlog.revlog2 - def baserevision(self, nodeorrev): - return filelog.filelog.revision(self, nodeorrev) - def baserevdiff(self, rev1, rev2): return filelog.filelog.revdiff(self, rev1, rev2)