comparison mercurial/changelog.py @ 45636:053c9014fd39

changing-files: retrieve changelogrevision.files from the sidedata block 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. Differential Revision: https://phab.mercurial-scm.org/D9092
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 15 Sep 2020 10:55:30 +0200
parents 9003e6524f78
children 2d6aea053153
comparison
equal deleted inserted replaced
45635:9003e6524f78 45636:053c9014fd39
317 self._changes = changes 317 self._changes = changes
318 return changes 318 return changes
319 319
320 @property 320 @property
321 def files(self): 321 def files(self):
322 if self._cpsd:
323 return sorted(self.changes.touched)
322 off = self._offsets 324 off = self._offsets
323 if off[2] == off[3]: 325 if off[2] == off[3]:
324 return [] 326 return []
325 327
326 return self._text[off[2] + 1 : off[3]].split(b'\n') 328 return self._text[off[2] + 1 : off[3]].split(b'\n')