diff tests/test-histedit-drop.t @ 27414:6602a7b9deec

histedit: delete to drop The default behaviour to forbid this makes a lot of sense for novice users because it's safeguarding them from dangerous behavior but making it configurable will be apprieciated by power users in at least one big organization. It allows an user to look an histedit rules from declarative perspective and make the rules reflect the state after histedit. If we can move lines t move commits why can't we drop lines to drop commits? Let's put this behind config knob and inform users about this feature the very moment they are trying to use it so they can choose desired behaviour.
author Mateusz Kwapich <mitrandir@fb.com>
date Tue, 15 Dec 2015 13:27:09 -0800
parents 11be6b7f95da
children a67d2e059a51
line wrap: on
line diff
--- a/tests/test-histedit-drop.t	Wed Dec 16 12:33:54 2015 +0100
+++ b/tests/test-histedit-drop.t	Tue Dec 15 13:27:09 2015 -0800
@@ -148,4 +148,26 @@
      summary:     a
   
 
-  $ cd ..
+  $ hg histedit cb9a9f314b8b --commands - 2>&1 << EOF | fixbundle
+  > pick cb9a9f314b8b a
+  > pick ee283cb5f2d5 e
+  > EOF
+  abort: missing rules for changeset a4f7421b80f7
+  (use "drop a4f7421b80f7" to discard, see also: "hg help -e histedit.config")
+  $ hg --config histedit.dropmissing=True histedit  cb9a9f314b8b --commands - 2>&1 << EOF | fixbundle
+  > pick cb9a9f314b8b a
+  > pick ee283cb5f2d5 e
+  > EOF
+  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
+  $ hg log --graph
+  @  changeset:   1:e99c679bf03e
+  |  tag:         tip
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     e
+  |
+  o  changeset:   0:cb9a9f314b8b
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     a
+