Changeset - 1e52ed5c37aa
[Not reviewed]
default
0 7 0
Søren Løvborg - 9 years ago 2016-08-03 15:31:23
sorenl@unity3d.com
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.
7 files changed with 7 insertions and 12 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/api/api.py
Show inline comments
 
@@ -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()
kallithea/lib/paster_commands/update_repoinfo.py
Show inline comments
 
@@ -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(',')]
kallithea/model/__init__.py
Show inline comments
 
@@ -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()
kallithea/model/db.py
Show inline comments
 
@@ -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()
 

	
kallithea/model/repo.py
Show inline comments
 
@@ -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()
 

	
kallithea/tests/functional/test_home.py
Show inline comments
 
@@ -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'<span class="repotag">git')
kallithea/tests/other/manual_test_vcs_operations.py
Show inline comments
 
@@ -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()
 

	
0 comments (0 inline, 0 general)