# HG changeset patch # User Mads Kiilerich # Date 2015-01-06 00:54:36 # Node ID 939e797c13c4d212aadb055ef9f9a4c836b50906 # Parent 72bf894750041980b8a07198efda1e498c7e00ef hg: drop support for hg web.hidden Kallithea is not hgweb and should not try to support hgweb config options. If someone wants to hide repos, they should just remove all access to them. (_If_ Kallithea should support some kind of more thorough repo hiding, it should be implemented differently: The hidden repos should not be in the database and should thus instead be excluded when scanning for repos.) diff --git a/kallithea/lib/dbmigrate/schema/db_1_2_0.py b/kallithea/lib/dbmigrate/schema/db_1_2_0.py --- a/kallithea/lib/dbmigrate/schema/db_1_2_0.py +++ b/kallithea/lib/dbmigrate/schema/db_1_2_0.py @@ -711,9 +711,6 @@ class Repository(Base, BaseModel): repo = backend(safe_str(repo_full_path), create=False, baseui=self._ui) - # skip hidden web repository - if repo._get_hidden(): - return else: repo = backend(repo_full_path, create=False) diff --git a/kallithea/lib/dbmigrate/schema/db_1_3_0.py b/kallithea/lib/dbmigrate/schema/db_1_3_0.py --- a/kallithea/lib/dbmigrate/schema/db_1_3_0.py +++ b/kallithea/lib/dbmigrate/schema/db_1_3_0.py @@ -729,9 +729,6 @@ class Repository(Base, BaseModel): repo = backend(safe_str(repo_full_path), create=False, baseui=self._ui) - # skip hidden web repository - if repo._get_hidden(): - return else: repo = backend(repo_full_path, create=False) diff --git a/kallithea/lib/dbmigrate/schema/db_1_4_0.py b/kallithea/lib/dbmigrate/schema/db_1_4_0.py --- a/kallithea/lib/dbmigrate/schema/db_1_4_0.py +++ b/kallithea/lib/dbmigrate/schema/db_1_4_0.py @@ -990,9 +990,6 @@ class Repository(Base, BaseModel): repo = backend(safe_str(repo_full_path), create=False, baseui=self._ui) - # skip hidden web repository - if repo._get_hidden(): - return else: repo = backend(repo_full_path, create=False) diff --git a/kallithea/lib/dbmigrate/schema/db_1_5_0.py b/kallithea/lib/dbmigrate/schema/db_1_5_0.py --- a/kallithea/lib/dbmigrate/schema/db_1_5_0.py +++ b/kallithea/lib/dbmigrate/schema/db_1_5_0.py @@ -1009,9 +1009,6 @@ class Repository(Base, BaseModel): repo = backend(safe_str(repo_full_path), create=False, baseui=self._ui) - # skip hidden web repository - if repo._get_hidden(): - return else: repo = backend(repo_full_path, create=False) diff --git a/kallithea/lib/dbmigrate/schema/db_1_5_2.py b/kallithea/lib/dbmigrate/schema/db_1_5_2.py --- a/kallithea/lib/dbmigrate/schema/db_1_5_2.py +++ b/kallithea/lib/dbmigrate/schema/db_1_5_2.py @@ -1130,9 +1130,6 @@ class Repository(Base, BaseModel): repo = backend(safe_str(repo_full_path), create=False, baseui=self._ui) - # skip hidden web repository - if repo._get_hidden(): - return else: repo = backend(repo_full_path, create=False) diff --git a/kallithea/lib/dbmigrate/schema/db_1_6_0.py b/kallithea/lib/dbmigrate/schema/db_1_6_0.py --- a/kallithea/lib/dbmigrate/schema/db_1_6_0.py +++ b/kallithea/lib/dbmigrate/schema/db_1_6_0.py @@ -1206,9 +1206,6 @@ class Repository(Base, BaseModel): repo = backend(safe_str(repo_full_path), create=False, baseui=self._ui) - # skip hidden web repository - if repo._get_hidden(): - return else: repo = backend(repo_full_path, create=False) diff --git a/kallithea/lib/dbmigrate/schema/db_1_7_0.py b/kallithea/lib/dbmigrate/schema/db_1_7_0.py --- a/kallithea/lib/dbmigrate/schema/db_1_7_0.py +++ b/kallithea/lib/dbmigrate/schema/db_1_7_0.py @@ -1223,9 +1223,6 @@ class Repository(Base, BaseModel): repo = backend(safe_str(repo_full_path), create=False, baseui=self._ui) - # skip hidden web repository - if repo._get_hidden(): - return else: repo = backend(repo_full_path, create=False) diff --git a/kallithea/lib/dbmigrate/schema/db_1_8_0.py b/kallithea/lib/dbmigrate/schema/db_1_8_0.py --- a/kallithea/lib/dbmigrate/schema/db_1_8_0.py +++ b/kallithea/lib/dbmigrate/schema/db_1_8_0.py @@ -1253,9 +1253,6 @@ class Repository(Base, BaseModel): repo = backend(safe_str(repo_full_path), create=False, baseui=self._ui) - # skip hidden web repository - if repo._get_hidden(): - return else: repo = backend(repo_full_path, create=False) diff --git a/kallithea/lib/dbmigrate/schema/db_2_0_0.py b/kallithea/lib/dbmigrate/schema/db_2_0_0.py --- a/kallithea/lib/dbmigrate/schema/db_2_0_0.py +++ b/kallithea/lib/dbmigrate/schema/db_2_0_0.py @@ -1310,9 +1310,6 @@ class Repository(Base, BaseModel): repo = backend(safe_str(repo_full_path), create=False, baseui=self._ui) - # skip hidden web repository - if repo._get_hidden(): - return else: repo = backend(repo_full_path, create=False) diff --git a/kallithea/lib/dbmigrate/schema/db_2_0_1.py b/kallithea/lib/dbmigrate/schema/db_2_0_1.py --- a/kallithea/lib/dbmigrate/schema/db_2_0_1.py +++ b/kallithea/lib/dbmigrate/schema/db_2_0_1.py @@ -1309,9 +1309,6 @@ class Repository(Base, BaseModel): repo = backend(safe_str(repo_full_path), create=False, baseui=self._ui) - # skip hidden web repository - if repo._get_hidden(): - return else: repo = backend(repo_full_path, create=False) diff --git a/kallithea/lib/dbmigrate/schema/db_2_0_2.py b/kallithea/lib/dbmigrate/schema/db_2_0_2.py --- a/kallithea/lib/dbmigrate/schema/db_2_0_2.py +++ b/kallithea/lib/dbmigrate/schema/db_2_0_2.py @@ -1329,9 +1329,6 @@ class Repository(Base, BaseModel): repo = backend(safe_str(repo_full_path), create=False, baseui=self._ui) - # skip hidden web repository - if repo._get_hidden(): - return else: repo = backend(repo_full_path, create=False) diff --git a/kallithea/lib/dbmigrate/schema/db_2_1_0.py b/kallithea/lib/dbmigrate/schema/db_2_1_0.py --- a/kallithea/lib/dbmigrate/schema/db_2_1_0.py +++ b/kallithea/lib/dbmigrate/schema/db_2_1_0.py @@ -1368,9 +1368,6 @@ class Repository(Base, BaseModel): repo = backend(safe_str(repo_full_path), create=False, baseui=self._ui) - # skip hidden web repository - if repo._get_hidden(): - return else: repo = backend(repo_full_path, create=False) diff --git a/kallithea/lib/dbmigrate/schema/db_2_2_0.py b/kallithea/lib/dbmigrate/schema/db_2_2_0.py --- a/kallithea/lib/dbmigrate/schema/db_2_2_0.py +++ b/kallithea/lib/dbmigrate/schema/db_2_2_0.py @@ -1414,9 +1414,6 @@ class Repository(Base, BaseModel): repo = backend(safe_str(repo_full_path), create=False, baseui=self._ui) - # skip hidden web repository - if repo._get_hidden(): - return else: repo = backend(repo_full_path, create=False) diff --git a/kallithea/lib/dbmigrate/schema/db_2_2_3.py b/kallithea/lib/dbmigrate/schema/db_2_2_3.py --- a/kallithea/lib/dbmigrate/schema/db_2_2_3.py +++ b/kallithea/lib/dbmigrate/schema/db_2_2_3.py @@ -1441,9 +1441,6 @@ class Repository(Base, BaseModel): repo = backend(safe_str(repo_full_path), create=False, baseui=self._ui) - # skip hidden web repository - if repo._get_hidden(): - return else: repo = backend(repo_full_path, create=False) diff --git a/kallithea/lib/vcs/backends/hg/repository.py b/kallithea/lib/vcs/backends/hg/repository.py --- a/kallithea/lib/vcs/backends/hg/repository.py +++ b/kallithea/lib/vcs/backends/hg/repository.py @@ -417,9 +417,6 @@ class MercurialRepository(BaseRepository else: return os.stat(st_path).st_mtime - def _get_hidden(self): - return self._repo.ui.configbool("web", "hidden", untrusted=True) - def _get_revision(self, revision): """ Gets an ID revision given as str. This will always return a fill diff --git a/kallithea/model/db.py b/kallithea/model/db.py --- a/kallithea/model/db.py +++ b/kallithea/model/db.py @@ -1447,12 +1447,8 @@ class Repository(Base, BaseModel): return if alias == 'hg': - repo = backend(safe_str(repo_full_path), create=False, baseui=self._ui) - # skip hidden web repository - if repo._get_hidden(): - return else: repo = backend(repo_full_path, create=False)