diff mercurial/commands.py @ 13620:8ee4b00ddfd8 stable

bookmarks: fix update of the current bookmark during rename We need to get rid of the previous bookmark after changing current bookmark.
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 13 Mar 2011 15:42:24 +0100
parents 0fb2ff949790
children 0e217d479c16 adf3c4401c5d
line wrap: on
line diff
--- a/mercurial/commands.py	Sun Mar 13 14:26:32 2011 +0100
+++ b/mercurial/commands.py	Sun Mar 13 15:42:24 2011 +0100
@@ -487,9 +487,9 @@
         if mark is None:
             raise util.Abort(_("new bookmark name required"))
         marks[mark] = marks[rename]
-        del marks[rename]
         if repo._bookmarkcurrent == rename:
             bookmarks.setcurrent(repo, mark)
+        del marks[rename]
         bookmarks.write(repo)
         return