committablectx: move status-related methods closer together
authorMartin von Zweigbergk <martinvonz@google.com>
Wed, 20 Feb 2019 21:57:39 -0800
changeset 41789 2ba96fca8528
parent 41788 19979b8b87e2
child 41790 4d21ebc4cb47
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
mercurial/context.py
--- 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):