[PATCH 43 of 48 RFC] commitablectx: move dirs from workingctx
Sean Farley
sean.michael.farley at gmail.com
Thu Sep 5 20:07:37 UTC 2013
# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1376516434 18000
# Wed Aug 14 16:40:34 2013 -0500
# Node ID 337d91d1d8fa975f2e0589d87c716cabfea98592
# Parent 2ce3f8546d756db6b937ff22c6a53308bd7a0724
commitablectx: move dirs from workingctx
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1057,10 +1057,13 @@
self._repo.dirstate.normal(f)
for f in self.removed():
self._repo.dirstate.drop(f)
self._repo.dirstate.setparents(node)
+ def dirs(self):
+ return self._repo.dirstate.dirs()
+
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.
@@ -1183,13 +1186,10 @@
self._repo.dirstate.add(dest)
self._repo.dirstate.copy(source, dest)
finally:
wlock.release()
- def dirs(self):
- return self._repo.dirstate.dirs()
-
class workingfilectx(basefilectx):
"""A workingfilectx object makes access to data related to a particular
file in the working directory convenient."""
def __init__(self, repo, path, filelog=None, workingctx=None):
self._repo = repo
More information about the Mercurial-devel
mailing list