##// END OF EJS Templates
changing-files: add a shorthand property to check for copy relevant info...
marmoute -
r46320:232c88dd default
parent child Browse files
Show More
@@ -583,13 +583,7 b' class changelog(revlog.revlog):'
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
@@ -75,6 +75,16 b' class ChangingFiles(object):'
75 and self.copied_from_p2 == other.copied_from_p2
75 and self.copied_from_p2 == other.copied_from_p2
76 )
76 )
77
77
78 @property
79 def has_copies_info(self):
80 return bool(
81 self.removed
82 or self.merged
83 or self.salvaged
84 or self.copied_from_p1
85 or self.copied_from_p2
86 )
87
78 @util.propertycache
88 @util.propertycache
79 def added(self):
89 def added(self):
80 """files actively added in the changeset
90 """files actively added in the changeset
General Comments 0
You need to be logged in to leave comments. Login now