Patchwork [31,of,41] basefilectx: move path from filectx

login
register
mail settings
Submitter Sean Farley
Date Aug. 12, 2013, 4:27 p.m.
Message ID <2eacec85b30a273d5f1b.1376324847@laptop.local>
Download mbox | patch
Permalink /patch/2157/
State Accepted
Commit 018ee491a6bec6ebe4b3c71a19072e95cdca5234
Headers show

Comments

Sean Farley - Aug. 12, 2013, 4:27 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1376279778 18000
#      Sun Aug 11 22:56:18 2013 -0500
# Node ID 2eacec85b30a273d5f1bbe2f322feb28273b6af0
# Parent  fd088bd643f300091ca45961c81b88bafdf162eb
basefilectx: move path from filectx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -512,10 +512,13 @@ 
     def manifest(self):
         return self._changectx.manifest()
     def changectx(self):
         return self._changectx
 
+    def path(self):
+        return 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,
                  filelog=None, changectx=None):
@@ -569,12 +572,10 @@ 
         return filectx(self._repo, self._path, fileid=fileid,
                        filelog=self._filelog)
 
     def data(self):
         return self._filelog.read(self._filenode)
-    def path(self):
-        return self._path
     def size(self):
         return self._filelog.size(self._filerev)
 
     def isbinary(self):
         try: