mercurial/commands.py
changeset 17686 6e4b962600a3
parent 17668 28c43957f8b4
child 17717 009db477c9fb
equal deleted inserted replaced
17685:8fcef9614150 17686:6e4b962600a3
   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)