comparison mercurial/commands.py @ 17260:e432fb4b4221 stable

tag: don't allow tagging the null revision (issue1915) Also fixed the tests that were doing this and expected it to work
author Brad Hall <bhall@fb.com>
date Tue, 05 Jun 2012 17:00:13 -0700
parents 3e856d8abe9c
children ec7b9bec19c9
comparison
equal deleted inserted replaced
17259:e96ad092fb18 17260:e432fb4b4221
5641 date = util.parsedate(date) 5641 date = util.parsedate(date)
5642 5642
5643 if opts.get('edit'): 5643 if opts.get('edit'):
5644 message = ui.edit(message, ui.username()) 5644 message = ui.edit(message, ui.username())
5645 5645
5646 # don't allow tagging the null rev
5647 if (not opts.get('remove') and
5648 scmutil.revsingle(repo, rev_).rev() == nullrev):
5649 raise util.Abort(_("null revision specified"))
5650
5646 repo.tag(names, r, message, opts.get('local'), opts.get('user'), date) 5651 repo.tag(names, r, message, opts.get('local'), opts.get('user'), date)
5647 finally: 5652 finally:
5648 release(lock, wlock) 5653 release(lock, wlock)
5649 5654
5650 @command('tags', [], '') 5655 @command('tags', [], '')