mercurial/context.py
changeset 45088 3e40abe0a170
parent 45087 83f75f1efdcc
child 45089 d085fcb11c56
--- a/mercurial/context.py	Sat Jul 11 00:53:34 2020 +0200
+++ b/mercurial/context.py	Sat Jul 11 01:14:00 2020 +0200
@@ -481,6 +481,14 @@
             '%s does not implement mergestate()' % self.__class__
         )
 
+    def isempty(self):
+        return not (
+            len(self.parents()) > 1
+            or self.branch() != self.p1().branch()
+            or self.closesbranch()
+            or self.files()
+        )
+
 
 class changectx(basectx):
     """A changecontext object makes access to data related to a particular