# HG changeset patch # User Marcin Kuzminski # Date 2011-03-11 14:56:52 # Node ID e654898120b6b35925e10c2fca2d8c2f1a171290 # Parent ce4287e3e3c97b489aae7e2c7290953ca4939e0f sorted tags by date in tag view diff --git a/rhodecode/controllers/changeset.py b/rhodecode/controllers/changeset.py --- a/rhodecode/controllers/changeset.py +++ b/rhodecode/controllers/changeset.py @@ -66,7 +66,7 @@ class ChangesetController(BaseRepoContro #get ranges of revisions if preset rev_range = revision.split('...')[:2] - range_limit = 50 + try: if len(rev_range) == 2: rev_start = rev_range[0] 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')