Patchwork [19,of,48,RFC] commitablectx: move _date from workingctx

login
register
mail settings
Submitter Sean Farley
Date Sept. 5, 2013, 8:07 p.m.
Message ID <f62cbdee6fa949652cf7.1378411633@laptop.local>
Download mbox | patch
Permalink /patch/2358/
State Accepted
Commit 103525f36337109aee7def9b219c18666fc9ee6e
Headers show

Comments

Sean Farley - Sept. 5, 2013, 8:07 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1376582263 18000
#      Thu Aug 15 10:57:43 2013 -0500
# Node ID f62cbdee6fa949652cf723b830834238e470525e
# Parent  ab2af026ad1aa11afa88f43c45067f5e6422bd3e
commitablectx: move _date from workingctx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -939,10 +939,14 @@ 
 
     @propertycache
     def _user(self):
         return self._repo.ui.username()
 
+    @propertycache
+    def _date(self):
+        return util.makedate()
+
     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."""
@@ -978,14 +982,10 @@ 
         for f in d:
             if d[f] != 'r':
                 yield f
 
     @propertycache
-    def _date(self):
-        return util.makedate()
-
-    @propertycache
     def _parents(self):
         p = self._repo.dirstate.parents()
         if p[1] == nullid:
             p = p[:-1]
         return [changectx(self._repo, x) for x in p]