[PATCH 23 of 48 RFC] commitablectx: move modified from workingctx

Sean Farley sean.michael.farley at gmail.com
Thu Sep 5 15:07:17 CDT 2013


# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1376514898 18000
#      Wed Aug 14 16:14:58 2013 -0500
# Node ID 03874cca7c1612cfd557d218dfc0bcd0c64ff1e2
# Parent  993961ddaba89574e7929ecfbb359519ebad25f3
commitablectx: move modified from workingctx

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -968,10 +968,13 @@
     def description(self):
         return self._text
     def files(self):
         return sorted(self._status[0] + self._status[1] + self._status[2])
 
+    def modified(self):
+        return self._status[0]
+
 class workingctx(commitablectx):
     """A workingctx object makes access to data related to
     the current working directory convenient.
     date - any valid date string or (unixtime, offset), or None.
     user - username string, or None.
@@ -994,12 +997,10 @@
         p = self._repo.dirstate.parents()
         if p[1] == nullid:
             p = p[:-1]
         return [changectx(self._repo, x) for x in p]
 
-    def modified(self):
-        return self._status[0]
     def added(self):
         return self._status[1]
     def removed(self):
         return self._status[2]
     def deleted(self):


More information about the Mercurial-devel mailing list