changeset 19696:210cc42a8ac2

commitablectx: move ancestor from workingctx
author Sean Farley <sean.michael.farley@gmail.com>
date Wed, 14 Aug 2013 16:37:01 -0500
parents 6c52adcaba0e
children 8c95e74857c6
files mercurial/context.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Wed Aug 14 16:25:43 2013 -0500
+++ b/mercurial/context.py	Wed Aug 14 16:37:01 2013 -0500
@@ -1030,6 +1030,10 @@
         except OSError:
             return ''
 
+    def ancestor(self, c2):
+        """return the ancestor context of self and c2"""
+        return self._parents[0].ancestor(c2) # punt on two parents for now
+
 class workingctx(commitablectx):
     """A workingctx object makes access to data related to
     the current working directory convenient.
@@ -1061,10 +1065,6 @@
         return workingfilectx(self._repo, path, workingctx=self,
                               filelog=filelog)
 
-    def ancestor(self, c2):
-        """return the ancestor context of self and c2"""
-        return self._parents[0].ancestor(c2) # punt on two parents for now
-
     def walk(self, match):
         return sorted(self._repo.dirstate.walk(match, sorted(self.substate),
                                                True, False))