Changeset - 939e797c13c4
[Not reviewed]
default
0 16 0
Mads Kiilerich - 11 years ago 2015-01-06 00:54:36
madski@unity3d.com
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.)
16 files changed with 0 insertions and 49 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/dbmigrate/schema/db_1_2_0.py
Show inline comments
 
@@ -708,15 +708,12 @@ 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)
 

	
 
        return repo
 

	
 

	
kallithea/lib/dbmigrate/schema/db_1_3_0.py
Show inline comments
 
@@ -726,15 +726,12 @@ 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)
 

	
 
        return repo
 

	
 

	
kallithea/lib/dbmigrate/schema/db_1_4_0.py
Show inline comments
 
@@ -987,15 +987,12 @@ 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)
 

	
 
        return repo
 

	
 

	
kallithea/lib/dbmigrate/schema/db_1_5_0.py
Show inline comments
 
@@ -1006,15 +1006,12 @@ 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)
 

	
 
        return repo
 

	
 

	
kallithea/lib/dbmigrate/schema/db_1_5_2.py
Show inline comments
 
@@ -1127,15 +1127,12 @@ 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)
 

	
 
        return repo
 

	
 

	
kallithea/lib/dbmigrate/schema/db_1_6_0.py
Show inline comments
 
@@ -1203,15 +1203,12 @@ 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)
 

	
 
        return repo
 

	
 

	
kallithea/lib/dbmigrate/schema/db_1_7_0.py
Show inline comments
 
@@ -1220,15 +1220,12 @@ 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)
 

	
 
        return repo
 

	
 

	
kallithea/lib/dbmigrate/schema/db_1_8_0.py
Show inline comments
 
@@ -1250,15 +1250,12 @@ 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)
 

	
 
        return repo
 

	
 

	
kallithea/lib/dbmigrate/schema/db_2_0_0.py
Show inline comments
 
@@ -1307,15 +1307,12 @@ 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)
 

	
 
        return repo
 

	
 

	
kallithea/lib/dbmigrate/schema/db_2_0_1.py
Show inline comments
 
@@ -1306,15 +1306,12 @@ 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)
 

	
 
        return repo
 

	
 

	
kallithea/lib/dbmigrate/schema/db_2_0_2.py
Show inline comments
 
@@ -1326,15 +1326,12 @@ 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)
 

	
 
        return repo
 

	
 
    def __json__(self):
kallithea/lib/dbmigrate/schema/db_2_1_0.py
Show inline comments
 
@@ -1365,15 +1365,12 @@ 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)
 

	
 
        return repo
 

	
 
    def __json__(self):
kallithea/lib/dbmigrate/schema/db_2_2_0.py
Show inline comments
 
@@ -1411,15 +1411,12 @@ 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)
 

	
 
        return repo
 

	
 
    def __json__(self):
kallithea/lib/dbmigrate/schema/db_2_2_3.py
Show inline comments
 
@@ -1438,15 +1438,12 @@ 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)
 

	
 
        return repo
 

	
 
    def __json__(self):
kallithea/lib/vcs/backends/hg/repository.py
Show inline comments
 
@@ -414,15 +414,12 @@ class MercurialRepository(BaseRepository
 
            st_path = os.path.join(self.path, '.hg', "store")
 
            if os.path.exists(cl_path):
 
                return os.stat(cl_path).st_mtime
 
            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
 
        40 char revision number
 

	
 
        :param revision: str or int or None
kallithea/model/db.py
Show inline comments
 
@@ -1444,18 +1444,14 @@ class Repository(Base, BaseModel):
 
            log.error('Perhaps this repository is in db and not in '
 
                      'filesystem run rescan repositories with '
 
                      '"destroy old data " option from admin panel')
 
            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)
 

	
 
        return repo
 

	
 
    def __json__(self):
0 comments (0 inline, 0 general)