[PATCH 2 of 2] bookmark: remove excess creation of changectx's

Kevin Bullock kbullock+mercurial at ringworld.org
Wed Nov 16 15:29:08 CST 2011


# HG changeset patch
# User Kevin Bullock <kbullock at ringworld.org>
# Date 1313589301 18000
# Node ID b3d2110409559a78ec0cced19f9aa8c60d38079d
# Parent  b78acdfaa3b3acc5843504c79d9fc3e13e16ef95
bookmark: remove excess creation of changectx's

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -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


More information about the Mercurial-devel mailing list