Show More
@@ -42,6 +42,8 b' from rhodecode.lib.utils import repo_nam' | |||||
42 | from rhodecode.lib.utils2 import str2bool, safe_unicode, safe_str, \ |
|
42 | from rhodecode.lib.utils2 import str2bool, safe_unicode, safe_str, \ | |
43 | get_changeset_safe |
|
43 | get_changeset_safe | |
44 | from rhodecode.lib.markup_renderer import MarkupRenderer |
|
44 | from rhodecode.lib.markup_renderer import MarkupRenderer | |
|
45 | from rhodecode.lib.vcs.exceptions import ChangesetDoesNotExistError | |||
|
46 | from rhodecode.lib.vcs.backends.base import BaseChangeset | |||
45 |
|
47 | |||
46 | log = logging.getLogger(__name__) |
|
48 | log = logging.getLogger(__name__) | |
47 |
|
49 | |||
@@ -447,22 +449,30 b' def action_parser(user_log, feed=False):' | |||||
447 |
|
449 | |||
448 | repo = user_log.repository.scm_instance |
|
450 | repo = user_log.repository.scm_instance | |
449 |
|
451 | |||
450 | message = lambda rev: rev.message |
|
452 | def lnk(rev, repo_name): | |
451 | lnk = lambda rev, repo_name: ( |
|
453 | ||
452 | link_to('r%s:%s' % (rev.revision, rev.short_id), |
|
454 | if isinstance(rev, BaseChangeset): | |
453 | url('changeset_home', repo_name=repo_name, |
|
455 | lbl = 'r%s:%s' % (rev.revision, rev.short_id) | |
454 | revision=rev.raw_id), |
|
456 | _url = url('changeset_home', repo_name=repo_name, | |
455 | title=tooltip(message(rev)), class_='tooltip') |
|
457 | revision=rev.raw_id) | |
456 | ) |
|
458 | title = tooltip(rev.message) | |
|
459 | else: | |||
|
460 | lbl = '%s' % rev | |||
|
461 | _url = '#' | |||
|
462 | title = _('Changeset not found') | |||
|
463 | ||||
|
464 | return link_to(lbl, _url, title=title, class_='tooltip',) | |||
457 |
|
465 | |||
458 | revs = [] |
|
466 | revs = [] | |
459 | if len(filter(lambda v: v != '', revs_ids)) > 0: |
|
467 | if len(filter(lambda v: v != '', revs_ids)) > 0: | |
460 | # get only max revs_top_limit of changeset for performance/ui reasons |
|
468 | for rev in revs_ids[:revs_top_limit]: | |
461 |
|
|
469 | try: | |
462 |
|
|
470 | rev = repo.get_changeset(rev) | |
463 | revs_ids[:revs_top_limit][-1]) |
|
471 | revs.append(rev) | |
464 | ] |
|
472 | except ChangesetDoesNotExistError: | |
465 |
|
473 | log.error('cannot find revision %s in this repo' % rev) | ||
|
474 | revs.append(rev) | |||
|
475 | continue | |||
466 | cs_links = [] |
|
476 | cs_links = [] | |
467 | cs_links.append(" " + ', '.join( |
|
477 | cs_links.append(" " + ', '.join( | |
468 | [lnk(rev, repo_name) for rev in revs[:revs_limit]] |
|
478 | [lnk(rev, repo_name) for rev in revs[:revs_limit]] |
General Comments 0
You need to be logged in to leave comments.
Login now