Patchwork [6,of,7] sidedata: simply read p1copies files from the `ChangingFiles` object

login
register
mail settings
Submitter Pierre-Yves David
Date Sept. 23, 2020, 9:51 p.m.
Message ID <f45af93514600eb77c55.1600897915@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/47268/
State Accepted
Headers show

Comments

Pierre-Yves David - Sept. 23, 2020, 9:51 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1600866976 -7200
#      Wed Sep 23 15:16:16 2020 +0200
# Node ID f45af93514600eb77c55d6f924334871ac1117ae
# Parent  27f2fb9b84842c698f0e76303990cf76da095bbf
# EXP-Topic new-metadata-pre
# Available At https://foss.heptapod.net/octobus/mercurial-devel/
#              hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r f45af9351460
sidedata: simply read p1copies files from the `ChangingFiles` object

Patch

diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -350,9 +350,7 @@  class changelogrevision(object):
     @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: