comparison mercurial/commands.py @ 1734:9488d53233b5

tests for new hooks. fix things i found when writing tests.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Thu, 16 Feb 2006 09:56:31 -0800
parents d3e6da334b85
children 50de0887bbcd
comparison
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