[PATCH 1 of 6] bookmarks: read current bookmark as utf-8 and convert it to local
David Soria Parra
dsp at php.net
Fri Feb 11 13:37:25 CST 2011
# HG changeset patch
# User David Soria Parra <dsp at php.net>
# Date 1297449169 -3600
# Node ID 6e548aa298cf04b0ad054a0e4a3ba6a0cf24795f
# Parent d4ab9486e514dd24e21a2ca3b6c439ea13d85cab
bookmarks: read current bookmark as utf-8 and convert it to local
diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py
--- a/mercurial/bookmarks.py
+++ b/mercurial/bookmarks.py
@@ -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()
More information about the Mercurial-devel
mailing list