bookmarks: read current bookmark as utf-8 and convert it to local
authorDavid Soria Parra <dsp@php.net>
Fri, 11 Feb 2011 19:32:49 +0100
changeset 13381 d073468e3c5f
parent 13380 d11405848abd
child 13382 d747774ca9da
bookmarks: read current bookmark as utf-8 and convert it to local
mercurial/bookmarks.py
--- a/mercurial/bookmarks.py	Mon Feb 14 07:39:21 2011 +0000
+++ b/mercurial/bookmarks.py	Fri Feb 11 19:32:49 2011 +0100
@@ -38,7 +38,7 @@
     if os.path.exists(repo.join('bookmarks.current')):
         file = repo.opener('bookmarks.current')
         # No readline() in posixfile_nt, reading everything is cheap
-        mark = (file.readlines() or [''])[0]
+        mark = encoding.tolocal((file.readlines() or [''])[0])
         if mark == '':
             mark = None
         file.close()