Patchwork D9092: changing-files: retrieve changelogrevision.files from the sidedata block

login
register
mail settings
Submitter phabricator
Date Sept. 26, 2020, 12:10 p.m.
Message ID <differential-rev-PHID-DREV-wehivinrqvncfrzl3lfc-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47294/
State Superseded
Headers show

Comments

phabricator - Sept. 26, 2020, 12:10 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The `files` field is know to have issue, using a list with fixed, and fixable,
  computation can only help. For example, using a fixes `files` field would be
  enough to fix issue6219 once this feature get usable in production.
  
  We focus on having thing working for now, we will deal with performance later.
  Right now we have a ironic situation were we parse sorted value from disk to
  turn them into a set and then having to sort it again.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9092

AFFECTED FILES
  mercurial/changelog.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -319,6 +319,8 @@ 
 
     @property
     def files(self):
+        if self._cpsd:
+            return sorted(self.changes.touched)
         off = self._offsets
         if off[2] == off[3]:
             return []