tests/test-issue6528.t
changeset 50486 85c5b4b507af
parent 49489 58e38c1a2370
child 51181 dcaa2df1f688
equal deleted inserted replaced
50485:5805b8b25426 50486:85c5b4b507af
   199        0       6 2a8d3833f2fb 000000000000 000000000000
   199        0       6 2a8d3833f2fb 000000000000 000000000000
   200        1       7 2a80419dfc31 2a8d3833f2fb 000000000000
   200        1       7 2a80419dfc31 2a8d3833f2fb 000000000000
   201 
   201 
   202 Dry-run the fix
   202 Dry-run the fix
   203   $ hg debug-repair-issue6528 --dry-run
   203   $ hg debug-repair-issue6528 --dry-run
   204   found affected revision 1 for filelog 'data/D.txt.i'
   204   found affected revision 1 for file 'D.txt'
   205   found affected revision 1 for filelog 'data/b.txt.i'
   205   found affected revision 1 for file 'b.txt'
   206   found affected revision 3 for filelog 'data/b.txt.i'
   206   found affected revision 3 for file 'b.txt'
   207   $ hg st
   207   $ hg st
   208   M D.txt
   208   M D.txt
   209   M b.txt
   209   M b.txt
   210   $ hg debugrevlogindex b.txt
   210   $ hg debugrevlogindex b.txt
   211      rev linkrev nodeid       p1           p2
   211      rev linkrev nodeid       p1           p2
   218        0       6 2a8d3833f2fb 000000000000 000000000000
   218        0       6 2a8d3833f2fb 000000000000 000000000000
   219        1       7 2a80419dfc31 2a8d3833f2fb 000000000000
   219        1       7 2a80419dfc31 2a8d3833f2fb 000000000000
   220 
   220 
   221 Test the --paranoid option
   221 Test the --paranoid option
   222   $ hg debug-repair-issue6528 --dry-run --paranoid
   222   $ hg debug-repair-issue6528 --dry-run --paranoid
   223   found affected revision 1 for filelog 'data/D.txt.i'
   223   found affected revision 1 for file 'D.txt'
   224   found affected revision 1 for filelog 'data/b.txt.i'
   224   found affected revision 1 for file 'b.txt'
   225   found affected revision 3 for filelog 'data/b.txt.i'
   225   found affected revision 3 for file 'b.txt'
   226   $ hg st
   226   $ hg st
   227   M D.txt
   227   M D.txt
   228   M b.txt
   228   M b.txt
   229   $ hg debugrevlogindex b.txt
   229   $ hg debugrevlogindex b.txt
   230      rev linkrev nodeid       p1           p2
   230      rev linkrev nodeid       p1           p2
   237        0       6 2a8d3833f2fb 000000000000 000000000000
   237        0       6 2a8d3833f2fb 000000000000 000000000000
   238        1       7 2a80419dfc31 2a8d3833f2fb 000000000000
   238        1       7 2a80419dfc31 2a8d3833f2fb 000000000000
   239 
   239 
   240 Run the fix
   240 Run the fix
   241   $ hg debug-repair-issue6528
   241   $ hg debug-repair-issue6528
   242   found affected revision 1 for filelog 'data/D.txt.i'
   242   found affected revision 1 for file 'D.txt'
   243   repaired revision 1 of 'filelog data/D.txt.i'
   243   repaired revision 1 of 'filelog data/D.txt.i'
   244   found affected revision 1 for filelog 'data/b.txt.i'
   244   found affected revision 1 for file 'b.txt'
   245   found affected revision 3 for filelog 'data/b.txt.i'
   245   found affected revision 3 for file 'b.txt'
   246   repaired revision 1 of 'filelog data/b.txt.i'
   246   repaired revision 1 of 'filelog data/b.txt.i'
   247   repaired revision 3 of 'filelog data/b.txt.i'
   247   repaired revision 3 of 'filelog data/b.txt.i'
   248 
   248 
   249 Check that the fix worked and that running it twice does nothing
   249 Check that the fix worked and that running it twice does nothing
   250   $ hg st
   250   $ hg st
   279   $ mkdir repo-to-fix-report
   279   $ mkdir repo-to-fix-report
   280   $ cd repo-to-fix
   280   $ cd repo-to-fix
   281   $ tar -xf - < "$TESTDIR"/bundles/issue6528.tar
   281   $ tar -xf - < "$TESTDIR"/bundles/issue6528.tar
   282 
   282 
   283   $ hg debug-repair-issue6528 --to-report $TESTTMP/report.txt
   283   $ hg debug-repair-issue6528 --to-report $TESTTMP/report.txt
   284   found affected revision 1 for filelog 'data/D.txt.i'
   284   found affected revision 1 for file 'D.txt'
   285   found affected revision 1 for filelog 'data/b.txt.i'
   285   found affected revision 1 for file 'b.txt'
   286   found affected revision 3 for filelog 'data/b.txt.i'
   286   found affected revision 3 for file 'b.txt'
   287   $ cat $TESTTMP/report.txt
   287   $ cat $TESTTMP/report.txt
   288   2a80419dfc31d7dfb308ac40f3f138282de7d73b D.txt
   288   2a80419dfc31d7dfb308ac40f3f138282de7d73b D.txt
   289   a58b36ad6b6545195952793099613c2116f3563b,ea4f2f2463cca5b29ddf3461012b8ce5c6dac175 b.txt
   289   a58b36ad6b6545195952793099613c2116f3563b,ea4f2f2463cca5b29ddf3461012b8ce5c6dac175 b.txt
   290 
   290 
   291   $ hg debug-repair-issue6528 --from-report $TESTTMP/report.txt --dry-run
   291   $ hg debug-repair-issue6528 --from-report $TESTTMP/report.txt --dry-run
   390        1       7 2a80419dfc31 2a8d3833f2fb 000000000000
   390        1       7 2a80419dfc31 2a8d3833f2fb 000000000000
   391        2       8 65aecc89bb5d 2a80419dfc31 000000000000
   391        2       8 65aecc89bb5d 2a80419dfc31 000000000000
   392 
   392 
   393 Run the fix on the non-inline revlog
   393 Run the fix on the non-inline revlog
   394   $ hg debug-repair-issue6528
   394   $ hg debug-repair-issue6528
   395   found affected revision 1 for filelog 'data/D.txt.i'
   395   found affected revision 1 for file 'D.txt'
   396   repaired revision 1 of 'filelog data/D.txt.i'
   396   repaired revision 1 of 'filelog data/D.txt.i'
   397   found affected revision 1 for filelog 'data/b.txt.i'
   397   found affected revision 1 for file 'b.txt'
   398   found affected revision 3 for filelog 'data/b.txt.i'
   398   found affected revision 3 for file 'b.txt'
   399   repaired revision 1 of 'filelog data/b.txt.i'
   399   repaired revision 1 of 'filelog data/b.txt.i'
   400   repaired revision 3 of 'filelog data/b.txt.i'
   400   repaired revision 3 of 'filelog data/b.txt.i'
   401 
   401 
   402 Check that it worked
   402 Check that it worked
   403   $ hg debugrevlogindex b.txt
   403   $ hg debugrevlogindex b.txt
   554   M b.txt (?)
   554   M b.txt (?)
   555 
   555 
   556 And that the repair command find issue to fix.
   556 And that the repair command find issue to fix.
   557 
   557 
   558   $ hg debug-repair-issue6528 --dry-run
   558   $ hg debug-repair-issue6528 --dry-run
   559   found affected revision 1 for filelog 'data/D.txt.i'
   559   found affected revision 1 for file 'D.txt'
   560   found affected revision 1 for filelog 'data/b.txt.i'
   560   found affected revision 1 for file 'b.txt'
   561   found affected revision 3 for filelog 'data/b.txt.i'
   561   found affected revision 3 for file 'b.txt'
   562 
   562 
   563   $ cd ..
   563   $ cd ..
   564 
   564 
   565 from a v2 bundle
   565 from a v2 bundle
   566 ~~~~~~~~~~~~~~~~
   566 ~~~~~~~~~~~~~~~~
   602   M b.txt (?)
   602   M b.txt (?)
   603 
   603 
   604 And that the repair command find issue to fix.
   604 And that the repair command find issue to fix.
   605 
   605 
   606   $ hg debug-repair-issue6528 --dry-run
   606   $ hg debug-repair-issue6528 --dry-run
   607   found affected revision 1 for filelog 'data/D.txt.i'
   607   found affected revision 1 for file 'D.txt'
   608   found affected revision 1 for filelog 'data/b.txt.i'
   608   found affected revision 1 for file 'b.txt'
   609   found affected revision 3 for filelog 'data/b.txt.i'
   609   found affected revision 3 for file 'b.txt'
   610 
   610 
   611   $ cd ..
   611   $ cd ..