##// END OF EJS Templates
fixed sorting of tags and branches. Fix made in vcs.
marcink -
r389:174785aa default
parent child Browse files
Show More
@@ -2,7 +2,7 b''
2 2 # encoding: utf-8
3 3 # branches controller for pylons
4 4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
5
5 #
6 6 # This program is free software; you can redistribute it and/or
7 7 # modify it under the terms of the GNU General Public License
8 8 # as published by the Free Software Foundation; version 2
@@ -22,9 +22,10 b' Created on April 21, 2010'
22 22 branches controller for pylons
23 23 @author: marcink
24 24 """
25 from pylons import tmpl_context as c, request
25 from pylons import tmpl_context as c
26 26 from pylons_app.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
27 27 from pylons_app.lib.base import BaseController, render
28 from pylons_app.lib.utils import OrderedDict
28 29 from pylons_app.model.hg_model import HgModel
29 30 import logging
30 31 log = logging.getLogger(__name__)
@@ -39,7 +40,7 b' class BranchesController(BaseController)'
39 40 def index(self):
40 41 hg_model = HgModel()
41 42 c.repo_info = hg_model.get_repo(c.repo_name)
42 c.repo_branches = {}
43 c.repo_branches = OrderedDict()
43 44 for name, hash_ in c.repo_info.branches.items():
44 45 c.repo_branches[name] = c.repo_info.get_changeset(hash_)
45 46
@@ -55,11 +55,11 b' class SummaryController(BaseController):'
55 55 'host':e.get('HTTP_HOST'),
56 56 'repo_name':c.repo_name, }
57 57 c.clone_repo_url = uri
58 c.repo_tags = {}
58 c.repo_tags = OrderedDict()
59 59 for name, hash in c.repo_info.tags.items()[:10]:
60 60 c.repo_tags[name] = c.repo_info.get_changeset(hash)
61 61
62 c.repo_branches = {}
62 c.repo_branches = OrderedDict()
63 63 for name, hash in c.repo_info.branches.items()[:10]:
64 64 c.repo_branches[name] = c.repo_info.get_changeset(hash)
65 65
@@ -2,7 +2,7 b''
2 2 # encoding: utf-8
3 3 # tags controller for pylons
4 4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
5
5 #
6 6 # This program is free software; you can redistribute it and/or
7 7 # modify it under the terms of the GNU General Public License
8 8 # as published by the Free Software Foundation; version 2
@@ -22,9 +22,10 b' Created on April 21, 2010'
22 22 tags controller for pylons
23 23 @author: marcink
24 24 """
25 from pylons import tmpl_context as c, request
25 from pylons import tmpl_context as c
26 26 from pylons_app.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
27 27 from pylons_app.lib.base import BaseController, render
28 from pylons_app.lib.utils import OrderedDict
28 29 from pylons_app.model.hg_model import HgModel
29 30 import logging
30 31 log = logging.getLogger(__name__)
@@ -39,8 +40,8 b' class TagsController(BaseController):'
39 40 def index(self):
40 41 hg_model = HgModel()
41 42 c.repo_info = hg_model.get_repo(c.repo_name)
42 c.repo_tags = {}
43 for name, hash in c.repo_info.tags.items():
44 c.repo_tags[name] = c.repo_info.get_changeset(hash)
43 c.repo_tags = OrderedDict()
44 for name, hash_ in c.repo_info.tags.items():
45 c.repo_tags[name] = c.repo_info.get_changeset(hash_)
45 46
46 47 return render('tags/tags.html')
General Comments 0
You need to be logged in to leave comments. Login now