Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 11692:52e4ac3e63f7 stable
tag: do not allow tag names to consist solely of whitespace (issue2307)
(simplification and test by mpm)
author | Benjamin Pollack <benjamin@bitquabit.com> |
---|---|
date | Tue, 27 Jul 2010 14:40:25 -0400 |
parents | c10eaf1210cd |
children | efcdf6a953a0 9299b98041e8 |
comparison
equal
deleted
inserted
replaced
11678:f5aa20e177c0 | 11692:52e4ac3e63f7 |
---|---|
3658 if len(names) != len(set(names)): | 3658 if len(names) != len(set(names)): |
3659 raise util.Abort(_('tag names must be unique')) | 3659 raise util.Abort(_('tag names must be unique')) |
3660 for n in names: | 3660 for n in names: |
3661 if n in ['tip', '.', 'null']: | 3661 if n in ['tip', '.', 'null']: |
3662 raise util.Abort(_('the name \'%s\' is reserved') % n) | 3662 raise util.Abort(_('the name \'%s\' is reserved') % n) |
3663 if not n: | |
3664 raise util.Abort(_('tag names cannot consist entirely of whitespace')) | |
3663 if opts.get('rev') and opts.get('remove'): | 3665 if opts.get('rev') and opts.get('remove'): |
3664 raise util.Abort(_("--rev and --remove are incompatible")) | 3666 raise util.Abort(_("--rev and --remove are incompatible")) |
3665 if opts.get('rev'): | 3667 if opts.get('rev'): |
3666 rev_ = opts['rev'] | 3668 rev_ = opts['rev'] |
3667 message = opts.get('message') | 3669 message = opts.get('message') |