Patchwork [15,of,48,RFC] commitablectx: move _status from workingctx

login
register
mail settings
Submitter Sean Farley
Date Sept. 5, 2013, 8:07 p.m.
Message ID <b3b16e061effd6c78d99.1378411629@laptop.local>
Download mbox | patch
Permalink /patch/2354/
State Accepted
Commit 375986c025394e3715287be4e40ad51ef3885f95
Headers show

Comments

Sean Farley - Sept. 5, 2013, 8:07 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1376512882 18000
#      Wed Aug 14 15:41:22 2013 -0500
# Node ID b3b16e061effd6c78d99d8aec57745ff279b6f39
# Parent  8bfb9e37eef1b3e67ccf5ece3383fef919a22b68
commitablectx: move _status from workingctx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -931,10 +931,14 @@ 
             if f in man:
                 del man[f]
 
         return man
 
+    @propertycache
+    def _status(self):
+        return self._repo.status()[:4]
+
 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.
@@ -951,14 +955,10 @@ 
         for f in d:
             if d[f] != 'r':
                 yield f
 
     @propertycache
-    def _status(self):
-        return self._repo.status()[:4]
-
-    @propertycache
     def _user(self):
         return self._repo.ui.username()
 
     @propertycache
     def _date(self):