Mercurial > hg
changeset 7666:2ad81e9b075b
bookmarks: work around missing posixfile_nt.readline()
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 19 Jan 2009 00:36:32 +0100 |
parents | 950484f05f16 |
children | bd5c37d792e6 |
files | hgext/bookmarks.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/bookmarks.py Sat Jan 17 18:51:40 2009 +0100 +++ b/hgext/bookmarks.py Mon Jan 19 00:36:32 2009 +0100 @@ -80,7 +80,8 @@ mark = None if os.path.exists(repo.join('bookmarks.current')): file = repo.opener('bookmarks.current') - mark = file.readline() + # No readline() in posixfile_nt, reading everything is cheap + mark = (file.readlines() or [''])[0] if mark == '': mark = None file.close()