5170 # don't allow tagging the null rev |
5171 # don't allow tagging the null rev |
5171 if (not opts.get('remove') and |
5172 if (not opts.get('remove') and |
5172 scmutil.revsingle(repo, rev_).rev() == nullrev): |
5173 scmutil.revsingle(repo, rev_).rev() == nullrev): |
5173 raise error.Abort(_("cannot tag null revision")) |
5174 raise error.Abort(_("cannot tag null revision")) |
5174 |
5175 |
5175 repo.tag(names, r, message, opts.get('local'), opts.get('user'), date, |
5176 tagsmod.tag(repo, names, r, message, opts.get('local'), |
5176 editor=editor) |
5177 opts.get('user'), date, editor=editor) |
5177 finally: |
5178 finally: |
5178 release(lock, wlock) |
5179 release(lock, wlock) |
5179 |
5180 |
5180 @command('tags', formatteropts, '') |
5181 @command('tags', formatteropts, '') |
5181 def tags(ui, repo, **opts): |
5182 def tags(ui, repo, **opts): |