diff --git a/rhodecode/controllers/admin/settings.py b/rhodecode/controllers/admin/settings.py --- a/rhodecode/controllers/admin/settings.py +++ b/rhodecode/controllers/admin/settings.py @@ -202,11 +202,6 @@ class SettingsController(BaseController) form_result['rhodecode_lightweight_dashboard'] Session().add(sett4) - sett5 = RhodeCodeSetting.get_by_name_or_create('lightweight_journal') - sett5.app_settings_value = \ - form_result['rhodecode_lightweight_journal'] - Session().add(sett5) - Session().commit() set_rhodecode_config(config) h.flash(_('Updated visualisation settings'), diff --git a/rhodecode/lib/base.py b/rhodecode/lib/base.py --- a/rhodecode/lib/base.py +++ b/rhodecode/lib/base.py @@ -248,7 +248,6 @@ class BaseController(WSGIController): c.visual.show_private_icon = str2bool(rc_config.get('rhodecode_show_private_icon')) c.visual.stylify_metatags = str2bool(rc_config.get('rhodecode_stylify_metatags')) c.visual.lightweight_dashboard = str2bool(rc_config.get('rhodecode_lightweight_dashboard')) - c.visual.lightweight_journal = str2bool(rc_config.get('rhodecode_lightweight_dashboard')) c.repo_name = get_repo_slug(request) c.backends = BACKENDS.keys() diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -64,7 +64,7 @@ html_escape_table = { def html_escape(text): """Produce entities within text.""" - return "".join(html_escape_table.get(c,c) for c in text) + return "".join(html_escape_table.get(c, c) for c in text) def shorter(text, size=20): @@ -491,7 +491,7 @@ def bool2icon(value): return value -def action_parser(user_log, feed=False, parse_cs=True): +def action_parser(user_log, feed=False, parse_cs=False): """ This helper will action_map the specified string action into translated fancy names with icons and links @@ -500,9 +500,7 @@ def action_parser(user_log, feed=False, :param feed: use output for feeds (no html and fancy icons) :param parse_cs: parse Changesets into VCS instances """ - from pylons import tmpl_context as c - if c.visual.lightweight_journal: - parse_cs = False + action = user_log.action action_params = ' ' @@ -522,42 +520,42 @@ def action_parser(user_log, feed=False, repo_name = user_log.repository.repo_name def lnk(rev, repo_name): - if isinstance(rev, BaseChangeset) or isinstance(rev, AttributeDict): - if rev.revision: - lbl = 'r%s:%s' % (rev.revision, rev.short_id) - else: - lbl = '%s' % (rev.short_id) + lbl = '%s' % (rev.short_id[:8]) _url = url('changeset_home', repo_name=repo_name, revision=rev.raw_id) - title = tooltip(rev.message) if parse_cs else '' + title = tooltip(rev.message) else: + ## changeset cannot be found/striped/removed etc. lbl = ('%s' % rev)[:12] _url = '#' title = _('Changeset not found') - - return link_to(lbl, _url, title=title, - class_='tooltip' if parse_cs else '',) + if parse_cs: + return link_to(lbl, _url, title=title, class_='tooltip') + return link_to(lbl, _url, raw_id=rev.raw_id, class_='journal-cs') revs = [] if len(filter(lambda v: v != '', revs_ids)) > 0: - if parse_cs: - repo = user_log.repository.scm_instance + repo = None for rev in revs_ids[:revs_top_limit]: + # we want parsed changesets, or new log store format is bad if parse_cs: try: - rev = repo.get_changeset(rev) - revs.append(rev) + if repo is None: + repo = user_log.repository.scm_instance + _rev = repo.get_changeset(rev) + revs.append(_rev) except ChangesetDoesNotExistError: log.error('cannot find revision %s in this repo' % rev) revs.append(rev) continue else: - rev = AttributeDict({ + _rev = AttributeDict({ 'short_id': rev[:12], 'raw_id': rev, + 'message': '', }) - revs.append(rev) + revs.append(_rev) cs_links = [] cs_links.append(" " + ', '.join( [lnk(rev, repo_name) for rev in revs[:revs_limit]] diff --git a/rhodecode/lib/hooks.py b/rhodecode/lib/hooks.py --- a/rhodecode/lib/hooks.py +++ b/rhodecode/lib/hooks.py @@ -36,7 +36,7 @@ from rhodecode.lib.utils import action_l from rhodecode.lib.vcs.backends.base import EmptyChangeset from rhodecode.lib.compat import json from rhodecode.lib.exceptions import HTTPLockedRC -from rhodecode.lib.utils2 import safe_str +from rhodecode.lib.utils2 import safe_str, datetime_to_time from rhodecode.model.db import Repository, User diff --git a/rhodecode/templates/admin/settings/settings.html b/rhodecode/templates/admin/settings/settings.html --- a/rhodecode/templates/admin/settings/settings.html +++ b/rhodecode/templates/admin/settings/settings.html @@ -131,10 +131,6 @@ ${h.checkbox('rhodecode_lightweight_dashboard','True')} -