diff --git a/hgext/bookmarks.py b/hgext/bookmarks.py --- a/hgext/bookmarks.py +++ b/hgext/bookmarks.py @@ -146,7 +146,7 @@ def bookmark(ui, repo, mark=None, rev=No marks[mark] = repo.lookup(rev) else: marks[mark] = repo.changectx('.').node() - setcurrent(repo, mark) + setcurrent(repo, mark) write(repo) return diff --git a/tests/test-bookmarks-current b/tests/test-bookmarks-current --- a/tests/test-bookmarks-current +++ b/tests/test-bookmarks-current @@ -57,3 +57,8 @@ hg bookmark echo % update to tip hg update tip +echo % set bookmark Y using -r . +hg bookmark -r . Y + +echo % list bookmarks +hg bookmark diff --git a/tests/test-bookmarks-current.out b/tests/test-bookmarks-current.out --- a/tests/test-bookmarks-current.out +++ b/tests/test-bookmarks-current.out @@ -25,3 +25,6 @@ 0 files updated, 0 files merged, 0 files no bookmarks set % update to tip 0 files updated, 0 files merged, 0 files removed, 0 files unresolved +% set bookmark Y using -r . +% list bookmarks + * Y 0:719295282060