tests/test-journal-exists.t
changeset 12205 b4d0d646b3f7
parent 9693 c40a1ee20aa5
child 12316 4134686b83e1
equal deleted inserted replaced
12204:c55d69c5fb77 12205:b4d0d646b3f7
       
     1   $ hg init
       
     2   $ echo a > a
       
     3   $ hg ci -Am0
       
     4   adding a
       
     5 
       
     6   $ hg -q clone . foo
       
     7 
       
     8   $ touch .hg/store/journal
       
     9 
       
    10   $ echo foo > a
       
    11   $ hg ci -Am0
       
    12   abort: abandoned transaction found - run hg recover!
       
    13 
       
    14   $ hg recover
       
    15   rolling back interrupted transaction
       
    16   checking changesets
       
    17   checking manifests
       
    18   crosschecking files in changesets and manifests
       
    19   checking files
       
    20   1 files, 1 changesets, 1 total revisions
       
    21 
       
    22 Check that zero-size journals are correctly aborted:
       
    23 
       
    24   $ hg bundle -qa repo.hg
       
    25   $ chmod -w foo/.hg/store/00changelog.i
       
    26 
       
    27   $ hg -R foo unbundle repo.hg
       
    28   adding changesets
       
    29   abort: Permission denied: .*
       
    30 
       
    31   $ if test -f foo/.hg/store/journal; then echo 'journal exists :-('; fi
       
    32 
       
    33   $ exit 0
       
    34