mercurial/bookmarks.py
changeset 33005 9343fce87789
parent 32956 4f0a7f604449
child 33006 e0a8dd6c87c7
equal deleted inserted replaced
33004:c808862f2e6e 33005:9343fce87789
   689     if not mark:
   689     if not mark:
   690         raise error.Abort(_("bookmark names cannot consist entirely of "
   690         raise error.Abort(_("bookmark names cannot consist entirely of "
   691                             "whitespace"))
   691                             "whitespace"))
   692     scmutil.checknewlabel(repo, mark, 'bookmark')
   692     scmutil.checknewlabel(repo, mark, 'bookmark')
   693     return mark
   693     return mark
       
   694 
       
   695 def delete(repo, tr, names):
       
   696     """remove a mark from the bookmark store
       
   697 
       
   698     Raises an abort error if mark does not exist.
       
   699     """
       
   700     marks = repo._bookmarks
       
   701     for mark in names:
       
   702         if mark not in marks:
       
   703             raise error.Abort(_("bookmark '%s' does not exist") % mark)
       
   704         if mark == repo._activebookmark:
       
   705             deactivate(repo)
       
   706         del marks[mark]
       
   707     marks.recordchange(tr)