Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 19112:23f785b38af3 stable 2.6
bookmarks: fix bug that activated a bookmark even with -r passed
If the current revision was the target revision of -r, then the bookmark would
be active. Test cases have been updated accordingly.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Wed, 01 May 2013 15:24:21 -0500 |
parents | 6439d78e14fb |
children | 5b1835485442 12dbdd348bb0 |
comparison
equal
deleted
inserted
replaced
19111:6439d78e14fb | 19112:23f785b38af3 |
---|---|
878 tgt = cur | 878 tgt = cur |
879 if rev: | 879 if rev: |
880 tgt = scmutil.revsingle(repo, rev).node() | 880 tgt = scmutil.revsingle(repo, rev).node() |
881 checkconflict(repo, mark, force, tgt) | 881 checkconflict(repo, mark, force, tgt) |
882 marks[mark] = tgt | 882 marks[mark] = tgt |
883 if not inactive and cur == marks[mark]: | 883 if not inactive and cur == marks[mark] and not rev: |
884 bookmarks.setcurrent(repo, mark) | 884 bookmarks.setcurrent(repo, mark) |
885 elif cur != tgt and mark == repo._bookmarkcurrent: | 885 elif cur != tgt and mark == repo._bookmarkcurrent: |
886 bookmarks.setcurrent(repo, None) | 886 bookmarks.setcurrent(repo, None) |
887 marks.write() | 887 marks.write() |
888 | 888 |