diff --git a/kallithea/lib/helpers.py b/kallithea/lib/helpers.py --- a/kallithea/lib/helpers.py +++ b/kallithea/lib/helpers.py @@ -55,7 +55,7 @@ from kallithea.lib.annotate import annot from kallithea.lib.utils import repo_name_slug, get_custom_lexer from kallithea.lib.utils2 import str2bool, safe_unicode, safe_str, \ get_changeset_safe, datetime_to_time, time_to_datetime, AttributeDict, \ - safe_int + safe_int, MENTIONS_REGEX from kallithea.lib.markup_renderer import MarkupRenderer, url_re from kallithea.lib.vcs.exceptions import ChangesetDoesNotExistError from kallithea.lib.vcs.backends.base import BaseChangeset, EmptyChangeset @@ -1397,6 +1397,26 @@ def rst_w_mentions(source): return literal('
%s' % s)
+
+
def short_ref(ref_type, ref_name):
if ref_type == 'rev':
return short_id(ref_name)