# HG changeset patch # User Kevin Bullock # Date 2011-08-17 13:55:01 # Node ID c0e42b47ec1a7f74aa2feef941c513cd179de4bd # Parent 875bb46e35ea4756c2ec6ef29eba79a2b1b1987a 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 @@ def bookmark(ui, repo, mark=None, rev=No 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