diff -r 067add650129 -r 6419cd243017 mercurial/util.py --- a/mercurial/util.py Mon Mar 13 09:11:08 2017 -0700 +++ b/mercurial/util.py Mon Mar 13 09:12:56 2017 -0700 @@ -2653,9 +2653,7 @@ >>> print url(r'file:///D:\data\hg') file:///D:\data\hg """ - if pycompat.ispy3: - return encoding.unifromlocal(self.__bytes__()) - return self.__bytes__() + return encoding.strfromlocal(self.__bytes__()) def __bytes__(self): if self._localpath: