# HG changeset patch # User Kevin Bullock # Date 1313588980 18000 # Node ID 875bb46e35ea4756c2ec6ef29eba79a2b1b1987a # Parent 25ea33fe7e5cb4f14dd919f50fbdbee376b6bf78 bookmark: same order for options and code diff -r 25ea33fe7e5c -r 875bb46e35ea mercurial/commands.py --- a/mercurial/commands.py Tue Nov 15 14:33:06 2011 -0600 +++ b/mercurial/commands.py Wed Aug 17 08:49:40 2011 -0500 @@ -739,6 +739,17 @@ marks = repo._bookmarks cur = repo.changectx('.').node() + if delete: + if mark is None: + raise util.Abort(_("bookmark name required")) + if mark not in marks: + raise util.Abort(_("bookmark '%s' does not exist") % mark) + if mark == repo._bookmarkcurrent: + bookmarks.setcurrent(repo, None) + del marks[mark] + bookmarks.write(repo) + return + if rename: if rename not in marks: raise util.Abort(_("bookmark '%s' does not exist") % rename) @@ -754,17 +765,6 @@ bookmarks.write(repo) return - if delete: - if mark is None: - raise util.Abort(_("bookmark name required")) - if mark not in marks: - raise util.Abort(_("bookmark '%s' does not exist") % mark) - if mark == repo._bookmarkcurrent: - bookmarks.setcurrent(repo, None) - del marks[mark] - bookmarks.write(repo) - return - if mark is not None: if "\n" in mark: raise util.Abort(_("bookmark name cannot contain newlines"))