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

login
register
mail settings
Submitter Sean Farley
Date Aug. 7, 2013, 6:13 p.m.
Message ID <94fe1e0c2bfcb2e1e7f6.1375899204@laptop.local>
Download mbox | patch
Permalink /patch/2040/
State Superseded
Commit 66c11e35a7e87e1583276eefdc85677f50bd67d3
Delegated to: Augie Fackler
Headers show

Comments

Sean Farley - Aug. 7, 2013, 6:13 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 94fe1e0c2bfcb2e1e7f62e058c05c9837f52da8f
# Parent  c95070e5440cc77e7c9faf021127bca29fe91125
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=''):
@@ -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 ''