mercurial/commands.py
changeset 21021 422981492ace
parent 21011 2db41f95c4a2
child 21032 67b6f1144e90
--- a/mercurial/commands.py	Sat Apr 12 00:38:15 2014 -0400
+++ b/mercurial/commands.py	Sun Sep 08 19:02:08 2013 -0400
@@ -1324,6 +1324,8 @@
      _('mark a branch as closed, hiding it from the branch list')),
     ('', 'amend', None, _('amend the parent of the working dir')),
     ('s', 'secret', None, _('use the secret phase for committing')),
+    ('e', 'edit', None,
+     _('further edit commit message already specified')),
     ] + walkopts + commitopts + commitopts2 + subrepoopts,
     _('[OPTION]... [FILE]...'))
 def commit(ui, repo, *pats, **opts):
@@ -1362,6 +1364,8 @@
 
     Returns 0 on success, 1 if nothing changed.
     """
+    forceeditor = opts.get('force_editor') or opts.get('edit')
+
     if opts.get('subrepos'):
         if opts.get('amend'):
             raise util.Abort(_('cannot amend with --subrepos'))
@@ -1400,7 +1404,7 @@
             raise util.Abort(_('cannot amend changeset with children'))
 
         e = cmdutil.commiteditor
-        if opts.get('force_editor'):
+        if forceeditor:
             e = cmdutil.commitforceeditor
 
         # commitfunc is used only for temporary amend commit by cmdutil.amend
@@ -1435,7 +1439,7 @@
             newmarks.write()
     else:
         e = cmdutil.commiteditor
-        if opts.get('force_editor'):
+        if forceeditor:
             e = cmdutil.commitforceeditor
 
         def commitfunc(ui, repo, message, match, opts):