mercurial/commands.py
changeset 41490 09f1c17e24dd
parent 41398 2ff8994ac71d
child 41491 e6ec0737b706
equal deleted inserted replaced
41489:5125f0a9728b 41490:09f1c17e24dd
  5828                 expectedtype = 'local'
  5828                 expectedtype = 'local'
  5829             else:
  5829             else:
  5830                 expectedtype = 'global'
  5830                 expectedtype = 'global'
  5831 
  5831 
  5832             for n in names:
  5832             for n in names:
       
  5833                 if repo.tagtype(n) == 'global':
       
  5834                     alltags = tagsmod.findglobaltags(ui, repo)
       
  5835                     if alltags[n][0] == nullid:
       
  5836                         raise error.Abort(_("tag '%s' is already removed") % n)
  5833                 if not repo.tagtype(n):
  5837                 if not repo.tagtype(n):
  5834                     raise error.Abort(_("tag '%s' does not exist") % n)
  5838                     raise error.Abort(_("tag '%s' does not exist") % n)
  5835                 if repo.tagtype(n) != expectedtype:
  5839                 if repo.tagtype(n) != expectedtype:
  5836                     if expectedtype == 'global':
  5840                     if expectedtype == 'global':
  5837                         raise error.Abort(_("tag '%s' is not a global tag") % n)
  5841                         raise error.Abort(_("tag '%s' is not a global tag") % n)