changeset 4650:15e22b483adc

tag: abort when trying to remove nonexistent tags
author TK Soh <teekaysoh@yahoo.com>
date Fri, 15 Jun 2007 14:48:21 -0500
parents 52259d5fb76d
children 7176f278d6f9
files mercurial/commands.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Jun 20 17:53:11 2007 -0700
+++ b/mercurial/commands.py	Fri Jun 15 14:48:21 2007 -0500
@@ -2515,6 +2515,8 @@
         rev_ = opts['rev']
     message = opts['message']
     if opts['remove']:
+        if not name in repo.tags(): 
+            raise util.Abort(_('tag %s does not exist') % name)
         rev_ = nullid
         if not message:
             message = _('Removed tag %s') % name