# HG changeset patch # User Mads Kiilerich # Date 2020-11-12 18:56:53 # Node ID 911669ac48a5fb399eb6d312a322e4ef89dd87a3 # Parent b3d8a3000a7f54773e54350479e498031f8847e4 vcs: drop repo contact ... and the odd uses of it A half-baked and essentially unused hgweb feature. The reference in get_commits_stats doesn't seem reachable in any relevant use cases. diff --git a/kallithea/lib/indexers/daemon.py b/kallithea/lib/indexers/daemon.py --- a/kallithea/lib/indexers/daemon.py +++ b/kallithea/lib/indexers/daemon.py @@ -195,7 +195,6 @@ class WhooshIndexingDaemon(object): writer.add_document( fileid=path, - owner=repo.contact, repository_rawname=repo_name, repository=repo_name, path=path, @@ -234,7 +233,6 @@ class WhooshIndexingDaemon(object): log.debug(' >> %s %s/%s', cs, indexed, total) writer.add_document( raw_id=cs.raw_id, - owner=repo.contact, date=cs._timestamp, repository_rawname=repo_name, repository=repo_name, diff --git a/kallithea/lib/vcs/backends/git/repository.py b/kallithea/lib/vcs/backends/git/repository.py --- a/kallithea/lib/vcs/backends/git/repository.py +++ b/kallithea/lib/vcs/backends/git/repository.py @@ -388,11 +388,6 @@ class GitRepository(BaseRepository): def description(self): return safe_str(self._repo.get_description() or b'unknown') - @LazyProperty - def contact(self): - undefined_contact = 'Unknown' - return undefined_contact - @property def branches(self): if not self.revisions: 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 @@ -413,11 +413,6 @@ class MercurialRepository(BaseRepository return safe_str(_desc or b'unknown') @LazyProperty - def contact(self): - return safe_str(mercurial.hgweb.common.get_contact(self._repo.ui.config) - or b'Unknown') - - @LazyProperty def last_change(self): """ Returns last change made on this repository as datetime object diff --git a/kallithea/model/async_tasks.py b/kallithea/model/async_tasks.py --- a/kallithea/model/async_tasks.py +++ b/kallithea/model/async_tasks.py @@ -186,13 +186,6 @@ def get_commits_stats(repo_name, ts_min_ overview_data = sorted(commits_by_day_aggregate.items(), key=itemgetter(0)) - if not co_day_auth_aggr: - co_day_auth_aggr[akc(scm_repo.contact)] = { - "label": akc(scm_repo.contact), - "data": [0, 1], - "schema": ["commits"], - } - stats = cur_stats if cur_stats else db.Statistics() stats.commit_activity = ascii_bytes(ext_json.dumps(co_day_auth_aggr)) stats.commit_activity_combined = ascii_bytes(ext_json.dumps(overview_data))