Patchwork [06,of,41] basefilectx: move _repopath from filectx

login
register
mail settings
Submitter Sean Farley
Date Aug. 12, 2013, 4:27 p.m.
Message ID <b52d572a217745ae1107.1376324822@laptop.local>
Download mbox | patch
Permalink /patch/2133/
State Accepted
Commit b52d572a217745ae11073fb7f6f11ba0c0727abb
Headers show

Comments

Sean Farley - Aug. 12, 2013, 4:27 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1376279091 18000
#      Sun Aug 11 22:44:51 2013 -0500
# Node ID b52d572a217745ae11073fb7f6f11ba0c0727abb
# Parent  18bbd8a3abf3acd7d7b1a9ea53eed53edd5ae0eb
basefilectx: move _repopath from filectx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -441,10 +441,14 @@ 
 
     @propertycache
     def _filerev(self):
         return self._filelog.rev(self._filenode)
 
+    @propertycache
+    def _repopath(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):
@@ -490,14 +494,10 @@ 
             # Linkrevs have several serious troubles with filtering that are
             # complicated to solve. Proper handling of the issue here should be
             # considered when solving linkrev issue are on the table.
             return changectx(self._repo.unfiltered(), self._changeid)
 
-    @propertycache
-    def _repopath(self):
-        return self._path
-
     def __nonzero__(self):
         try:
             self._filenode
             return True
         except error.LookupError: