##// END OF EJS Templates
bookmarks: set the current bookmark to the new name if we rename the current bookmark...
David Soria Parra -
r7550:fead6cf9 default
parent child Browse files
Show More
@@ -64,9 +64,9 b' def write(repo, refs):'
64 64 '''
65 65 if os.path.exists(repo.join('bookmarks')):
66 66 util.copyfile(repo.join('bookmarks'), repo.join('undo.bookmarks'))
67 file = repo.opener('bookmarks', 'w+')
68 67 if current(repo) not in refs:
69 68 setcurrent(repo, None)
69 file = repo.opener('bookmarks', 'w+')
70 70 for refspec, node in refs.items():
71 71 file.write("%s %s\n" % (hex(node), refspec))
72 72 file.close()
@@ -138,6 +138,8 b' def bookmark(ui, repo, mark=None, rev=No'
138 138 raise util.Abort(_("new bookmark name required"))
139 139 marks[mark] = marks[rename]
140 140 del marks[rename]
141 if current(repo) == rename:
142 setcurrent(repo, mark)
141 143 write(repo, marks)
142 144 return
143 145
General Comments 0
You need to be logged in to leave comments. Login now