From patchwork Wed Sep 23 21:51:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [7, of, 7] sidedata: simply read p2copies files from the `ChangingFiles` object From: Pierre-Yves David X-Patchwork-Id: 47269 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Wed, 23 Sep 2020 23:51:56 +0200 # HG changeset patch # User Pierre-Yves David # Date 1600866995 -7200 # Wed Sep 23 15:16:35 2020 +0200 # Node ID d4105e6324ea685999f43bca6cdef3b762dcdfae # Parent f45af93514600eb77c55d6f924334871ac1117ae # EXP-Topic new-metadata-pre # Available At https://foss.heptapod.net/octobus/mercurial-devel/ # hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r d4105e6324ea sidedata: simply read p2copies files from the `ChangingFiles` object diff --git a/mercurial/changelog.py b/mercurial/changelog.py --- a/mercurial/changelog.py +++ b/mercurial/changelog.py @@ -27,8 +27,6 @@ from .utils import ( stringutil, ) -from .revlogutils import sidedata as sidedatamod - _defaultextra = {b'branch': b'default'} @@ -360,9 +358,7 @@ class changelogrevision(object): @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: