diff tests/test-absorb-edit-lines.t @ 40190:31dfa7dac4c9

absorb: prompt user to accept absorb changes by default Change the default absorb behaviour to print the changes out and then prompt the user if they want to absorb the changes or not. Providing the `-p` option still prints the result and exits. A new `-a` option is provided which applies the changes without printing them, giving the equivalent of the old behaviour. Differential Revision: https://phab.mercurial-scm.org/D4999
author Mark Thomas <mbthomas@fb.com>
date Fri, 12 Oct 2018 17:48:40 +0000
parents 5111d11b8719
children 3cd57e2be49b
line wrap: on
line diff
--- a/tests/test-absorb-edit-lines.t	Fri Oct 12 15:46:52 2018 +0000
+++ b/tests/test-absorb-edit-lines.t	Fri Oct 12 17:48:40 2018 +0000
@@ -15,10 +15,10 @@
 
 absorb --edit-lines will run the editor if filename is provided:
 
-  $ hg absorb --edit-lines
+  $ hg absorb --edit-lines --apply-changes
   nothing applied
   [1]
-  $ HGEDITOR=cat hg absorb --edit-lines a
+  $ HGEDITOR=cat hg absorb --edit-lines --apply-changes a
   HG: editing a
   HG: "y" means the line to the right exists in the changeset to the top
   HG:
@@ -43,7 +43,7 @@
   >     y   : f
   >     yyy : g
   > EOF
-  $ HGEDITOR='cat editortext >' hg absorb -q --edit-lines a
+  $ HGEDITOR='cat editortext >' hg absorb -q --edit-lines --apply-changes a
   $ hg cat -r 0 a
   d  
   e