Patchwork [13,of,36] context: move substate from changectx

login
register
mail settings
Submitter Sean Farley
Date Aug. 7, 2013, 6:13 p.m.
Message ID <9aa65e66eb781a4d9ac5.1375899193@laptop.local>
Download mbox | patch
Permalink /patch/2030/
State Superseded
Commit 1ce709021a04f56655052aa510d60e06e96d745c
Delegated to: Augie Fackler
Headers show

Comments

Sean Farley - Aug. 7, 2013, 6:13 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1375741283 18000
#      Mon Aug 05 17:21:23 2013 -0500
# Node ID 9aa65e66eb781a4d9ac54fc6ec7d889dfef2cb72
# Parent  0b673783f3caa2e53a86efdf5cd1177adacc313d
context: move substate from changectx

Patch

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):
@@ -185,14 +189,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)