mercurial/commands.py
branchstable
changeset 13448 97b69883e929
parent 13416 5431b3f3e52e
child 13453 c1b808020819
--- a/mercurial/commands.py	Fri Feb 18 20:25:25 2011 +0100
+++ b/mercurial/commands.py	Sun Feb 20 00:57:55 2011 +0100
@@ -521,7 +521,8 @@
             marks[mark] = repo.lookup(rev)
         else:
             marks[mark] = repo.changectx('.').node()
-        bookmarks.setcurrent(repo, mark)
+        if repo.changectx('.').node() == marks[mark]:
+            bookmarks.setcurrent(repo, mark)
         bookmarks.write(repo)
         return