diff mercurial/bookmarks.py @ 13381:d073468e3c5f

bookmarks: read current bookmark as utf-8 and convert it to local
author David Soria Parra <dsp@php.net>
date Fri, 11 Feb 2011 19:32:49 +0100
parents 4e1ba6ead69c
children 5431b3f3e52e
line wrap: on
line diff
--- 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()