diff mercurial/commands.py @ 11185:6d7cf82453be

tag: add -e/--edit option for modifying the commit message
author Steve Losh <steve@stevelosh.com>
date Sat, 15 May 2010 23:33:22 -0400
parents 6e65b451b62e
children 687c7d395f20
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Jan 07 22:19:05 2010 -0600
+++ b/mercurial/commands.py	Sat May 15 23:33:22 2010 -0400
@@ -3394,6 +3394,9 @@
     if date:
         date = util.parsedate(date)
 
+    if opts.get('edit'):
+        message = ui.edit(message, ui.username())
+
     repo.tag(names, r, message, opts.get('local'), opts.get('user'), date)
 
 def tags(ui, repo):
@@ -4038,6 +4041,7 @@
           ('r', 'rev', '', _('revision to tag')),
           ('', 'remove', None, _('remove a tag')),
           # -l/--local is already there, commitopts cannot be used
+          ('e', 'edit', None, _('edit commit message')),
           ('m', 'message', '', _('use <text> as commit message')),
          ] + commitopts2,
          _('[-f] [-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME...')),