##// END OF EJS Templates
bookmarks: Only save undo.bookmarks if bookmarks exist...
Joel Rosdahl -
r7253:8b81d1e2 default
parent child Browse files
Show More
@@ -52,7 +52,8 b' def write(repo, refs):'
52 52 We also store a backup of the previous state in undo.bookmarks that
53 53 can be copied back on rollback.
54 54 '''
55 util.copyfile(repo.join('bookmarks'), repo.join('undo.bookmarks'))
55 if os.path.exists(repo.join('bookmarks')):
56 util.copyfile(repo.join('bookmarks'), repo.join('undo.bookmarks'))
56 57 file = repo.opener('bookmarks', 'w+')
57 58 for refspec, node in refs.items():
58 59 file.write("%s %s\n" % (hex(node), refspec))
General Comments 0
You need to be logged in to leave comments. Login now