equal
deleted
inserted
replaced
783 raise util.Abort( |
783 raise util.Abort( |
784 _("a bookmark cannot have the name of an existing branch")) |
784 _("a bookmark cannot have the name of an existing branch")) |
785 if rev: |
785 if rev: |
786 marks[mark] = repo.lookup(rev) |
786 marks[mark] = repo.lookup(rev) |
787 else: |
787 else: |
788 marks[mark] = repo.changectx('.').node() |
788 marks[mark] = cur |
789 if not inactive and repo.changectx('.').node() == marks[mark]: |
789 if not inactive and cur == marks[mark]: |
790 bookmarks.setcurrent(repo, mark) |
790 bookmarks.setcurrent(repo, mark) |
791 bookmarks.write(repo) |
791 bookmarks.write(repo) |
792 return |
792 return |
793 |
793 |
794 if mark is None: |
794 if mark is None: |