mercurial/commands.py
changeset 17817 b17be267b59c
parent 17814 f88ca484c3e9
child 17818 5023027240a1
equal deleted inserted replaced
17816:19388ba75a06 17817:b17be267b59c
  5638         rev_ = "."
  5638         rev_ = "."
  5639         names = [t.strip() for t in (name1,) + names]
  5639         names = [t.strip() for t in (name1,) + names]
  5640         if len(names) != len(set(names)):
  5640         if len(names) != len(set(names)):
  5641             raise util.Abort(_('tag names must be unique'))
  5641             raise util.Abort(_('tag names must be unique'))
  5642         for n in names:
  5642         for n in names:
  5643             if n in ['tip', '.', 'null']:
  5643             scmutil.checknewlabel(repo, n)
  5644                 raise util.Abort(_("the name '%s' is reserved") % n)
       
  5645             if not n:
  5644             if not n:
  5646                 raise util.Abort(_('tag names cannot consist entirely of '
  5645                 raise util.Abort(_('tag names cannot consist entirely of '
  5647                                    'whitespace'))
  5646                                    'whitespace'))
  5648         if opts.get('rev') and opts.get('remove'):
  5647         if opts.get('rev') and opts.get('remove'):
  5649             raise util.Abort(_("--rev and --remove are incompatible"))
  5648             raise util.Abort(_("--rev and --remove are incompatible"))