Changeset - 911669ac48a5
[Not reviewed]
default
0 4 0
Mads Kiilerich (mads) - 5 years ago 2020-11-12 18:56:53
mads@kiilerich.com
Grafted from: 4802bd37c2e9
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.
4 files changed with 0 insertions and 19 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/indexers/daemon.py
Show inline comments
 
@@ -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,
kallithea/lib/vcs/backends/git/repository.py
Show inline comments
 
@@ -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:
kallithea/lib/vcs/backends/hg/repository.py
Show inline comments
 
@@ -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
kallithea/model/async_tasks.py
Show inline comments
 
@@ -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))
0 comments (0 inline, 0 general)