mercurial/unionrepo.py
changeset 37497 1541e1a8e87d
parent 34226 21fc747e1bc5
child 37717 0664be4f0c1f
equal deleted inserted replaced
37496:1765ed63db40 37497:1541e1a8e87d
    90         elif rev1 <= self.repotiprev and rev2 <= self.repotiprev:
    90         elif rev1 <= self.repotiprev and rev2 <= self.repotiprev:
    91             return self.baserevdiff(rev1, rev2)
    91             return self.baserevdiff(rev1, rev2)
    92 
    92 
    93         return mdiff.textdiff(self.revision(rev1), self.revision(rev2))
    93         return mdiff.textdiff(self.revision(rev1), self.revision(rev2))
    94 
    94 
    95     def revision(self, nodeorrev, raw=False):
    95     def revision(self, nodeorrev, _df=None, raw=False):
    96         """return an uncompressed revision of a given node or revision
    96         """return an uncompressed revision of a given node or revision
    97         number.
    97         number.
    98         """
    98         """
    99         if isinstance(nodeorrev, int):
    99         if isinstance(nodeorrev, int):
   100             rev = nodeorrev
   100             rev = nodeorrev
   161         return manifest.manifestrevlog.revision(self, nodeorrev)
   161         return manifest.manifestrevlog.revision(self, nodeorrev)
   162 
   162 
   163     def baserevdiff(self, rev1, rev2):
   163     def baserevdiff(self, rev1, rev2):
   164         return manifest.manifestrevlog.revdiff(self, rev1, rev2)
   164         return manifest.manifestrevlog.revdiff(self, rev1, rev2)
   165 
   165 
   166 class unionfilelog(unionrevlog, filelog.filelog):
   166 class unionfilelog(filelog.filelog):
   167     def __init__(self, opener, path, opener2, linkmapper, repo):
   167     def __init__(self, opener, path, opener2, linkmapper, repo):
   168         filelog.filelog.__init__(self, opener, path)
   168         filelog.filelog.__init__(self, opener, path)
   169         filelog2 = filelog.filelog(opener2, path)
   169         filelog2 = filelog.filelog(opener2, path)
   170         unionrevlog.__init__(self, opener, self.indexfile, filelog2,
   170         self._revlog = unionrevlog(opener, self.indexfile,
   171                              linkmapper)
   171                                    filelog2._revlog, linkmapper)
   172         self._repo = repo
   172         self._repo = repo
       
   173         self.repotiprev = self._revlog.repotiprev
       
   174         self.revlog2 = self._revlog.revlog2
   173 
   175 
   174     def baserevision(self, nodeorrev):
   176     def baserevision(self, nodeorrev):
   175         return filelog.filelog.revision(self, nodeorrev)
   177         return filelog.filelog.revision(self, nodeorrev)
   176 
   178 
   177     def baserevdiff(self, rev1, rev2):
   179     def baserevdiff(self, rev1, rev2):