Mercurial > hg > mercurial-source
diff mercurial/commands.py @ 17261: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 |
line wrap: on
line diff
--- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -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)