changeset 45578:147fb889278b

sidedata: simply read p2copies files from the `ChangingFiles` object
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 23 Sep 2020 15:16:35 +0200
parents 4e2238ba51a4
children c1b603cdc95a
files mercurial/changelog.py
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/changelog.py	Wed Sep 23 15:16:16 2020 +0200
+++ b/mercurial/changelog.py	Wed Sep 23 15:16:35 2020 +0200
@@ -27,8 +27,6 @@
     stringutil,
 )
 
-from .revlogutils import sidedata as sidedatamod
-
 _defaultextra = {b'branch': b'default'}
 
 
@@ -360,9 +358,7 @@
     @property
     def p2copies(self):
         if self._cpsd:
-            rawcopies = self._sidedata.get(sidedatamod.SD_P2COPIES)
-            if not rawcopies:
-                return {}
+            return self.changes.copied_from_p2
         else:
             rawcopies = self.extra.get(b'p2copies')
         if rawcopies is None: