Patchwork [19,of,41] basefilectx: move node from filectx

login
register
mail settings
Submitter Sean Farley
Date Aug. 12, 2013, 4:27 p.m.
Message ID <2709648f64a6a01b7584.1376324835@laptop.local>
Download mbox | patch
Permalink /patch/2146/
State Accepted
Commit 90994b176bc1887e7069e6e5d48458aa1252da74
Headers show

Comments

Sean Farley - Aug. 12, 2013, 4:27 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1376279513 18000
#      Sun Aug 11 22:51:53 2013 -0500
# Node ID 2709648f64a6a01b7584a4768612fa61fe99da2f
# Parent  37778c84ba5fafa0cca95ffab5259145da3f2f17
basefilectx: move node from filectx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -487,10 +487,12 @@ 
         return self._filelog
     def rev(self):
         return self._changeid
     def linkrev(self):
         return self._filelog.linkrev(self._filerev)
+    def node(self):
+        return self._changectx.node()
 
 class filectx(basefilectx):
     """A filecontext object makes access to data related to a particular
        filerevision convenient."""
     def __init__(self, repo, path, changeid=None, fileid=None,
@@ -543,12 +545,10 @@ 
         '''opens an arbitrary revision of the file without
         opening a new filelog'''
         return filectx(self._repo, self._path, fileid=fileid,
                        filelog=self._filelog)
 
-    def node(self):
-        return self._changectx.node()
     def hex(self):
         return hex(self.node())
     def user(self):
         return self._changectx.user()
     def date(self):