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

login
register
mail settings
Submitter Durham Goode
Date May 18, 2017, 6:23 p.m.
Message ID <2aef3c4be6ba81e9d245.1495131838@dev111.prn1.facebook.com>
Download mbox | patch
Permalink /patch/20677/
State Deferred
Headers show

Comments

Durham Goode - May 18, 2017, 6:23 p.m.
# HG changeset patch
# User Durham Goode <durham@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.

Patch

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()