Show More
@@ -413,7 +413,7 b' def applychanges(ui, repo, ctx, opts):' | |||||
413 | repo.ui.setconfig('ui', 'forcemerge', '', 'histedit') |
|
413 | repo.ui.setconfig('ui', 'forcemerge', '', 'histedit') | |
414 | return stats |
|
414 | return stats | |
415 |
|
415 | |||
416 | def collapse(repo, first, last, commitopts): |
|
416 | def collapse(repo, first, last, commitopts, skipprompt=False): | |
417 | """collapse the set of revisions from first to last as new one. |
|
417 | """collapse the set of revisions from first to last as new one. | |
418 |
|
418 | |||
419 | Expected commit options are: |
|
419 | Expected commit options are: | |
@@ -474,7 +474,7 b' def collapse(repo, first, last, commitop' | |||||
474 |
|
474 | |||
475 | parents = (first.p1().node(), first.p2().node()) |
|
475 | parents = (first.p1().node(), first.p2().node()) | |
476 | editor = None |
|
476 | editor = None | |
477 | if not commitopts.get('rollup'): |
|
477 | if not skipprompt: | |
478 | editor = cmdutil.getcommiteditor(edit=True, editform='histedit.fold') |
|
478 | editor = cmdutil.getcommiteditor(edit=True, editform='histedit.fold') | |
479 | new = context.memctx(repo, |
|
479 | new = context.memctx(repo, | |
480 | parents=parents, |
|
480 | parents=parents, | |
@@ -575,7 +575,8 b' class fold(histeditaction):' | |||||
575 | try: |
|
575 | try: | |
576 | phasemin = max(ctx.phase(), oldctx.phase()) |
|
576 | phasemin = max(ctx.phase(), oldctx.phase()) | |
577 | repo.ui.setconfig('phases', 'new-commit', phasemin, 'histedit') |
|
577 | repo.ui.setconfig('phases', 'new-commit', phasemin, 'histedit') | |
578 |
n = collapse(repo, ctx, repo[newnode], commitopts |
|
578 | n = collapse(repo, ctx, repo[newnode], commitopts, | |
|
579 | skipprompt=self.skipprompt()) | |||
579 | finally: |
|
580 | finally: | |
580 | repo.ui.restoreconfig(phasebackup) |
|
581 | repo.ui.restoreconfig(phasebackup) | |
581 | if n is None: |
|
582 | if n is None: |
@@ -107,6 +107,8 b' check histedit_source' | |||||
107 |
|
107 | |||
108 | rollup will fold without preserving the folded commit's message |
|
108 | rollup will fold without preserving the folded commit's message | |
109 |
|
109 | |||
|
110 | $ OLDHGEDITOR=$HGEDITOR | |||
|
111 | $ HGEDITOR=false | |||
110 | $ hg histedit d2ae7f538514 --commands - 2>&1 <<EOF | fixbundle |
|
112 | $ hg histedit d2ae7f538514 --commands - 2>&1 <<EOF | fixbundle | |
111 | > pick d2ae7f538514 b |
|
113 | > pick d2ae7f538514 b | |
112 | > roll ee283cb5f2d5 e |
|
114 | > roll ee283cb5f2d5 e | |
@@ -120,6 +122,8 b' rollup will fold without preserving the ' | |||||
120 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
122 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
121 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
123 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
122 |
|
124 | |||
|
125 | $ HGEDITOR=$OLDHGEDITOR | |||
|
126 | ||||
123 | log after edit |
|
127 | log after edit | |
124 | $ hg logt --graph |
|
128 | $ hg logt --graph | |
125 | @ 3:c4a9eb7989fc d |
|
129 | @ 3:c4a9eb7989fc d |
General Comments 0
You need to be logged in to leave comments.
Login now