Show More
@@ -39,6 +39,7 b' command = cmdutil.command(cmdtable)' | |||
|
39 | 39 | ('', 'collapse', False, _('collapse the rebased changesets')), |
|
40 | 40 | ('m', 'message', '', |
|
41 | 41 | _('use text as collapse commit message'), _('TEXT')), |
|
42 | ('e', 'edit', False, _('invoke editor on commit messages')), | |
|
42 | 43 | ('l', 'logfile', '', |
|
43 | 44 | _('read collapse commit message from file'), _('FILE')), |
|
44 | 45 | ('', 'keep', False, _('keep original changesets')), |
@@ -105,6 +106,10 b' def rebase(ui, repo, **opts):' | |||
|
105 | 106 | skipped = set() |
|
106 | 107 | targetancestors = set() |
|
107 | 108 | |
|
109 | editor = None | |
|
110 | if opts.get('edit'): | |
|
111 | editor = cmdutil.commitforceeditor | |
|
112 | ||
|
108 | 113 | lock = wlock = None |
|
109 | 114 | try: |
|
110 | 115 | lock = repo.lock() |
@@ -217,7 +222,8 b' def rebase(ui, repo, **opts):' | |||
|
217 | 222 | ui.setconfig('ui', 'forcemerge', '') |
|
218 | 223 | cmdutil.duplicatecopies(repo, rev, target, p2) |
|
219 | 224 | if not collapsef: |
|
220 |
newrev = concludenode(repo, rev, p1, p2, extrafn=extrafn |
|
|
225 | newrev = concludenode(repo, rev, p1, p2, extrafn=extrafn, | |
|
226 | editor=editor) | |
|
221 | 227 | else: |
|
222 | 228 | # Skip commit if we are collapsing |
|
223 | 229 | repo.dirstate.setparents(repo[p1].node()) |
@@ -247,7 +253,7 b' def rebase(ui, repo, **opts):' | |||
|
247 | 253 | commitmsg += '\n* %s' % repo[rebased].description() |
|
248 | 254 | commitmsg = ui.edit(commitmsg, repo.ui.username()) |
|
249 | 255 | newrev = concludenode(repo, rev, p1, external, commitmsg=commitmsg, |
|
250 | extrafn=extrafn) | |
|
256 | extrafn=extrafn, editor=editor) | |
|
251 | 257 | |
|
252 | 258 | if 'qtip' in repo.tags(): |
|
253 | 259 | updatemq(repo, state, skipped, **opts) |
@@ -301,7 +307,7 b' def checkexternal(repo, state, targetanc' | |||
|
301 | 307 | external = p.rev() |
|
302 | 308 | return external |
|
303 | 309 | |
|
304 | def concludenode(repo, rev, p1, p2, commitmsg=None, extrafn=None): | |
|
310 | def concludenode(repo, rev, p1, p2, commitmsg=None, editor=None, extrafn=None): | |
|
305 | 311 | 'Commit the changes and store useful information in extra' |
|
306 | 312 | try: |
|
307 | 313 | repo.dirstate.setparents(repo[p1].node(), repo[p2].node()) |
@@ -313,7 +319,7 b' def concludenode(repo, rev, p1, p2, comm' | |||
|
313 | 319 | extrafn(ctx, extra) |
|
314 | 320 | # Commit might fail if unresolved files exist |
|
315 | 321 | newrev = repo.commit(text=commitmsg, user=ctx.user(), |
|
316 | date=ctx.date(), extra=extra) | |
|
322 | date=ctx.date(), extra=extra, editor=editor) | |
|
317 | 323 | repo.dirstate.setbranch(repo[newrev].branch()) |
|
318 | 324 | return newrev |
|
319 | 325 | except util.Abort: |
General Comments 0
You need to be logged in to leave comments.
Login now