Show More
@@ -1045,6 +1045,10 b' def absorb(ui, repo, stack=None, targetc' | |||
|
1045 | 1045 | origchunks = patch.parsepatch(diff) |
|
1046 | 1046 | chunks = cmdutil.recordfilter(ui, origchunks, matcher)[0] |
|
1047 | 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 | 1052 | fm = None |
|
1049 | 1053 | if opts.get(b'print_changes') or not opts.get(b'apply_changes'): |
|
1050 | 1054 | fm = ui.formatter(b'absorb', opts) |
@@ -15,10 +15,10 b' Make some commits:' | |||
|
15 | 15 | |
|
16 | 16 | absorb --edit-lines will run the editor if filename is provided: |
|
17 | 17 | |
|
18 |
$ hg absorb --edit-lines |
|
|
18 | $ hg absorb --edit-lines | |
|
19 | 19 | nothing applied |
|
20 | 20 | [1] |
|
21 |
$ HGEDITOR=cat hg absorb --edit-lines |
|
|
21 | $ HGEDITOR=cat hg absorb --edit-lines a | |
|
22 | 22 | HG: editing a |
|
23 | 23 | HG: "y" means the line to the right exists in the changeset to the top |
|
24 | 24 | HG: |
@@ -43,7 +43,7 b' Edit the file using --edit-lines:' | |||
|
43 | 43 | > y : f |
|
44 | 44 | > yyy : g |
|
45 | 45 | > EOF |
|
46 |
$ HGEDITOR='cat editortext >' hg absorb -q --edit-lines |
|
|
46 | $ HGEDITOR='cat editortext >' hg absorb -q --edit-lines a | |
|
47 | 47 | $ hg cat -r 0 a |
|
48 | 48 | d |
|
49 | 49 | e |
General Comments 0
You need to be logged in to leave comments.
Login now