comparison mercurial/metadata.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 e53778ad64bf
children 53c265a6fc83
comparison
equal deleted inserted replaced
45727:d4c4391aa7f2 45728:232c88dd89e3
71 and self.removed == other.removed 71 and self.removed == other.removed
72 and self.salvaged == other.salvaged 72 and self.salvaged == other.salvaged
73 and self.touched == other.touched 73 and self.touched == other.touched
74 and self.copied_from_p1 == other.copied_from_p1 74 and self.copied_from_p1 == other.copied_from_p1
75 and self.copied_from_p2 == other.copied_from_p2 75 and self.copied_from_p2 == other.copied_from_p2
76 )
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
76 ) 86 )
77 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