tests/test-rebase-interruptions.t
changeset 33146 40ee74bfa111
parent 32353 a580b2d65ded
parent 32156 22ab466480ea
child 33175 4b0da963586d
equal deleted inserted replaced
33145:78fc540c53e1 33146:40ee74bfa111
   265   |
   265   |
   266   o  3:public 'D'
   266   o  3:public 'D'
   267   |
   267   |
   268   | o  2:secret 'C'
   268   | o  2:secret 'C'
   269   | |
   269   | |
       
   270   | o  1:public 'B'
       
   271   |/
       
   272   o  0:public 'A'
       
   273   
       
   274 Test rebase interrupted by hooks
       
   275 
       
   276   $ hg up 2
       
   277   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
   278   $ echo F > F
       
   279   $ hg add F
       
   280   $ hg ci -m F
       
   281 
       
   282   $ cd ..
       
   283 
       
   284 (precommit version)
       
   285 
       
   286   $ cp -R a3 hook-precommit
       
   287   $ cd hook-precommit
       
   288   $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.precommit=hg status | grep "M A"'
       
   289   rebasing 2:965c486023db "C"
       
   290   M A
       
   291   rebasing 6:a0b2430ebfb8 "F" (tip)
       
   292   abort: precommit hook exited with status 1
       
   293   [255]
       
   294   $ hg tglogp
       
   295   @  7:secret 'C'
       
   296   |
       
   297   | @  6:secret 'F'
       
   298   | |
       
   299   o |  5:public 'B'
       
   300   | |
       
   301   o |  4:public 'E'
       
   302   | |
       
   303   o |  3:public 'D'
       
   304   | |
       
   305   | o  2:secret 'C'
       
   306   | |
       
   307   | o  1:public 'B'
       
   308   |/
       
   309   o  0:public 'A'
       
   310   
       
   311   $ hg rebase --continue
       
   312   already rebased 2:965c486023db "C" as 401ccec5e39f
       
   313   rebasing 6:a0b2430ebfb8 "F"
       
   314   saved backup bundle to $TESTTMP/hook-precommit/.hg/strip-backup/965c486023db-aa6250e7-backup.hg (glob)
       
   315   $ hg tglogp
       
   316   @  6:secret 'F'
       
   317   |
       
   318   o  5:secret 'C'
       
   319   |
       
   320   o  4:public 'B'
       
   321   |
       
   322   o  3:public 'E'
       
   323   |
       
   324   o  2:public 'D'
       
   325   |
       
   326   | o  1:public 'B'
       
   327   |/
       
   328   o  0:public 'A'
       
   329   
       
   330   $ cd ..
       
   331 
       
   332 (pretxncommit version)
       
   333 
       
   334   $ cp -R a3 hook-pretxncommit
       
   335   $ cd hook-pretxncommit
       
   336   $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.pretxncommit=hg log -r $HG_NODE | grep "summary:     C"'
       
   337   rebasing 2:965c486023db "C"
       
   338   summary:     C
       
   339   rebasing 6:a0b2430ebfb8 "F" (tip)
       
   340   transaction abort!
       
   341   rollback completed
       
   342   abort: pretxncommit hook exited with status 1
       
   343   [255]
       
   344   $ hg tglogp
       
   345   @  7:secret 'C'
       
   346   |
       
   347   | @  6:secret 'F'
       
   348   | |
       
   349   o |  5:public 'B'
       
   350   | |
       
   351   o |  4:public 'E'
       
   352   | |
       
   353   o |  3:public 'D'
       
   354   | |
       
   355   | o  2:secret 'C'
       
   356   | |
       
   357   | o  1:public 'B'
       
   358   |/
       
   359   o  0:public 'A'
       
   360   
       
   361   $ hg rebase --continue
       
   362   already rebased 2:965c486023db "C" as 401ccec5e39f
       
   363   rebasing 6:a0b2430ebfb8 "F"
       
   364   saved backup bundle to $TESTTMP/hook-pretxncommit/.hg/strip-backup/965c486023db-aa6250e7-backup.hg (glob)
       
   365   $ hg tglogp
       
   366   @  6:secret 'F'
       
   367   |
       
   368   o  5:secret 'C'
       
   369   |
       
   370   o  4:public 'B'
       
   371   |
       
   372   o  3:public 'E'
       
   373   |
       
   374   o  2:public 'D'
       
   375   |
       
   376   | o  1:public 'B'
       
   377   |/
       
   378   o  0:public 'A'
       
   379   
       
   380   $ cd ..
       
   381 
       
   382 (pretxnclose version)
       
   383 
       
   384   $ cp -R a3 hook-pretxnclose
       
   385   $ cd hook-pretxnclose
       
   386   $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.pretxnclose=hg log -r tip | grep "summary:     C"'
       
   387   rebasing 2:965c486023db "C"
       
   388   summary:     C
       
   389   rebasing 6:a0b2430ebfb8 "F" (tip)
       
   390   transaction abort!
       
   391   rollback completed
       
   392   abort: pretxnclose hook exited with status 1
       
   393   [255]
       
   394   $ hg tglogp
       
   395   @  7:secret 'C'
       
   396   |
       
   397   | @  6:secret 'F'
       
   398   | |
       
   399   o |  5:public 'B'
       
   400   | |
       
   401   o |  4:public 'E'
       
   402   | |
       
   403   o |  3:public 'D'
       
   404   | |
       
   405   | o  2:secret 'C'
       
   406   | |
       
   407   | o  1:public 'B'
       
   408   |/
       
   409   o  0:public 'A'
       
   410   
       
   411   $ hg rebase --continue
       
   412   already rebased 2:965c486023db "C" as 401ccec5e39f
       
   413   rebasing 6:a0b2430ebfb8 "F"
       
   414   saved backup bundle to $TESTTMP/hook-pretxnclose/.hg/strip-backup/965c486023db-aa6250e7-backup.hg (glob)
       
   415   $ hg tglogp
       
   416   @  6:secret 'F'
       
   417   |
       
   418   o  5:secret 'C'
       
   419   |
       
   420   o  4:public 'B'
       
   421   |
       
   422   o  3:public 'E'
       
   423   |
       
   424   o  2:public 'D'
       
   425   |
   270   | o  1:public 'B'
   426   | o  1:public 'B'
   271   |/
   427   |/
   272   o  0:public 'A'
   428   o  0:public 'A'
   273   
   429   
   274   $ cd ..
   430   $ cd ..
   300   note: rebase of 1:fdaca8533b86 created no changes to commit
   456   note: rebase of 1:fdaca8533b86 created no changes to commit
   301   saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fdaca8533b86-7fd70513-backup.hg (glob)
   457   saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fdaca8533b86-7fd70513-backup.hg (glob)
   302   $ hg resolve --list
   458   $ hg resolve --list
   303   $ test -f .hg/merge
   459   $ test -f .hg/merge
   304   [1]
   460   [1]
   305