[PATCH 13 of 35 V2] context: move substate from changectx
Sean Farley
sean.michael.farley at gmail.com
Wed Aug 7 18:51:27 CDT 2013
# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1375741283 18000
# Mon Aug 05 17:21:23 2013 -0500
# Node ID a25bb9e926abaa5c787d27aa2671589a2f9f4fd2
# Parent e43d5f413432111e14823853e0ac9aeb59bc05b9
context: move substate from changectx
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -51,10 +51,14 @@
return False
def __ne__(self, other):
return not (self == other)
+ @propertycache
+ def substate(self):
+ return subrepo.state(self, self._repo.ui)
+
def rev(self):
return self._rev
def node(self):
return self._node
def hex(self):
@@ -191,14 +195,10 @@
p = self._repo.changelog.parentrevs(self._rev)
if p[1] == nullrev:
p = p[:-1]
return [changectx(self._repo, x) for x in p]
- @propertycache
- def substate(self):
- return subrepo.state(self, self._repo.ui)
-
def __contains__(self, key):
return key in self._manifest
def __getitem__(self, key):
return self.filectx(key)
More information about the Mercurial-devel
mailing list