bookmarks: always write undo file

Always write the undo file. Otherwise, rollback will not work for
the initial bookmark as undo.bookmarks doesn't exists. In this case
undo.bookmarks needs already be empty.
This commit is contained in:
David Soria Parra 2011-01-27 02:55:11 +01:00
parent f645c6e6fb
commit e5aec633d1

View File

@ -48,8 +48,7 @@ def write(repo):
try: try:
bms = repo.opener('bookmarks').read() bms = repo.opener('bookmarks').read()
except IOError: except IOError:
bms = None bms = ''
if bms is not None:
repo.opener('undo.bookmarks', 'w').write(bms) repo.opener('undo.bookmarks', 'w').write(bms)
if repo._bookmarkcurrent not in refs: if repo._bookmarkcurrent not in refs: