changeset 41789:2ba96fca8528

committablectx: move status-related methods closer together The modified()/added()/removed()/deleted() clearly belong very close to status(). I separated them in committablectx by the new p[12]copies() methods. This brings the close again. Sorry about the churn. Differential Revision: https://phab.mercurial-scm.org/D5996
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 20 Feb 2019 21:57:39 -0800
parents 19979b8b87e2
children 4d21ebc4cb47
files mercurial/context.py
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Thu Feb 21 23:07:54 2019 -0500
+++ b/mercurial/context.py	Wed Feb 20 21:57:39 2019 -0800
@@ -1183,6 +1183,14 @@
     def files(self):
         return sorted(self._status.modified + self._status.added +
                       self._status.removed)
+    def modified(self):
+        return self._status.modified
+    def added(self):
+        return self._status.added
+    def removed(self):
+        return self._status.removed
+    def deleted(self):
+        return self._status.deleted
     @propertycache
     def _copies(self):
         p1copies = {}
@@ -1203,14 +1211,6 @@
         return self._copies[0]
     def p2copies(self):
         return self._copies[1]
-    def modified(self):
-        return self._status.modified
-    def added(self):
-        return self._status.added
-    def removed(self):
-        return self._status.removed
-    def deleted(self):
-        return self._status.deleted
     def branch(self):
         return encoding.tolocal(self._extra['branch'])
     def closesbranch(self):