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

login
register
mail settings
Submitter Sean Farley
Date Aug. 7, 2013, 11:51 p.m.
Message ID <994afde0c14df4faa512.1375919498@laptop.local>
Download mbox | patch
Permalink /patch/2077/
State Accepted
Headers show

Comments

Sean Farley - Aug. 7, 2013, 11:51 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1375745320 18000
#      Mon Aug 05 18:28:40 2013 -0500
# Node ID 994afde0c14df4faa5129e1b24ee5f6b885af57b
# Parent  e7ead5d535b97b50d44b8202b1fad2ccbef7762e
context: move filenode from changectx

Patch

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 ''