--- a/mercurial/commands.py Wed Oct 12 18:45:36 2011 -0500
+++ b/mercurial/commands.py Wed Oct 12 18:46:03 2011 -0500
@@ -2448,7 +2448,7 @@
return errs
@command('graft',
- [],
+ [('e', 'edit', False, _('invoke editor on commit messages'))],
_('[OPTION]... REVISION...'))
def graft(ui, repo, rev, *revs, **opts):
'''copy changes from other branches onto the current branch
@@ -2466,6 +2466,10 @@
cmdutil.bailifchanged(repo)
+ editor = None
+ if opts.get('edit'):
+ editor = cmdutil.commitforceeditor
+
revs = [rev] + list(revs)
revs = scmutil.revrange(repo, revs)
@@ -2512,7 +2516,7 @@
# commit
extra = {'source': ctx.hex()}
repo.commit(text=ctx.description(), user=ctx.user(),
- date=ctx.date(), extra=extra)
+ date=ctx.date(), extra=extra, editor=editor)
return 0