[PATCH 4 of 6] hidden: add a hidden rootset to the repo instance

Durham Goode durham at fb.com
Thu May 18 14:23:58 EDT 2017


# HG changeset patch
# User Durham Goode <durham at fb.com>
# Date 1495129620 25200
#      Thu May 18 10:47:00 2017 -0700
# Node ID 2aef3c4be6ba81e9d2453760515517df6fc2b816
# Parent  3c0381b4b5687dcd53d5b05c94ffa989ff3133b2
hidden: add a hidden rootset to the repo instance

As part of moving hiddenness to be persisted, let's add a hidden rootset onto
the localrepo.

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -37,6 +37,7 @@ from . import (
     exchange,
     extensions,
     filelog,
+    hidden,
     hook,
     lock as lockmod,
     manifest,
@@ -385,6 +386,10 @@ class localrepository(object):
         # generic mapping between names and nodes
         self.names = namespaces.namespaces()
 
+    @storecache('hidden.roots')
+    def hidden(self):
+        return hidden.rootset(self, self.svfs, 'hidden')
+
     def close(self):
         self._writecaches()
 


More information about the Mercurial-devel mailing list