Patchwork [6,of,9] unionrepo: fix `revdiff` implementation to use `rawdata`

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 30, 2019, 4:39 p.m.
Message ID <365209d4ed95274c1a79.1567183175@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/41440/
State Accepted
Headers show

Comments

Pierre-Yves David - Aug. 30, 2019, 4:39 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1567181315 -7200
#      Fri Aug 30 18:08:35 2019 +0200
# Node ID 365209d4ed95274c1a79c314de89872620755605
# Parent  f547c2a0dcea052d35b45201d8e4c4e2d14c6787
# EXP-Topic sidedata-prep
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 365209d4ed95
unionrepo: fix `revdiff` implementation to use `rawdata`

The parent code is using rawdata so we should use it here. Before this change,
union repo was probably broken with some flag processors.

Patch

diff --git a/mercurial/unionrepo.py b/mercurial/unionrepo.py
--- a/mercurial/unionrepo.py
+++ b/mercurial/unionrepo.py
@@ -91,7 +91,7 @@  class unionrevlog(revlog.revlog):
         elif rev1 <= self.repotiprev and rev2 <= self.repotiprev:
             return self.baserevdiff(rev1, rev2)
 
-        return mdiff.textdiff(self.revision(rev1), self.revision(rev2))
+        return mdiff.textdiff(self.rawdata(rev1), self.rawdata(rev2))
 
     def _revisiondata(self, nodeorrev, _df=None, raw=False):
         if isinstance(nodeorrev, int):