changeset 45507:df87821081ee

changing-files: implement equality checking This makes debugging simpler.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 15 Sep 2020 15:03:07 +0200
parents 1f50bcc96595
children 1f5c548f15e5
files mercurial/metadata.py
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/metadata.py	Thu Sep 17 11:21:13 2020 +0200
+++ b/mercurial/metadata.py	Tue Sep 15 15:03:07 2020 +0200
@@ -50,6 +50,15 @@
         self._p1_copies = dict(p1_copies)
         self._p2_copies = dict(p2_copies)
 
+    def __eq__(self, other):
+        return (
+            self.added == other.added
+            and self.removed == other.removed
+            and self.touched == other.touched
+            and self.copied_from_p1 == other.copied_from_p1
+            and self.copied_from_p2 == other.copied_from_p2
+        )
+
     @property
     def added(self):
         """files actively added in the changeset