hgext/evolve.py
changeset 1299 765286e47619
parent 1295 1ac05eef72ca
parent 1296 23819e1d61fd
child 1300 4a27123e0696
--- a/hgext/evolve.py	Wed Apr 29 14:48:41 2015 -0700
+++ b/hgext/evolve.py	Wed Apr 29 14:49:02 2015 -0700
@@ -88,7 +88,12 @@
 else:
     raise ImportError('evolve needs version %s or above' % min(testedwith.split()))
 
-
+aliases, entry = cmdutil.findcmd('commit', commands.table)
+hasinteractivemode = util.any(['interactive' in e for e in entry[1]])
+if hasinteractivemode:
+    interactiveopt = [['i', 'interactive', None, _('use interactive mode')]]
+else:
+    interactiveopt = []
 # This extension contains the following code
 #
 # - Extension Helper code
@@ -1904,7 +1909,7 @@
     ('', 'close-branch', None,
      _('mark a branch as closed, hiding it from the branch list')),
     ('s', 'secret', None, _('use the secret phase for committing')),
-    ] + walkopts + commitopts + commitopts2 + commitopts3,
+    ] + walkopts + commitopts + commitopts2 + commitopts3 + interactiveopt,
     _('[OPTION]... [FILE]...'))
 def amend(ui, repo, *pats, **opts):
     """combine a changeset with updates and replace it with a new one