diff --git a/kallithea/controllers/api/api.py b/kallithea/controllers/api/api.py --- a/kallithea/controllers/api/api.py +++ b/kallithea/controllers/api/api.py @@ -457,7 +457,7 @@ class ApiController(JSONRPCController): 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 --git a/kallithea/lib/paster_commands/update_repoinfo.py b/kallithea/lib/paster_commands/update_repoinfo.py --- a/kallithea/lib/paster_commands/update_repoinfo.py +++ b/kallithea/lib/paster_commands/update_repoinfo.py @@ -59,7 +59,7 @@ class Command(BasePasterCommand): 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 --git a/kallithea/model/__init__.py b/kallithea/model/__init__.py --- a/kallithea/model/__init__.py +++ b/kallithea/model/__init__.py @@ -138,4 +138,4 @@ class BaseModel(object): """ Returns all instances of what is defined in `cls` class variable """ - return cls.cls.getAll() + return cls.cls.get_all() diff --git a/kallithea/model/db.py b/kallithea/model/db.py --- a/kallithea/model/db.py +++ b/kallithea/model/db.py @@ -134,11 +134,6 @@ class BaseModel(object): 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 --git a/kallithea/model/repo.py b/kallithea/model/repo.py --- a/kallithea/model/repo.py +++ b/kallithea/model/repo.py @@ -180,7 +180,7 @@ class RepoModel(BaseModel): @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 --git a/kallithea/tests/functional/test_home.py b/kallithea/tests/functional/test_home.py --- a/kallithea/tests/functional/test_home.py +++ b/kallithea/tests/functional/test_home.py @@ -17,7 +17,7 @@ class TestHomeController(TestController) #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 --git a/kallithea/tests/other/manual_test_vcs_operations.py b/kallithea/tests/other/manual_test_vcs_operations.py --- a/kallithea/tests/other/manual_test_vcs_operations.py +++ b/kallithea/tests/other/manual_test_vcs_operations.py @@ -527,7 +527,7 @@ class TestVCSOperations(TestController): 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 @@ class TestVCSOperations(TestController): 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()