changeset 15491:c0e42b47ec1a

bookmark: remove excess creation of changectx's
author Kevin Bullock <kbullock@ringworld.org>
date Wed, 17 Aug 2011 08:55:01 -0500
parents 875bb46e35ea
children 36f076d03b34
files mercurial/commands.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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