basectx: move p1 from changectx
authorSean Farley <sean.michael.farley@gmail.com>
Mon, 05 Aug 2013 18:26:15 -0500
changeset 19557 9f57ebf0cce8
parent 19556 732ee7fff35a
child 19558 d0448e9d4554
basectx: move p1 from changectx
mercurial/context.py
--- a/mercurial/context.py	Mon Aug 05 18:19:38 2013 -0500
+++ b/mercurial/context.py	Mon Aug 05 18:26:15 2013 -0500
@@ -84,6 +84,9 @@
         """return contexts for each parent changeset"""
         return self._parents
 
+    def p1(self):
+        return self._parents[0]
+
 class changectx(basectx):
     """A changecontext object makes access to data related to a particular
     changeset convenient. It represents a read-only context already presnt in
@@ -245,9 +248,6 @@
     def hidden(self):
         return self._rev in repoview.filterrevs(self._repo, 'visible')
 
-    def p1(self):
-        return self._parents[0]
-
     def p2(self):
         if len(self._parents) == 2:
             return self._parents[1]