# HG changeset patch # User Mads Kiilerich # Date 1405695697 -7200 # Node ID 22da5c75e660ccb4ebbd4773ed1fd25fc67d4e02 # Parent dfdf6b1d38e9437ea7aeed0c5e8039395a6a5027 vcs: convert unicode revision strings to ascii before passing to Mercurial diff -r dfdf6b1d38e9 -r 22da5c75e660 kallithea/lib/vcs/backends/hg/repository.py --- a/kallithea/lib/vcs/backends/hg/repository.py Fri Jul 18 17:01:37 2014 +0200 +++ b/kallithea/lib/vcs/backends/hg/repository.py Fri Jul 18 17:01:37 2014 +0200 @@ -25,7 +25,7 @@ RepositoryError, VCSError, TagAlreadyExistError, TagDoesNotExistError ) from kallithea.lib.vcs.utils import ( - author_email, author_name, date_fromtimestamp, makedate, safe_unicode + author_email, author_name, date_fromtimestamp, makedate, safe_unicode, safe_str, ) from kallithea.lib.vcs.utils.lazy import LazyProperty from kallithea.lib.vcs.utils.ordered_dict import OrderedDict @@ -429,6 +429,8 @@ :param revision: str or int or None """ + if isinstance(revision, unicode): + revision = safe_str(revision) if self._empty: raise EmptyRepositoryError("There are no changesets yet")