1043 if opts.get(b'interactive'): |
1043 if opts.get(b'interactive'): |
1044 diff = patch.diff(repo, stack[-1].node(), targetctx.node(), matcher) |
1044 diff = patch.diff(repo, stack[-1].node(), targetctx.node(), matcher) |
1045 origchunks = patch.parsepatch(diff) |
1045 origchunks = patch.parsepatch(diff) |
1046 chunks = cmdutil.recordfilter(ui, origchunks, matcher)[0] |
1046 chunks = cmdutil.recordfilter(ui, origchunks, matcher)[0] |
1047 targetctx = overlaydiffcontext(stack[-1], chunks) |
1047 targetctx = overlaydiffcontext(stack[-1], chunks) |
|
1048 if opts.get(b'edit_lines'): |
|
1049 # If we're going to open the editor, don't ask the user to confirm |
|
1050 # first |
|
1051 opts[b'apply_changes'] = True |
1048 fm = None |
1052 fm = None |
1049 if opts.get(b'print_changes') or not opts.get(b'apply_changes'): |
1053 if opts.get(b'print_changes') or not opts.get(b'apply_changes'): |
1050 fm = ui.formatter(b'absorb', opts) |
1054 fm = ui.formatter(b'absorb', opts) |
1051 state.diffwith(targetctx, matcher, fm) |
1055 state.diffwith(targetctx, matcher, fm) |
1052 if fm is not None: |
1056 if fm is not None: |