Mercurial > hg-stable
diff mercurial/commands.py @ 18782:22f87dc77604
bookmarks: moving the active bookmark deactivates it
After this change, moving the active bookmark somewhere other than the
current changeset (i.e., with --rev) deactivates it. Previously it would
remain in .hg/bookmarks.current, which seems like a bug.
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Sat, 16 Mar 2013 22:48:22 -0500 |
parents | 99b78269a2ec |
children | b99e62a9b7a2 |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Mar 16 21:36:44 2013 -0500 +++ b/mercurial/commands.py Sat Mar 16 22:48:22 2013 -0500 @@ -869,6 +869,8 @@ marks[mark] = tgt if not inactive and cur == marks[mark]: bookmarks.setcurrent(repo, mark) + elif cur != tgt and mark == repo._bookmarkcurrent: + bookmarks.setcurrent(repo, None) marks.write() # Same message whether trying to deactivate the current bookmark (-i