[PATCH 14 of 48 RFC] commitablectx: move _manifest from workingctx
Sean Farley
sean.michael.farley at gmail.com
Thu Sep 5 15:07:08 CDT 2013
# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1376512458 18000
# Wed Aug 14 15:34:18 2013 -0500
# Node ID 8bfb9e37eef1b3e67ccf5ece3383fef919a22b68
# Parent 36c790ca1c45b7f147ce337779b001adabc0b4ea
commitablectx: move _manifest from workingctx
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -899,23 +899,10 @@
@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.
- extra - a dictionary of extra values, or None.
- changes - a list of file lists as returned by localrepo.status()
- or None to use the repository status.
- """
- 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 _manifest(self):
"""generate a manifest corresponding to the working directory"""
man = self._parents[0].manifest().copy()
@@ -944,10 +931,23 @@
if f in man:
del man[f]
return man
+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.
+ extra - a dictionary of extra values, or None.
+ changes - a list of file lists as returned by localrepo.status()
+ or None to use the repository status.
+ """
+ def __init__(self, repo, text="", user=None, date=None, extra=None,
+ changes=None):
+ super(workingctx, self).__init__(repo, text, user, date, extra, changes)
+
def __iter__(self):
d = self._repo.dirstate
for f in d:
if d[f] != 'r':
yield f
More information about the Mercurial-devel
mailing list