# HG changeset patch # User Marcin Kuzminski # Date 2011-03-13 14:01:49 # Node ID 461f5acc7bbb524c94fa2d6c6c4905c8df4b0c26 # Parent 1cecc7db31060ba5ac3a03fa2a86cf82f12547db # Parent e654898120b6b35925e10c2fca2d8c2f1a171290 merge with sorted tags diff --git a/rhodecode/controllers/tags.py b/rhodecode/controllers/tags.py --- a/rhodecode/controllers/tags.py +++ b/rhodecode/controllers/tags.py @@ -44,7 +44,11 @@ class TagsController(BaseRepoController) def index(self): c.repo_tags = OrderedDict() - for name, hash_ in c.rhodecode_repo.tags.items(): - c.repo_tags[name] = c.rhodecode_repo.get_changeset(hash_) + + tags = [(name, c.rhodecode_repo.get_changeset(hash_)) for \ + name, hash_ in c.rhodecode_repo.tags.items()] + ordered_tags = sorted(tags, key=lambda x:x[1].date, reverse=True) + for name, cs_tag in ordered_tags: + c.repo_tags[name] = cs_tag return render('tags/tags.html')