[PATCH 24 of 36] context: move filenode from changectx

Sean Farley sean.michael.farley at gmail.com
Wed Aug 7 13:13:24 CDT 2013


# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1375745320 18000
#      Mon Aug 05 18:28:40 2013 -0500
# Node ID 94fe1e0c2bfcb2e1e7f62e058c05c9837f52da8f
# Parent  c95070e5440cc77e7c9faf021127bca29fe91125
context: move filenode from changectx

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -108,10 +108,13 @@
             raise error.ManifestLookupError(self._node, path,
                                             _('not found in manifest'))
 
         return node, flag
 
+    def filenode(self, path):
+        return self._fileinfo(path)[0]
+
 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=''):
@@ -323,13 +326,10 @@
             troubles.append('bumped')
         if self.divergent():
             troubles.append('divergent')
         return troubles
 
-    def filenode(self, path):
-        return self._fileinfo(path)[0]
-
     def flags(self, path):
         try:
             return self._fileinfo(path)[1]
         except error.LookupError:
             return ''


More information about the Mercurial-devel mailing list