equal
deleted
inserted
replaced
980 tr = repo.transaction('bookmark') |
980 tr = repo.transaction('bookmark') |
981 if not names: |
981 if not names: |
982 raise error.Abort(_("new bookmark name required")) |
982 raise error.Abort(_("new bookmark name required")) |
983 elif len(names) > 1: |
983 elif len(names) > 1: |
984 raise error.Abort(_("only one new bookmark name allowed")) |
984 raise error.Abort(_("only one new bookmark name allowed")) |
985 mark = bookmarks.checkformat(repo, names[0]) |
985 bookmarks.rename(repo, tr, rename, names[0], force, inactive) |
986 if rename not in marks: |
|
987 raise error.Abort(_("bookmark '%s' does not exist") |
|
988 % rename) |
|
989 marks.checkconflict(mark, force) |
|
990 marks[mark] = marks[rename] |
|
991 if repo._activebookmark == rename and not inactive: |
|
992 bookmarks.activate(repo, mark) |
|
993 del marks[rename] |
|
994 elif names: |
986 elif names: |
995 tr = repo.transaction('bookmark') |
987 tr = repo.transaction('bookmark') |
996 newact = None |
988 newact = None |
997 for mark in names: |
989 for mark in names: |
998 mark = bookmarks.checkformat(repo, mark) |
990 mark = bookmarks.checkformat(repo, mark) |