<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Jan 10, 2016 at 6:57 PM, timeless <span dir="ltr"><<a href="mailto:timeless@mozdev.org" target="_blank">timeless@mozdev.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User timeless <<a href="mailto:timeless@mozdev.org">timeless@mozdev.org</a>><br>
# Date 1451197020 0<br>
#      Sun Dec 27 06:17:00 2015 +0000<br>
# Node ID 8d2ac62c7f35e860bd6fae43d6a03dd0289739b1<br>
# Parent  1fb445a08991a9bce47a19b02aa3752df3d3cb5e<br>
tag: only checknewlabel for new tags<br>
<br>
diff --git a/mercurial/commands.py b/mercurial/commands.py<br>
--- a/mercurial/commands.py<br>
+++ b/mercurial/commands.py<br>
@@ -6713,7 +6713,6 @@<br>
         if len(names) != len(set(names)):<br>
             raise error.Abort(_('tag names must be unique'))<br>
         for n in names:<br>
-            scmutil.checknewlabel(repo, n, 'tag')<br>
             if not n:<br>
                 raise error.Abort(_('tag names cannot consist entirely of '<br>
                                    'whitespace'))<br>
@@ -6742,6 +6741,7 @@<br>
                 message = 'Removed tag %s' % ', '.join(names)<br>
         elif not opts.get('force'):<br>
             for n in names:<br>
+                scmutil.checknewlabel(repo, n, 'tag')<br>
                 if n in repo.tags():<br>
                     raise error.Abort(_("tag '%s' already exists "<br>
                                        "(use -f to force)") % n)<br>
</blockquote></div><br></div><div class="gmail_extra">Would this make it possible to use disallowed names by passing "--force"?</div><div class="gmail_extra"><br></div><div class="gmail_extra">Simon</div></div>