sidedata: simply read p1copies files from the `ChangingFiles` object
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 23 Sep 2020 15:16:16 +0200
changeset 45577 4e2238ba51a4
parent 45576 f9a67afcc33b
child 45578 147fb889278b
sidedata: simply read p1copies files from the `ChangingFiles` object
mercurial/changelog.py
--- a/mercurial/changelog.py	Wed Sep 23 15:16:01 2020 +0200
+++ b/mercurial/changelog.py	Wed Sep 23 15:16:16 2020 +0200
@@ -350,9 +350,7 @@
     @property
     def p1copies(self):
         if self._cpsd:
-            rawcopies = self._sidedata.get(sidedatamod.SD_P1COPIES)
-            if not rawcopies:
-                return {}
+            return self.changes.copied_from_p1
         else:
             rawcopies = self.extra.get(b'p1copies')
         if rawcopies is None: