changeset 1356:eec4defdf2b8 beta

Make rhodecode use author/username filter from vcs instead of mercurial
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 04 Jun 2011 00:14:32 +0200
parents bfc529377cdc
children d5c7b21ff54a
files rhodecode/lib/helpers.py
diffstat 1 files changed, 5 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/helpers.py	Fri Jun 03 13:45:10 2011 +0200
+++ b/rhodecode/lib/helpers.py	Sat Jun 04 00:14:32 2011 +0200
@@ -317,21 +317,17 @@
 
 flash = _Flash()
 
-
 #==============================================================================
-# MERCURIAL FILTERS available via h.
+# SCM FILTERS available via h.
 #==============================================================================
-from mercurial import util
-from mercurial.templatefilters import person as _person
+from vcs.utils import author_name, author_email
 from rhodecode.lib import credentials_hidder, age as _age
 
-
-
 age = lambda  x:_age(x)
 capitalize = lambda x: x.capitalize()
-email = util.email
-email_or_none = lambda x: util.email(x) if util.email(x) != x else None
-person = lambda x: _person(x)
+email = author_email
+email_or_none = lambda x: email(x) if email(x) != x else None
+person = lambda x: author_name(x)
 short_id = lambda x: x[:12]
 hide_credentials = lambda x: ''.join(credentials_hidder(x))