[PATCH 24 of 35 V2] context: move filenode from changectx

Sean Farley sean.michael.farley at gmail.com
Wed Aug 7 18:51:38 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 994afde0c14df4faa5129e1b24ee5f6b885af57b
# Parent  e7ead5d535b97b50d44b8202b1fad2ccbef7762e
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=''):
@@ -329,13 +332,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