mercurial/commands.py
changeset 33005 9343fce87789
parent 32956 4f0a7f604449
child 33006 e0a8dd6c87c7
equal deleted inserted replaced
33004:c808862f2e6e 33005:9343fce87789
   973             lock = repo.lock()
   973             lock = repo.lock()
   974             cur = repo.changectx('.').node()
   974             cur = repo.changectx('.').node()
   975             marks = repo._bookmarks
   975             marks = repo._bookmarks
   976             if delete:
   976             if delete:
   977                 tr = repo.transaction('bookmark')
   977                 tr = repo.transaction('bookmark')
   978                 for mark in names:
   978                 bookmarks.delete(repo, tr, names)
   979                     if mark not in marks:
       
   980                         raise error.Abort(_("bookmark '%s' does not exist") %
       
   981                                          mark)
       
   982                     if mark == repo._activebookmark:
       
   983                         bookmarks.deactivate(repo)
       
   984                     del marks[mark]
       
   985 
       
   986             elif rename:
   979             elif rename:
   987                 tr = repo.transaction('bookmark')
   980                 tr = repo.transaction('bookmark')
   988                 if not names:
   981                 if not names:
   989                     raise error.Abort(_("new bookmark name required"))
   982                     raise error.Abort(_("new bookmark name required"))
   990                 elif len(names) > 1:
   983                 elif len(names) > 1: