[PATCH 15 of 48 RFC] commitablectx: move _status from workingctx
Sean Farley
sean.michael.farley at gmail.com
Thu Sep 5 20:07:09 UTC 2013
# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1376512882 18000
# Wed Aug 14 15:41:22 2013 -0500
# Node ID b3b16e061effd6c78d99d8aec57745ff279b6f39
# Parent 8bfb9e37eef1b3e67ccf5ece3383fef919a22b68
commitablectx: move _status from workingctx
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):
More information about the Mercurial-devel
mailing list