changeset 8792:911669ac48a5

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.
author Mads Kiilerich <mads@kiilerich.com>
date Thu, 12 Nov 2020 18:56:53 +0100
parents b3d8a3000a7f
children b1fb9927ca47
files kallithea/lib/indexers/daemon.py kallithea/lib/vcs/backends/git/repository.py kallithea/lib/vcs/backends/hg/repository.py kallithea/model/async_tasks.py
diffstat 4 files changed, 0 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/indexers/daemon.py	Tue Nov 10 17:43:37 2020 +0100
+++ b/kallithea/lib/indexers/daemon.py	Thu Nov 12 18:56:53 2020 +0100
@@ -195,7 +195,6 @@
 
         writer.add_document(
             fileid=path,
-            owner=repo.contact,
             repository_rawname=repo_name,
             repository=repo_name,
             path=path,
@@ -234,7 +233,6 @@
             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,
--- a/kallithea/lib/vcs/backends/git/repository.py	Tue Nov 10 17:43:37 2020 +0100
+++ b/kallithea/lib/vcs/backends/git/repository.py	Thu Nov 12 18:56:53 2020 +0100
@@ -388,11 +388,6 @@
     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:
--- a/kallithea/lib/vcs/backends/hg/repository.py	Tue Nov 10 17:43:37 2020 +0100
+++ b/kallithea/lib/vcs/backends/hg/repository.py	Thu Nov 12 18:56:53 2020 +0100
@@ -413,11 +413,6 @@
         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
--- a/kallithea/model/async_tasks.py	Tue Nov 10 17:43:37 2020 +0100
+++ b/kallithea/model/async_tasks.py	Thu Nov 12 18:56:53 2020 +0100
@@ -186,13 +186,6 @@
         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))