Patchwork [20,of,36] context: move parents from changectx

login
register
mail settings
Submitter Sean Farley
Date Aug. 7, 2013, 6:13 p.m.
Message ID <61bc54b101e10e9534e6.1375899200@laptop.local>
Download mbox | patch
Permalink /patch/2037/
State Superseded
Commit 4237139362cfa7ef51332f564a8d4645a3bd992a
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 1375744778 18000
#      Mon Aug 05 18:19:38 2013 -0500
# Node ID 61bc54b101e10e9534e6b328ff8369e361c4296d
# Parent  17abbc076a57267fe7fed57001c2fd4dcbcaf46a
context: move parents from changectx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -78,10 +78,14 @@ 
     def phasestr(self):
         return phases.phasenames[self.phase()]
     def mutable(self):
         return self.phase() > phases.public
 
+    def parents(self):
+        """return contexts for each parent changeset"""
+        return self._parents
+
 class changectx(context):
     """A changecontext object makes access to data related to a particular
     changeset convenient. It represents a read-only context already presnt in
     the repo."""
     def __init__(self, repo, changeid=''):
@@ -233,14 +237,10 @@ 
     def phase(self):
         return self._repo._phasecache.phase(self._repo, self._rev)
     def hidden(self):
         return self._rev in repoview.filterrevs(self._repo, 'visible')
 
-    def parents(self):
-        """return contexts for each parent changeset"""
-        return self._parents
-
     def p1(self):
         return self._parents[0]
 
     def p2(self):
         if len(self._parents) == 2: