[PATCH 27 of 48 RFC] commitablectx: move unknown from workingctx

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


# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1376515340 18000
#      Wed Aug 14 16:22:20 2013 -0500
# Node ID 89ad988524a170f3ec66403d5f2a0785c08f3d90
# Parent  2360c317bcd471106162a05265b1fe18c6906b9e
commitablectx: move unknown from workingctx

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -976,10 +976,13 @@
         return self._status[1]
     def removed(self):
         return self._status[2]
     def deleted(self):
         return self._status[3]
+    def unknown(self):
+        assert self._unknown is not None  # must call status first
+        return self._unknown
 
 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.
@@ -1003,13 +1006,10 @@
         p = self._repo.dirstate.parents()
         if p[1] == nullid:
             p = p[:-1]
         return [changectx(self._repo, x) for x in p]
 
-    def unknown(self):
-        assert self._unknown is not None  # must call status first
-        return self._unknown
     def ignored(self):
         assert self._ignored is not None  # must call status first
         return self._ignored
     def clean(self):
         assert self._clean is not None  # must call status first


More information about the Mercurial-devel mailing list