Patchwork [17,of,48,RFC] commitablectx: move _user from workingctx

login
register
mail settings
Submitter Sean Farley
Date Sept. 5, 2013, 8:07 p.m.
Message ID <275fafe6656b04af2fb0.1378411631@laptop.local>
Download mbox | patch
Permalink /patch/2355/
State Accepted
Commit ec5b2e2b947f9395004ebbbb47a5714969071f43
Headers show

Comments

Sean Farley - Sept. 5, 2013, 8:07 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1376581913 18000
#      Thu Aug 15 10:51:53 2013 -0500
# Node ID 275fafe6656b04af2fb0f7ea2f04ff7b8d5ce05c
# Parent  ceeea0dab0bf57d838d4018c639087a7de1251b2
commitablectx: move _user from workingctx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -935,10 +935,14 @@ 
 
     @propertycache
     def _status(self):
         return self._repo.status()[:4]
 
+    @propertycache
+    def _user(self):
+        return self._repo.ui.username()
+
     def status(self, ignored=False, clean=False, unknown=False):
         """Explicit status query
         Unless this method is used to query the working copy status, the
         _status property will implicitly read the status using its default
         arguments."""
@@ -971,14 +975,10 @@ 
         for f in d:
             if d[f] != 'r':
                 yield f
 
     @propertycache
-    def _user(self):
-        return self._repo.ui.username()
-
-    @propertycache
     def _date(self):
         return util.makedate()
 
     @propertycache
     def _parents(self):