tests/test-import.t
changeset 26631 e077ce385609
parent 26562 dd2f5e014806
child 26750 9f9ec4abe700
equal deleted inserted replaced
26630:3111b45a2bbf 26631:e077ce385609
   426   $ hg --cwd b rollback
   426   $ hg --cwd b rollback
   427   repository tip rolled back to revision 0 (undo import)
   427   repository tip rolled back to revision 0 (undo import)
   428   working directory now based on revision 0
   428   working directory now based on revision 0
   429   $ hg --cwd b parents --template 'parent: {rev}\n'
   429   $ hg --cwd b parents --template 'parent: {rev}\n'
   430   parent: 0
   430   parent: 0
       
   431 
       
   432 Test that "hg rollback" doesn't restore dirstate to one at the
       
   433 beginning of the rollbacked transaction in not-"parent-gone" case.
       
   434 
       
   435 invoking pretxncommit hook will cause marking '.hg/dirstate' as a file
       
   436 to be restored at rollbacking, after DirstateTransactionPlan (see wiki
       
   437 page for detail).
       
   438 
       
   439   $ hg --cwd b branch -q foobar
       
   440   $ hg --cwd b commit -m foobar
       
   441   $ hg --cwd b update 0 -q
       
   442   $ hg --cwd b import ../patch1 ../patch2 --config hooks.pretxncommit=true
       
   443   applying ../patch1
       
   444   applying ../patch2
       
   445   $ hg --cwd b update -q 1
       
   446   $ hg --cwd b rollback -q
       
   447   $ hg --cwd b parents --template 'parent: {rev}\n'
       
   448   parent: 1
       
   449 
   431   $ rm -r b
   450   $ rm -r b
   432 
   451 
   433 
   452 
   434 importing a patch in a subdirectory failed at the commit stage
   453 importing a patch in a subdirectory failed at the commit stage
   435 
   454