mercurial/bookmarks.py
changeset 33481 67b5f81f17cf
parent 33480 ef54789a947d
child 33482 916d4cde530e
equal deleted inserted replaced
33480:ef54789a947d 33481:67b5f81f17cf
   713     """remove a mark from the bookmark store
   713     """remove a mark from the bookmark store
   714 
   714 
   715     Raises an abort error if mark does not exist.
   715     Raises an abort error if mark does not exist.
   716     """
   716     """
   717     marks = repo._bookmarks
   717     marks = repo._bookmarks
       
   718     changes = []
   718     for mark in names:
   719     for mark in names:
   719         if mark not in marks:
   720         if mark not in marks:
   720             raise error.Abort(_("bookmark '%s' does not exist") % mark)
   721             raise error.Abort(_("bookmark '%s' does not exist") % mark)
   721         if mark == repo._activebookmark:
   722         if mark == repo._activebookmark:
   722             deactivate(repo)
   723             deactivate(repo)
   723         del marks[mark]
   724         changes.append((mark, None))
   724     marks.recordchange(tr)
   725     marks.applychanges(repo, tr, changes)
   725 
   726 
   726 def rename(repo, tr, old, new, force=False, inactive=False):
   727 def rename(repo, tr, old, new, force=False, inactive=False):
   727     """rename a bookmark from old to new
   728     """rename a bookmark from old to new
   728 
   729 
   729     If force is specified, then the new name can overwrite an existing
   730     If force is specified, then the new name can overwrite an existing