mercurial/commands.py
changeset 15491 c0e42b47ec1a
parent 15490 875bb46e35ea
child 15503 eb5ed02d8743
equal deleted inserted replaced
15490:875bb46e35ea 15491:c0e42b47ec1a
   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: