Patchwork [29,of,36] context: move _dirs from changectx

login
register
mail settings
Submitter Sean Farley
Date Aug. 7, 2013, 6:13 p.m.
Message ID <44620c65e3d5d85dafc0.1375899209@laptop.local>
Download mbox | patch
Permalink /patch/2046/
State Superseded
Commit 89d750047e63060f3d28cc6d19246231bdf55080
Delegated to: Augie Fackler
Headers show

Comments

Sean Farley - Aug. 7, 2013, 6:13 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1375746103 18000
#      Mon Aug 05 18:41:43 2013 -0500
# Node ID 44620c65e3d5d85dafc037a824b2f61028a710f6
# Parent  eb24b085e54b8e9a63b55adcc09027a45816ceb6
context: move _dirs from changectx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -136,10 +136,14 @@ 
             ctx2 = self._repo[ctx2]
         diffopts = patch.diffopts(self._repo.ui, opts)
         return patch.diff(self._repo, ctx2.node(), self.node(),
                           match=match, opts=diffopts)
 
+    @propertycache
+    def _dirs(self):
+        return scmutil.dirs(self._manifest)
+
 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=''):
@@ -391,14 +395,10 @@ 
                 # specified pattern is a directory
                 continue
             if match.bad(fn, _('no such file in rev %s') % self) and match(fn):
                 yield fn
 
-    @propertycache
-    def _dirs(self):
-        return scmutil.dirs(self._manifest)
-
     def dirs(self):
         return self._dirs
 
     def dirty(self):
         return False