[PATCH 3 of 5] bookmark: consistently checknewlabel after checkconflict

timeless timeless at mozdev.org
Sun Jan 10 12:57:50 CST 2016


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1451198555 0
#      Sun Dec 27 06:42:35 2015 +0000
# Node ID 1fb445a08991a9bce47a19b02aa3752df3d3cb5e
# Parent  b15de606bd509eba76554071d9e4e40b1a9bb879
bookmark: consistently checknewlabel after checkconflict

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1112,8 +1112,6 @@
                 newact = None
                 for mark in names:
                     mark = checkformat(mark)
-                    if not mark in repo._bookmarks:
-                        scmutil.checknewlabel(repo, mark, 'bookmark')
                     if newact is None:
                         newact = mark
                     if inactive and mark == repo._activebookmark:
@@ -1123,6 +1121,8 @@
                     if rev:
                         tgt = scmutil.revsingle(repo, rev).node()
                     checkconflict(repo, mark, cur, force, tgt)
+                    if not mark in repo._bookmarks:
+                        scmutil.checknewlabel(repo, mark, 'bookmark')
                     marks[mark] = tgt
                 if not inactive and cur == marks[newact] and not rev:
                     bookmarks.activate(repo, newact)


More information about the Mercurial-devel mailing list