Patchwork [2,of,5] manifest: have context's dirs() call its manifest's dirs()

login
register
mail settings
Submitter Drew Gottlieb
Date March 13, 2015, 11:35 p.m.
Message ID <d1f4b4b9cc4e63ea7fd6.1426289734@waste.org>
Download mbox | patch
Permalink /patch/8073/
State Accepted
Commit 4c7c6beade1adec5925eb59b6a8dbcb8ae149394
Headers show

Comments

Drew Gottlieb - March 13, 2015, 11:35 p.m.
# HG changeset patch
# User Drew Gottlieb <drgott@google.com>
# Date 1426285382 25200
#      Fri Mar 13 15:23:02 2015 -0700
# Node ID d1f4b4b9cc4e63ea7fd68f23a3214f11b64df845
# Parent  2fcfb7b2ea15fd09a121f8893f120c9211ccb00b
manifest: have context's dirs() call its manifest's dirs()

This lets the context's dirs() method be agnostic towards any alternate
manifest implementations.

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -266,12 +266,9 @@ 
         diffopts = patch.diffopts(self._repo.ui, opts)
         return patch.diff(self._repo, ctx2, self, match=match, opts=diffopts)
 
-    @propertycache
-    def _dirs(self):
-        return scmutil.dirs(self._manifest)
+    def dirs(self):
+        return self._manifest.dirs()
 
-    def dirs(self):
-        return self._dirs
 
     def dirty(self, missing=False, merge=True, branch=True):
         return False