Mercurial > kallithea
diff rhodecode/lib/helpers.py @ 2257:a437a986d399
merged beta into stable
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 10 May 2012 20:27:45 +0200 |
parents | dc2584ba5fbc d9972f76322e |
children | 63e58ef80ef1 |
line wrap: on
line diff
--- a/rhodecode/lib/helpers.py Mon Apr 23 18:31:51 2012 +0200 +++ b/rhodecode/lib/helpers.py Thu May 10 20:27:45 2012 +0200 @@ -87,7 +87,7 @@ if not token_key in session: try: token = hashlib.sha1(str(random.getrandbits(128))).hexdigest() - except AttributeError: # Python < 2.4 + except AttributeError: # Python < 2.4 token = hashlib.sha1(str(random.randrange(2 ** 128))).hexdigest() session[token_key] = token if hasattr(session, 'save'): @@ -454,11 +454,14 @@ revision=rev.raw_id), title=tooltip(message(rev)), class_='tooltip') ) - # get only max revs_top_limit of changeset for performance/ui reasons - revs = [ - x for x in repo.get_changesets(revs_ids[0], - revs_ids[:revs_top_limit][-1]) - ] + + revs = [] + if len(filter(lambda v: v != '', revs_ids)) > 0: + # get only max revs_top_limit of changeset for performance/ui reasons + revs = [ + x for x in repo.get_changesets(revs_ids[0], + revs_ids[:revs_top_limit][-1]) + ] cs_links = [] cs_links.append(" " + ', '.join(