Patchwork [30,of,35,V2] context: move dirs from changectx

login
register
mail settings
Submitter Sean Farley
Date Aug. 7, 2013, 11:51 p.m.
Message ID <6971f5efab751e3ec3a6.1375919504@laptop.local>
Download mbox | patch
Permalink /patch/2083/
State Accepted
Headers show

Comments

Sean Farley - Aug. 7, 2013, 11:51 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1375746116 18000
#      Mon Aug 05 18:41:56 2013 -0500
# Node ID 6971f5efab751e3ec3a655da3dfe088dc6db9f6a
# Parent  8994c72ce4de432b1e4ffef16fd2639981f03c20
context: move dirs from changectx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -140,10 +140,13 @@ 
 
     @propertycache
     def _dirs(self):
         return scmutil.dirs(self._manifest)
 
+    def dirs(self):
+        return self._dirs
+
 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=''):
@@ -401,13 +404,10 @@ 
                 # specified pattern is a directory
                 continue
             if match.bad(fn, _('no such file in rev %s') % self) and match(fn):
                 yield fn
 
-    def dirs(self):
-        return self._dirs
-
     def dirty(self):
         return False
 
 class filectx(object):
     """A filecontext object makes access to data related to a particular