Patchwork [2,of,4] bookmark: consistently checknewlabel after checkconflict

login
register
mail settings
Submitter timeless@mozdev.org
Date Jan. 14, 2016, 6:26 p.m.
Message ID <9b06612693f532cd977c.1452795970@waste.org>
Download mbox | patch
Permalink /patch/12759/
State Changes Requested
Delegated to: Yuya Nishihara
Headers show

Comments

timeless@mozdev.org - Jan. 14, 2016, 6:26 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1451198555 0
#      Sun Dec 27 06:42:35 2015 +0000
# Node ID 9b06612693f532cd977ccc780431361bea159bea
# Parent  6196b9c48fe7f9ed17d6d05b482f7eaf01602ee5
bookmark: consistently checknewlabel after checkconflict

Patch

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 = stripwhitespace(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)