comparison mercurial/changelog.py @ 45728:232c88dd89e3

changing-files: add a shorthand property to check for copy relevant info We are going to reuse this change in more place, so we factor it out first. Differential Revision: https://phab.mercurial-scm.org/D9197
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 13 Oct 2020 03:23:17 +0200
parents f877b3628015
children 89a2afe31e82
comparison
equal deleted inserted replaced
45727:d4c4391aa7f2 45728:232c88dd89e3
581 ) 581 )
582 sortedfiles = sorted(files.touched) 582 sortedfiles = sorted(files.touched)
583 flags = 0 583 flags = 0
584 sidedata = None 584 sidedata = None
585 if self._copiesstorage == b'changeset-sidedata': 585 if self._copiesstorage == b'changeset-sidedata':
586 if ( 586 if files.has_copies_info:
587 files.removed
588 or files.merged
589 or files.salvaged
590 or files.copied_from_p1
591 or files.copied_from_p2
592 ):
593 flags |= flagutil.REVIDX_HASCOPIESINFO 587 flags |= flagutil.REVIDX_HASCOPIESINFO
594 sidedata = metadata.encode_files_sidedata(files) 588 sidedata = metadata.encode_files_sidedata(files)
595 589
596 if extra: 590 if extra:
597 extra = encodeextra(extra) 591 extra = encodeextra(extra)