Patchwork [15,of,41] basefilectx: move flags from filectx

login
register
mail settings
Submitter Sean Farley
Date Aug. 12, 2013, 4:27 p.m.
Message ID <108b5d68ee93197259c9.1376324831@laptop.local>
Download mbox | patch
Permalink /patch/2143/
State Accepted
Commit 43f9ed2f64b1f1aeec1c61e803bb76496df216d4
Headers show

Comments

Sean Farley - Aug. 12, 2013, 4:27 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1376279464 18000
#      Sun Aug 11 22:51:04 2013 -0500
# Node ID 108b5d68ee93197259c98719c25603fb29474ac4
# Parent  5951512fdde230d60b9ca808bd40d402363ae560
basefilectx: move flags from filectx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -479,10 +479,12 @@ 
 
     def filerev(self):
         return self._filerev
     def filenode(self):
         return self._filenode
+    def flags(self):
+        return self._changectx.flags(self._path)
 
 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,
@@ -535,12 +537,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 flags(self):
-        return self._changectx.flags(self._path)
     def filelog(self):
         return self._filelog
     def rev(self):
         return self._changeid
     def linkrev(self):