filectx: remove dependencies on filerev
authorDurham Goode <durham@fb.com>
Thu, 30 May 2013 19:29:21 -0700
changeset 19314 bc82abe500a9
parent 19313 3b96d6e44a4d
child 19315 401b3ad26e66
filectx: remove dependencies on filerev Removing dependencies on filectx.filerev() makes it easier to create a filelog implementation that doesn't have rev numbers.
mercurial/context.py
--- a/mercurial/context.py	Sat Jun 08 22:37:08 2013 +0200
+++ b/mercurial/context.py	Thu May 30 19:29:21 2013 -0700
@@ -667,7 +667,7 @@
 
         # use linkrev to find the first changeset where self appeared
         if self.rev() != self.linkrev():
-            base = self.filectx(self.filerev())
+            base = self.filectx(self.filenode())
         else:
             base = self
 
@@ -736,7 +736,7 @@
         # prime the ancestor cache for the working directory
         acache = {}
         for c in (self, fc2):
-            if c._filerev is None:
+            if c.filenode() is None:
                 pl = [(n.path(), n.filenode()) for n in c.parents()]
                 acache[(c._path, None)] = pl