Mercurial > kallithea
changeset 4270:22da5c75e660
vcs: convert unicode revision strings to ascii before passing to Mercurial
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 18 Jul 2014 17:01:37 +0200 |
parents | dfdf6b1d38e9 |
children | 82fa5c6e958e |
files | kallithea/lib/vcs/backends/hg/repository.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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")