##// END OF EJS Templates
bookmark: use 'applychanges' for bookmark deletion
Boris Feld -
r33481:67b5f81f default
parent child Browse files
Show More
@@ -715,13 +715,14 b' def delete(repo, tr, names):'
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
General Comments 0
You need to be logged in to leave comments. Login now