tests/test-transaction-rollback-on-revlog-split.t
branchstable
changeset 48355 ccd9cb73125c
parent 48354 f38ae2d7390e
child 50311 e2ba2234bf1c
equal deleted inserted replaced
48354:f38ae2d7390e 48355:ccd9cb73125c
    61   $ hg pull ../troffset-computation
    61   $ hg pull ../troffset-computation
    62   pulling from ../troffset-computation
    62   pulling from ../troffset-computation
    63   [80]
    63   [80]
    64 #endif
    64 #endif
    65   $ cat .hg/store/journal | tr -s '\000' ' ' | grep data/file | tail -1
    65   $ cat .hg/store/journal | tr -s '\000' ' ' | grep data/file | tail -1
    66   data/file.i 192
    66   data/file.i 128
    67 
    67 
    68 The first file.i entry should match the "Reference size" above.
    68 The first file.i entry should match the "Reference size" above.
    69 The first file.d entry is the temporary record during the split,
    69 The first file.d entry is the temporary record during the split,
    70 the second entry after the split happened. The sum of the second file.d
    70 the second entry after the split happened. The sum of the second file.d
    71 and the second file.i entry should match the first file.i entry.
    71 and the second file.i entry should match the first file.i entry.
    72 
    72 
    73   $ cat .hg/store/journal | tr -s '\000' ' ' | grep data/file
    73   $ cat .hg/store/journal | tr -s '\000' ' ' | grep data/file
    74   data/file.i 1174
    74   data/file.i 1174
    75   data/file.d 0
    75   data/file.d 0
    76   data/file.d 1067
    76   data/file.d 1046
    77   data/file.i 192
    77   data/file.i 128
    78   $ hg recover
    78   $ hg recover
    79   rolling back interrupted transaction
    79   rolling back interrupted transaction
    80   (verify step skipped, run `hg verify` to check your repository content)
    80   (verify step skipped, run `hg verify` to check your repository content)
    81   $ f -s .hg/store/data/file*
    81   $ f -s .hg/store/data/file*
    82   .hg/store/data/file.d: size=1067
    82   .hg/store/data/file.d: size=1046
    83   .hg/store/data/file.i: size=192
    83   .hg/store/data/file.i: size=128
    84   $ hg tip
    84   $ hg tip
    85   changeset:   1:cfa8d6e60429
    85   changeset:   1:cfa8d6e60429
    86   tag:         tip
    86   tag:         tip
    87   user:        test
    87   user:        test
    88   date:        Thu Jan 01 00:00:00 1970 +0000
    88   date:        Thu Jan 01 00:00:00 1970 +0000
    89   summary:     b
    89   summary:     b
    90   
    90   
    91   $ hg verify -q
    91   $ hg verify -q
    92    warning: revlog 'data/file.d' not in fncache!
    92    warning: revlog 'data/file.d' not in fncache!
    93    file@?: rev 2 points to nonexistent changeset 2
    93   1 warnings encountered!
    94    (expected )
       
    95    file@?: fa1120531cc1 not in manifests
       
    96   2 warnings encountered!
       
    97   hint: run "hg debugrebuildfncache" to recover from corrupt fncache
    94   hint: run "hg debugrebuildfncache" to recover from corrupt fncache
    98   2 integrity errors encountered!
       
    99   [1]
       
   100   $ hg debugrebuildfncache --only-data
    95   $ hg debugrebuildfncache --only-data
   101   adding data/file.d
    96   adding data/file.d
   102   1 items added, 0 removed from fncache
    97   1 items added, 0 removed from fncache
   103   $ hg verify -q
    98   $ hg verify -q
   104    file@?: rev 2 points to nonexistent changeset 2
       
   105    (expected )
       
   106    file@?: fa1120531cc1 not in manifests
       
   107   1 warnings encountered!
       
   108   2 integrity errors encountered!
       
   109   [1]
       
   110   $ cd ..
    99   $ cd ..
   111 
   100 
   112 
   101 
   113 Now retry the procedure but intercept the rename of the index and check that
   102 Now retry the procedure but intercept the rename of the index and check that
   114 the journal does not contain the new index size. This demonstrates the edge case
   103 the journal does not contain the new index size. This demonstrates the edge case
   132   [80]
   121   [80]
   133 #endif
   122 #endif
   134   $ cat .hg/store/journal | tr -s '\000' ' ' | grep data/file
   123   $ cat .hg/store/journal | tr -s '\000' ' ' | grep data/file
   135   data/file.i 1174
   124   data/file.i 1174
   136   data/file.d 0
   125   data/file.d 0
   137   data/file.d 1067
   126   data/file.d 1046
   138 
   127 
   139   $ hg recover
   128   $ hg recover
   140   rolling back interrupted transaction
   129   rolling back interrupted transaction
   141   (verify step skipped, run `hg verify` to check your repository content)
   130   (verify step skipped, run `hg verify` to check your repository content)
   142   $ f -s .hg/store/data/file*
   131   $ f -s .hg/store/data/file*
   143   .hg/store/data/file.d: size=1067
   132   .hg/store/data/file.d: size=1046
   144   .hg/store/data/file.i: size=1174
   133   .hg/store/data/file.i: size=1174
   145   $ hg tip
   134   $ hg tip
   146   changeset:   1:cfa8d6e60429
   135   changeset:   1:cfa8d6e60429
   147   tag:         tip
   136   tag:         tip
   148   user:        test
   137   user:        test
   170   transaction abort!
   159   transaction abort!
   171   rollback completed
   160   rollback completed
   172   abort: pretxnchangegroup hook exited with status 1
   161   abort: pretxnchangegroup hook exited with status 1
   173   [40]
   162   [40]
   174   $ f -s .hg/store/data/file*
   163   $ f -s .hg/store/data/file*
   175   .hg/store/data/file.d: size=1067
   164   .hg/store/data/file.d: size=1046
   176   .hg/store/data/file.i: size=192
   165   .hg/store/data/file.i: size=128
   177   $ hg tip
   166   $ hg tip
   178   changeset:   1:cfa8d6e60429
   167   changeset:   1:cfa8d6e60429
   179   tag:         tip
   168   tag:         tip
   180   user:        test
   169   user:        test
   181   date:        Thu Jan 01 00:00:00 1970 +0000
   170   date:        Thu Jan 01 00:00:00 1970 +0000
   182   summary:     b
   171   summary:     b
   183   
   172   
   184   $ hg verify -q
   173   $ hg verify -q
   185    warning: revlog 'data/file.d' not in fncache!
   174    warning: revlog 'data/file.d' not in fncache!
   186    file@?: rev 2 points to nonexistent changeset 2
   175   1 warnings encountered!
   187    (expected )
       
   188    file@?: fa1120531cc1 not in manifests
       
   189   2 warnings encountered!
       
   190   hint: run "hg debugrebuildfncache" to recover from corrupt fncache
   176   hint: run "hg debugrebuildfncache" to recover from corrupt fncache
   191   2 integrity errors encountered!
       
   192   [1]
       
   193   $ cd ..
   177   $ cd ..
   194 
   178