[PATCH 2 of 2] tag: do not allow tag names to consist solely of whitespace (issue2307)

Benjamin Pollack benjamin at bitquabit.com
Tue Jul 27 13:43:35 CDT 2010


# HG changeset patch
# User Benjamin Pollack <benjamin at bitquabit.com>
# Date 1280256025 14400
# Branch stable
# Node ID e3e80f46984a656819c6f2a27f94af0faa4be38f
# Parent  4689da8bc47a9febb2891f4316f0c575dde97333
tag: do not allow tag names to consist solely of whitespace (issue2307)

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3660,6 +3660,8 @@
     for n in names:
         if n in ['tip', '.', 'null']:
             raise util.Abort(_('the name \'%s\' is reserved') % n)
+        if len(n) == 0:
+            raise util.Abort(_('tag names cannot consist entirely of whitespace'))
     if opts.get('rev') and opts.get('remove'):
         raise util.Abort(_("--rev and --remove are incompatible"))
     if opts.get('rev'):


More information about the Mercurial-devel mailing list