bookmark: remove excess creation of changectx's
authorKevin Bullock <kbullock@ringworld.org>
Wed, 17 Aug 2011 08:55:01 -0500
changeset 15491 c0e42b47ec1a
parent 15490 875bb46e35ea
child 15492 36f076d03b34
bookmark: remove excess creation of changectx's
mercurial/commands.py
--- a/mercurial/commands.py	Wed Aug 17 08:49:40 2011 -0500
+++ b/mercurial/commands.py	Wed Aug 17 08:55:01 2011 -0500
@@ -785,8 +785,8 @@
         if rev:
             marks[mark] = repo.lookup(rev)
         else:
-            marks[mark] = repo.changectx('.').node()
-        if not inactive and repo.changectx('.').node() == marks[mark]:
+            marks[mark] = cur
+        if not inactive and cur == marks[mark]:
             bookmarks.setcurrent(repo, mark)
         bookmarks.write(repo)
         return