Mercurial > hg
changeset 37397:46d9f998c3ed
bookmarks: use isrevsymbol() for detecting collision with existing symbol
Differential Revision: https://phab.mercurial-scm.org/D3167
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 06 Apr 2018 11:28:26 -0700 |
parents | 9966f44ecab4 |
children | 3235afdfcf1c |
files | mercurial/bookmarks.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/bookmarks.py Fri Apr 06 11:26:50 2018 -0700 +++ b/mercurial/bookmarks.py Fri Apr 06 11:28:26 2018 -0700 @@ -238,7 +238,7 @@ _("a bookmark cannot have the name of an existing branch")) if len(mark) > 3 and not force: try: - shadowhash = (mark in self._repo) + shadowhash = scmutil.isrevsymbol(self._repo, mark) except error.LookupError: # ambiguous identifier shadowhash = False if shadowhash: