D3167: bookmarks: use isrevsymbol() for detecting collision with existing symbol

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Fri Apr 6 14:51:02 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG46d9f998c3ed: bookmarks: use isrevsymbol() for detecting collision with existing symbol (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3167?vs=7794&id=7799

REVISION DETAIL
  https://phab.mercurial-scm.org/D3167

AFFECTED FILES
  mercurial/bookmarks.py

CHANGE DETAILS

diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py
--- a/mercurial/bookmarks.py
+++ b/mercurial/bookmarks.py
@@ -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:



To: martinvonz, #hg-reviewers, indygreg
Cc: mercurial-devel


More information about the Mercurial-devel mailing list