mercurial/localrepo.py
changeset 11063 eb23c876c111
parent 11047 c7dbd6c4877a
child 11112 4a9bee613737
equal deleted inserted replaced
11062:a2a6fd1064df 11063:eb23c876c111
   162             allchars = ''.join(names)
   162             allchars = ''.join(names)
   163         for c in self.tag_disallowed:
   163         for c in self.tag_disallowed:
   164             if c in allchars:
   164             if c in allchars:
   165                 raise util.Abort(_('%r cannot be used in a tag name') % c)
   165                 raise util.Abort(_('%r cannot be used in a tag name') % c)
   166 
   166 
       
   167         branches = self.branchmap()
   167         for name in names:
   168         for name in names:
   168             self.hook('pretag', throw=True, node=hex(node), tag=name,
   169             self.hook('pretag', throw=True, node=hex(node), tag=name,
   169                       local=local)
   170                       local=local)
       
   171             if name in branches:
       
   172                 self.ui.warn(_("warning: tag %s conflicts with existing"
       
   173                 " branch name\n") % name)
   170 
   174 
   171         def writetags(fp, names, munge, prevtags):
   175         def writetags(fp, names, munge, prevtags):
   172             fp.seek(0, 2)
   176             fp.seek(0, 2)
   173             if prevtags and prevtags[-1] != '\n':
   177             if prevtags and prevtags[-1] != '\n':
   174                 fp.write('\n')
   178                 fp.write('\n')