Mercurial > hg
diff mercurial/bookmarks.py @ 43598:2a8cd7edf409
bookmarks: fix handling of multiple bookmarks with one to be deactivated
Before, "hg bookmark --inactive Z Y" would ignore "Y" if "Z" were currently
active. I'm pretty sure it is a bug.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 09 Nov 2019 12:09:50 +0900 |
parents | 886ec3962c66 |
children | 1c91576b88bb |
line wrap: on
line diff
--- a/mercurial/bookmarks.py Mon Nov 11 22:10:26 2019 +0900 +++ b/mercurial/bookmarks.py Sat Nov 09 12:09:50 2019 +0900 @@ -965,7 +965,7 @@ newact = mark if inactive and mark == repo._activebookmark: deactivate(repo) - return + continue tgt = cur if rev: ctx = scmutil.revsingle(repo, rev) @@ -976,6 +976,10 @@ changes.append((bm, None)) changes.append((mark, tgt)) + # nothing changed but for the one deactivated above + if not changes: + return + if hiddenrev: repo.ui.warn(_(b"bookmarking hidden changeset %s\n") % hiddenrev)