# HG changeset patch # User Søren Løvborg # Date 1470231083 -7200 # Node ID 1e52ed5c37aa31aadf024b0b8409c553af25071c # Parent f4c712ab3e4029d8f6138d25704d7b936f1d264a db: remove deprecated getAll method Not sure why this wasn't done immediately when get_all was added. Maybe search and replace was out of order at the time. diff -r f4c712ab3e40 -r 1e52ed5c37aa kallithea/controllers/api/api.py --- a/kallithea/controllers/api/api.py Wed Aug 03 16:16:38 2016 +0200 +++ b/kallithea/controllers/api/api.py Wed Aug 03 15:31:23 2016 +0200 @@ -457,7 +457,7 @@ user = get_user_or_error(userid) # show all locks - for r in Repository.getAll(): + for r in Repository.get_all(): userid, time_ = r.locked if time_: _api_data = r.get_api_data() diff -r f4c712ab3e40 -r 1e52ed5c37aa kallithea/lib/paster_commands/update_repoinfo.py --- a/kallithea/lib/paster_commands/update_repoinfo.py Wed Aug 03 16:16:38 2016 +0200 +++ b/kallithea/lib/paster_commands/update_repoinfo.py Wed Aug 03 15:31:23 2016 +0200 @@ -59,7 +59,7 @@ if self.options.repo_update_list is None: - repo_list = Repository.getAll() + repo_list = Repository.get_all() else: repo_names = [safe_unicode(n.strip()) for n in self.options.repo_update_list.split(',')] diff -r f4c712ab3e40 -r 1e52ed5c37aa kallithea/model/__init__.py --- a/kallithea/model/__init__.py Wed Aug 03 16:16:38 2016 +0200 +++ b/kallithea/model/__init__.py Wed Aug 03 15:31:23 2016 +0200 @@ -138,4 +138,4 @@ """ Returns all instances of what is defined in `cls` class variable """ - return cls.cls.getAll() + return cls.cls.get_all() diff -r f4c712ab3e40 -r 1e52ed5c37aa kallithea/model/db.py --- a/kallithea/model/db.py Wed Aug 03 16:16:38 2016 +0200 +++ b/kallithea/model/db.py Wed Aug 03 15:31:23 2016 +0200 @@ -134,11 +134,6 @@ return res @classmethod - def getAll(cls): - # deprecated and left for backward compatibility - return cls.get_all() - - @classmethod def get_all(cls): return cls.query().all() diff -r f4c712ab3e40 -r 1e52ed5c37aa kallithea/model/repo.py --- a/kallithea/model/repo.py Wed Aug 03 16:16:38 2016 +0200 +++ b/kallithea/model/repo.py Wed Aug 03 15:31:23 2016 +0200 @@ -180,7 +180,7 @@ @classmethod def update_repoinfo(cls, repositories=None): if repositories is None: - repositories = Repository.getAll() + repositories = Repository.get_all() for repo in repositories: repo.update_changeset_cache() diff -r f4c712ab3e40 -r 1e52ed5c37aa kallithea/tests/functional/test_home.py --- a/kallithea/tests/functional/test_home.py Wed Aug 03 16:16:38 2016 +0200 +++ b/kallithea/tests/functional/test_home.py Wed Aug 03 15:31:23 2016 +0200 @@ -17,7 +17,7 @@ #if global permission is set response.mustcontain('Add Repository') # html in javascript variable: - response.mustcontain('var data = {"totalRecords": %s' % len(Repository.getAll())) + response.mustcontain('var data = {"totalRecords": %s' % len(Repository.get_all())) response.mustcontain(r'href=\"/%s\"' % HG_REPO) response.mustcontain(r'git') diff -r f4c712ab3e40 -r 1e52ed5c37aa kallithea/tests/other/manual_test_vcs_operations.py --- a/kallithea/tests/other/manual_test_vcs_operations.py Wed Aug 03 16:16:38 2016 +0200 +++ b/kallithea/tests/other/manual_test_vcs_operations.py Wed Aug 03 15:31:23 2016 +0200 @@ -527,7 +527,7 @@ assert 'abort: HTTP Error 403: Forbidden' in stderr finally: #release IP restrictions - for ip in UserIpMap.getAll(): + for ip in UserIpMap.get_all(): UserIpMap.delete(ip.ip_id) Session().commit() @@ -553,7 +553,7 @@ assert re.search(r'\b403\b', stderr) finally: #release IP restrictions - for ip in UserIpMap.getAll(): + for ip in UserIpMap.get_all(): UserIpMap.delete(ip.ip_id) Session().commit()