# HG changeset patch # User Pierre-Yves David # Date 2020-09-23 13:16:35 # Node ID 147fb889278bb74a4fb887c9527a58412b6c7a0b # Parent 4e2238ba51a494aa20626ee14f078e346c3af148 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: