mercurial/commands.py
changeset 1734 9488d53233b5
parent 1732 d3e6da334b85
child 1736 50de0887bbcd
equal deleted inserted replaced
1733:6d288d8c3ca6 1734:9488d53233b5
  2115     for c in disallowed:
  2115     for c in disallowed:
  2116         if name.find(c) >= 0:
  2116         if name.find(c) >= 0:
  2117             raise util.Abort(_("%s cannot be used in a tag name") % repr(c))
  2117             raise util.Abort(_("%s cannot be used in a tag name") % repr(c))
  2118 
  2118 
  2119     repo.hook('pretag', throw=True, node=r, tag=name,
  2119     repo.hook('pretag', throw=True, node=r, tag=name,
  2120               local=not not opts['local'])
  2120               local=int(not not opts['local']))
  2121 
  2121 
  2122     if opts['local']:
  2122     if opts['local']:
  2123         repo.opener("localtags", "a").write("%s %s\n" % (r, name))
  2123         repo.opener("localtags", "a").write("%s %s\n" % (r, name))
  2124         repo.hook('tag', node=r, tag=name, local=1)
  2124         repo.hook('tag', node=r, tag=name, local=1)
  2125         return
  2125         return