Changeset - 853b9425742a
[Not reviewed]
celery
0 1 0
Marcin Kuzminski - 15 years ago 2010-09-19 03:42:48
marcin@python-works.com
fixed sorting in repo list switcher and removed lower() since repo names can be have capital letters now
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
pylons_app/model/hg_model.py
Show inline comments
 
@@ -56,18 +56,18 @@ def _get_repos_cached():
 
    from pylons import app_globals as g
 
    return HgModel.repo_scan(g.paths[0][0], g.paths[0][1], g.baseui)
 

	
 
@cache_region('super_short_term', 'cached_repos_switcher_list')
 
def _get_repos_switcher_cached(cached_repo_list):
 
    repos_lst = []
 
    for repo in sorted(x for x in cached_repo_list.values()):
 
    for repo in [x for x in cached_repo_list.values()]:
 
        if HasRepoPermissionAny('repository.write', 'repository.read',
 
                    'repository.admin')(repo.name.lower(), 'main page check'):
 
            repos_lst.append((repo.name.lower(), repo.dbrepo.private,))
 
            repos_lst.append((repo.name, repo.dbrepo.private,))
 
    
 
    return repos_lst
 
    return sorted(repos_lst, key=lambda k:k[0])
 

	
 
@cache_region('long_term', 'full_changelog')
 
def _full_changelog_cached(repo_name):
 
    log.info('getting full changelog for %s', repo_name)
 
    return list(reversed(list(HgModel().get_repo(repo_name))))
 

	
0 comments (0 inline, 0 general)