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

login
register
mail settings
Submitter Sean Farley
Date Sept. 5, 2013, 8:07 p.m.
Message ID <36c790ca1c45b7f147ce.1378411627@laptop.local>
Download mbox | patch
Permalink /patch/2351/
State Accepted
Commit 6ac735fbea502624e03cd4c585a99b6a3ec71958
Headers show

Comments

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

Patch

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: