diff -r 548478efc46c -r bce5ebe72859 mercurial/commands.py --- a/mercurial/commands.py Thu May 04 11:51:07 2017 +0900 +++ b/mercurial/commands.py Mon May 22 19:18:12 2017 -0400 @@ -968,6 +968,11 @@ and not force): raise error.Abort( _("a bookmark cannot have the name of an existing branch")) + if len(mark) > 3 and mark in repo and not force: + repo.ui.warn( + _("bookmark %s matches a changeset hash\n" + "(did you leave a -r out of an 'hg bookmark' command?)\n") % + mark) if delete and rename: raise error.Abort(_("--delete and --rename are incompatible"))