Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 13911:6bc340940c18
bookmarks: change error messages to match those given by 'hg tag' commands
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Thu, 07 Apr 2011 17:57:38 +0300 |
parents | a7cd0eee396b |
children | 332e400764e5 |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Apr 07 14:43:19 2011 -0500 +++ b/mercurial/commands.py Thu Apr 07 17:57:38 2011 +0300 @@ -507,9 +507,10 @@ if rename: if rename not in marks: - raise util.Abort(_("a bookmark of this name does not exist")) + raise util.Abort(_("bookmark '%s' does not exist") % rename) if mark in marks and not force: - raise util.Abort(_("a bookmark of the same name already exists")) + raise util.Abort(_("bookmark '%s' already exists " + "(use -f to force)") % mark) if mark is None: raise util.Abort(_("new bookmark name required")) marks[mark] = marks[rename] @@ -523,7 +524,7 @@ if mark is None: raise util.Abort(_("bookmark name required")) if mark not in marks: - raise util.Abort(_("a bookmark of this name does not exist")) + raise util.Abort(_("bookmark '%s' does not exist") % mark) if mark == repo._bookmarkcurrent: bookmarks.setcurrent(repo, None) del marks[mark] @@ -538,7 +539,8 @@ raise util.Abort(_("bookmark names cannot consist entirely of " "whitespace")) if mark in marks and not force: - raise util.Abort(_("a bookmark of the same name already exists")) + raise util.Abort(_("bookmark '%s' already exists " + "(use -f to force)") % mark) if ((mark in repo.branchtags() or mark == repo.dirstate.branch()) and not force): raise util.Abort(