Show More
@@ -44,8 +44,14 b' def write(repo):' | |||||
44 | can be copied back on rollback. |
|
44 | can be copied back on rollback. | |
45 | ''' |
|
45 | ''' | |
46 | refs = repo._bookmarks |
|
46 | refs = repo._bookmarks | |
47 | if os.path.exists(repo.join('bookmarks')): |
|
47 | ||
48 | util.copyfile(repo.join('bookmarks'), repo.join('undo.bookmarks')) |
|
48 | try: | |
|
49 | bms = repo.opener('bookmarks').read() | |||
|
50 | except IOError: | |||
|
51 | bms = None | |||
|
52 | if bms is not None: | |||
|
53 | repo.opener('undo.bookmarks', 'w').write(bms) | |||
|
54 | ||||
49 | if repo._bookmarkcurrent not in refs: |
|
55 | if repo._bookmarkcurrent not in refs: | |
50 | setcurrent(repo, None) |
|
56 | setcurrent(repo, None) | |
51 | wlock = repo.wlock() |
|
57 | wlock = repo.wlock() |
General Comments 0
You need to be logged in to leave comments.
Login now