changeset 33124:22ab466480ea stable

rebase: also test abort from pretxnclose error Different hooks will have different properties so we cover more hooks to catch further regressions.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 27 Jun 2017 18:13:10 +0200
parents e7faa4a14d5d
children 40ee74bfa111 e9d325cfe071
files tests/test-rebase-interruptions.t
diffstat 1 files changed, 50 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-rebase-interruptions.t	Tue Jun 27 18:10:55 2017 +0200
+++ b/tests/test-rebase-interruptions.t	Tue Jun 27 18:13:10 2017 +0200
@@ -379,3 +379,53 @@
   o  0:public 'A'
   
   $ cd ..
+
+(pretxnclose version)
+
+  $ cp -R a3 hook-pretxnclose
+  $ cd hook-pretxnclose
+  $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.pretxnclose=hg log -r tip | grep "summary:     C"'
+  rebasing 2:965c486023db "C"
+  summary:     C
+  rebasing 6:a0b2430ebfb8 "F" (tip)
+  transaction abort!
+  rollback completed
+  abort: pretxnclose hook exited with status 1
+  [255]
+  $ hg tglogp
+  @  7:secret 'C'
+  |
+  | @  6:secret 'F'
+  | |
+  o |  5:public 'B'
+  | |
+  o |  4:public 'E'
+  | |
+  o |  3:public 'D'
+  | |
+  | o  2:secret 'C'
+  | |
+  | o  1:public 'B'
+  |/
+  o  0:public 'A'
+  
+  $ hg rebase --continue
+  already rebased 2:965c486023db "C" as 401ccec5e39f
+  rebasing 6:a0b2430ebfb8 "F"
+  saved backup bundle to $TESTTMP/hook-pretxnclose/.hg/strip-backup/965c486023db-aa6250e7-backup.hg (glob)
+  $ hg tglogp
+  @  6:secret 'F'
+  |
+  o  5:secret 'C'
+  |
+  o  4:public 'B'
+  |
+  o  3:public 'E'
+  |
+  o  2:public 'D'
+  |
+  | o  1:public 'B'
+  |/
+  o  0:public 'A'
+  
+  $ cd ..