[PATCH 4 of 5] tag: only checknewlabel for new tags
timeless
timeless at gmail.com
Thu Jan 14 10:22:44 CST 2016
Simon King wrote:
>> @@ -6742,6 +6741,7 @@
>> message = 'Removed tag %s' % ', '.join(names)
>> elif not opts.get('force'):
>> for n in names:
>> + scmutil.checknewlabel(repo, n, 'tag')
>> if n in repo.tags():
>> raise error.Abort(_("tag '%s' already exists "
>> "(use -f to force)") % n)
>
> Would this make it possible to use disallowed names by passing "--force"?
Indeed, that's not good. There's also no test coverage for that
afaict. I'll include a test so that someone like me doesn't
accidentally relax that restriction.
Thanks for spotting it!
More information about the Mercurial-devel
mailing list