equal
deleted
inserted
replaced
831 if ((mark in repo.branchmap() or mark == repo.dirstate.branch()) |
831 if ((mark in repo.branchmap() or mark == repo.dirstate.branch()) |
832 and not force): |
832 and not force): |
833 raise util.Abort( |
833 raise util.Abort( |
834 _("a bookmark cannot have the name of an existing branch")) |
834 _("a bookmark cannot have the name of an existing branch")) |
835 if rev: |
835 if rev: |
836 marks[mark] = repo.lookup(rev) |
836 marks[mark] = scmutil.revsingle(repo, rev).node() |
837 else: |
837 else: |
838 marks[mark] = cur |
838 marks[mark] = cur |
839 if not inactive and cur == marks[mark]: |
839 if not inactive and cur == marks[mark]: |
840 bookmarks.setcurrent(repo, mark) |
840 bookmarks.setcurrent(repo, mark) |
841 bookmarks.write(repo) |
841 bookmarks.write(repo) |