[PATCH 13 of 48 RFC] commitablectx: move _flagfunc from workingctx

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


# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1376512217 18000
#      Wed Aug 14 15:30:17 2013 -0500
# Node ID 36c790ca1c45b7f147ce337779b001adabc0b4ea
# Parent  b2af4914ffef7e865b2d0eff97c4de0afdbdb58b
commitablectx: move _flagfunc from workingctx

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -895,10 +895,14 @@
                     return fl1
                 return '' # punt for conflicts
 
         return func
 
+    @propertycache
+    def _flagfunc(self):
+        return self._repo.dirstate.flagfunc(self._buildflagfunc)
+
 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.
@@ -909,14 +913,10 @@
     def __init__(self, repo, text="", user=None, date=None, extra=None,
                  changes=None):
         super(workingctx, self).__init__(repo, text, user, date, extra, changes)
 
     @propertycache
-    def _flagfunc(self):
-        return self._repo.dirstate.flagfunc(self._buildflagfunc)
-
-    @propertycache
     def _manifest(self):
         """generate a manifest corresponding to the working directory"""
 
         man = self._parents[0].manifest().copy()
         if len(self._parents) > 1:


More information about the Mercurial-devel mailing list