add a -e option to fold compat-hg2.3
authorDenis Laxalde <denis.laxalde@logilab.fr>
Mon, 26 Nov 2012 11:59:40 +0100
branchcompat-hg2.3
changeset 619 f50f8da7a077
parent 615 148bf61583f4
child 620 232536f5c987
add a -e option to fold
hgext/evolve.py
--- a/hgext/evolve.py	Wed Nov 21 11:03:39 2012 +0100
+++ b/hgext/evolve.py	Mon Nov 26 11:59:40 2012 +0100
@@ -2191,7 +2191,8 @@
         lockmod.release(lock, wlock)
 
 @command('^fold',
-    [('r', 'rev', [], 'revisions to fold'),],
+    [('r', 'rev', [], 'revisions to fold'),
+    ],
     # allow to choose the seed ?
     _('[-r] revs'))
 def fold(ui, repo, *revs, **opts):
@@ -2222,9 +2223,11 @@
             allctx = [repo[r] for r in revs]
             targetphase = max(c.phase() for c in allctx)
             msg = '\n\n***\n\n'.join(c.description() for c in allctx)
+            commitopts = {'message': msg}
+            commitopts['edit'] = True
             newid, _ = rewrite(repo, root, allctx, head,
                              [root.p1().node(), root.p2().node()],
-                             commitopts={'message': msg})
+                             commitopts=commitopts)
             phases.retractboundary(repo, targetphase, [newid])
             createmarkers(repo, [(ctx, (repo[newid],))
                                  for ctx in allctx])