branch | stable |
changeset 17260 | e432fb4b4221 |
parent 17255 | 3e856d8abe9c |
child 17264 | ec7b9bec19c9 |
--- a/mercurial/commands.py Thu Jul 26 13:58:43 2012 +0900 +++ b/mercurial/commands.py Tue Jun 05 17:00:13 2012 -0700 @@ -5643,6 +5643,11 @@ if opts.get('edit'): message = ui.edit(message, ui.username()) + # don't allow tagging the null rev + if (not opts.get('remove') and + scmutil.revsingle(repo, rev_).rev() == nullrev): + raise util.Abort(_("null revision specified")) + repo.tag(names, r, message, opts.get('local'), opts.get('user'), date) finally: release(lock, wlock)