tests/test-verify.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 06 Mar 2024 15:54:22 +0100
changeset 51532 a0ef462cf1a4
parent 51428 def497c75351
child 51615 a93e60ebea09
permissions -rw-r--r--
branchcache: filter obsolete revisions sooner Since we won't do anything with the obsolete revisions, we can just ignore them sooner.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37428
52bb6c1224ae tests: require revlog store for test-verify.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37410
diff changeset
     1
#require reporevlogstore
52bb6c1224ae tests: require revlog store for test-verify.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37410
diff changeset
     2
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
     3
prepare repo
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
     4
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
     5
  $ hg init a
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
     6
  $ cd a
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
     7
  $ echo "some text" > FOO.txt
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
     8
  $ echo "another text" > bar.txt
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
     9
  $ echo "more text" > QUICK.txt
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    10
  $ hg add
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    11
  adding FOO.txt
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    12
  adding QUICK.txt
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    13
  adding bar.txt
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    14
  $ hg ci -mtest1
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    15
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    16
verify
6893
c3368278f86c add test-verify
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    17
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    18
  $ hg verify
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    19
  checking changesets
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    20
  checking manifests
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    21
  crosschecking files in changesets and manifests
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    22
  checking files
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
    23
  checking dirstate
39489
f1186c292d03 verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents: 37428
diff changeset
    24
  checked 1 changesets with 3 changes to 3 files
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    25
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    26
verify with journal
6893
c3368278f86c add test-verify
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    27
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    28
  $ touch .hg/store/journal
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    29
  $ hg verify
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    30
  abandoned transaction found - run hg recover
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    31
  checking changesets
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    32
  checking manifests
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    33
  crosschecking files in changesets and manifests
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    34
  checking files
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
    35
  checking dirstate
39489
f1186c292d03 verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents: 37428
diff changeset
    36
  checked 1 changesets with 3 changes to 3 files
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    37
  $ rm .hg/store/journal
6893
c3368278f86c add test-verify
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    38
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    39
introduce some bugs in repo
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    40
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    41
  $ cd .hg/store/data
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    42
  $ mv _f_o_o.txt.i X_f_o_o.txt.i
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    43
  $ mv bar.txt.i xbar.txt.i
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    44
  $ rm _q_u_i_c_k.txt.i
9690
b33d70849a20 verify: report existence of journal
Sune Foldager <cryo@cyanite.org>
parents: 8720
diff changeset
    45
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    46
  $ hg verify
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    47
  checking changesets
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    48
  checking manifests
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    49
  crosschecking files in changesets and manifests
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    50
  checking files
25627
9573d8f346f1 verify: clarify misleading fncache message
Matt Mackall <mpm@selenic.com>
parents: 25472
diff changeset
    51
   warning: revlog 'data/FOO.txt.i' not in fncache!
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    52
   0: empty or missing FOO.txt
28114
2a03a365f645 verify: use similar language for missing manifest and file revisions
Martin von Zweigbergk <martinvonz@google.com>
parents: 28113
diff changeset
    53
   FOO.txt@0: manifest refers to unknown revision f62022d3d590
25627
9573d8f346f1 verify: clarify misleading fncache message
Matt Mackall <mpm@selenic.com>
parents: 25472
diff changeset
    54
   warning: revlog 'data/QUICK.txt.i' not in fncache!
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    55
   0: empty or missing QUICK.txt
28114
2a03a365f645 verify: use similar language for missing manifest and file revisions
Martin von Zweigbergk <martinvonz@google.com>
parents: 28113
diff changeset
    56
   QUICK.txt@0: manifest refers to unknown revision 88b857db8eba
25627
9573d8f346f1 verify: clarify misleading fncache message
Matt Mackall <mpm@selenic.com>
parents: 25472
diff changeset
    57
   warning: revlog 'data/bar.txt.i' not in fncache!
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    58
   0: empty or missing bar.txt
28114
2a03a365f645 verify: use similar language for missing manifest and file revisions
Martin von Zweigbergk <martinvonz@google.com>
parents: 28113
diff changeset
    59
   bar.txt@0: manifest refers to unknown revision 256559129457
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
    60
  not checking dirstate because of previous errors
39489
f1186c292d03 verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents: 37428
diff changeset
    61
  checked 1 changesets with 0 changes to 3 files
25627
9573d8f346f1 verify: clarify misleading fncache message
Matt Mackall <mpm@selenic.com>
parents: 25472
diff changeset
    62
  3 warnings encountered!
25653
9d1e04f5dca7 verify: print hint to run debugrebuildfncache
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25627
diff changeset
    63
  hint: run "hg debugrebuildfncache" to recover from corrupt fncache
25627
9573d8f346f1 verify: clarify misleading fncache message
Matt Mackall <mpm@selenic.com>
parents: 25472
diff changeset
    64
  6 integrity errors encountered!
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    65
  (first damaged changeset appears to be 0)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12172
diff changeset
    66
  [1]
6893
c3368278f86c add test-verify
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    67
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 12327
diff changeset
    68
  $ cd ../../..
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    69
  $ cd ..
6893
c3368278f86c add test-verify
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    70
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    71
Set up a repo for testing missing revlog entries
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    72
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    73
  $ hg init missing-entries
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    74
  $ cd missing-entries
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    75
  $ echo 0 > file
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    76
  $ hg ci -Aqm0
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
    77
  $ cp -R .hg/store .hg/store-partial
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    78
  $ echo 1 > file
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    79
  $ hg ci -Aqm1
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
    80
  $ cp -R .hg/store .hg/store-full
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    81
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    82
Entire changelog missing
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    83
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    84
  $ rm .hg/store/00changelog.*
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    85
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    86
   0: empty or missing changelog
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    87
   manifest@0: d0b6632564d4 not in changesets
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    88
   manifest@1: 941fc4534185 not in changesets
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
    89
  not checking dirstate because of previous errors
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    90
  3 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    91
  (first damaged changeset appears to be 0)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    92
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
    93
  $ cp -R .hg/store-full/. .hg/store
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    94
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    95
Entire manifest log missing
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    96
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    97
  $ rm .hg/store/00manifest.*
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    98
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    99
   0: empty or missing manifest
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   100
  not checking dirstate because of previous errors
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   101
  1 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   102
  (first damaged changeset appears to be 0)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   103
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   104
  $ cp -R .hg/store-full/. .hg/store
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   105
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   106
Entire filelog missing
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   107
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   108
  $ rm .hg/store/data/file.*
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   109
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   110
   warning: revlog 'data/file.i' not in fncache!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   111
   0: empty or missing file
28114
2a03a365f645 verify: use similar language for missing manifest and file revisions
Martin von Zweigbergk <martinvonz@google.com>
parents: 28113
diff changeset
   112
   file@0: manifest refers to unknown revision 362fef284ce2
2a03a365f645 verify: use similar language for missing manifest and file revisions
Martin von Zweigbergk <martinvonz@google.com>
parents: 28113
diff changeset
   113
   file@1: manifest refers to unknown revision c10f2164107d
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   114
  not checking dirstate because of previous errors
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   115
  1 warnings encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   116
  hint: run "hg debugrebuildfncache" to recover from corrupt fncache
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   117
  3 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   118
  (first damaged changeset appears to be 0)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   119
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   120
  $ cp -R .hg/store-full/. .hg/store
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   121
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   122
Entire changelog and manifest log missing
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   123
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   124
  $ rm .hg/store/00changelog.*
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   125
  $ rm .hg/store/00manifest.*
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   126
  $ hg verify -q
37410
a6651f5e2c78 verify: drop "revlog" from warning message
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32571
diff changeset
   127
  warning: orphan data file 'data/file.i'
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   128
  warning: ignoring unknown working parent c5ddb05ab828!
49827
d09a57ce6fc4 verify: print short `p1` node in relevant dirstate messages
Raphaël Gomès <rgomes@octobus.net>
parents: 49826
diff changeset
   129
  file marked as tracked in p1 (000000000000) but not in manifest1
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   130
  1 warnings encountered!
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   131
  1 integrity errors encountered!
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   132
  dirstate inconsistent with current parent's manifest
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   133
  1 dirstate errors
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   134
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   135
  $ cp -R .hg/store-full/. .hg/store
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   136
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   137
Entire changelog and filelog missing
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   138
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   139
  $ rm .hg/store/00changelog.*
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   140
  $ rm .hg/store/data/file.*
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   141
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   142
   0: empty or missing changelog
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   143
   manifest@0: d0b6632564d4 not in changesets
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   144
   manifest@1: 941fc4534185 not in changesets
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   145
   warning: revlog 'data/file.i' not in fncache!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   146
   ?: empty or missing file
28114
2a03a365f645 verify: use similar language for missing manifest and file revisions
Martin von Zweigbergk <martinvonz@google.com>
parents: 28113
diff changeset
   147
   file@0: manifest refers to unknown revision 362fef284ce2
2a03a365f645 verify: use similar language for missing manifest and file revisions
Martin von Zweigbergk <martinvonz@google.com>
parents: 28113
diff changeset
   148
   file@1: manifest refers to unknown revision c10f2164107d
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   149
  not checking dirstate because of previous errors
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   150
  1 warnings encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   151
  hint: run "hg debugrebuildfncache" to recover from corrupt fncache
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   152
  6 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   153
  (first damaged changeset appears to be 0)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   154
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   155
  $ cp -R .hg/store-full/. .hg/store
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   156
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   157
Entire manifest log and filelog missing
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   158
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   159
  $ rm .hg/store/00manifest.*
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   160
  $ rm .hg/store/data/file.*
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   161
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   162
   0: empty or missing manifest
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   163
   warning: revlog 'data/file.i' not in fncache!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   164
   0: empty or missing file
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   165
  not checking dirstate because of previous errors
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   166
  1 warnings encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   167
  hint: run "hg debugrebuildfncache" to recover from corrupt fncache
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   168
  2 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   169
  (first damaged changeset appears to be 0)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   170
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   171
  $ cp -R .hg/store-full/. .hg/store
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   172
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   173
Changelog missing entry
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   174
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   175
  $ cp -f .hg/store-partial/00changelog.* .hg/store
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   176
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   177
   manifest@?: rev 1 points to nonexistent changeset 1
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   178
   manifest@?: 941fc4534185 not in changesets
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   179
   file@?: rev 1 points to nonexistent changeset 1
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   180
   (expected 0)
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   181
  not checking dirstate because of previous errors
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   182
  1 warnings encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   183
  3 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   184
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   185
  $ cp -R .hg/store-full/. .hg/store
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   186
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   187
Manifest log missing entry
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   188
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   189
  $ cp -f .hg/store-partial/00manifest.* .hg/store
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   190
  $ hg verify -q
28113
d2e0d57824c2 verify: include "manifest" prefix in a few more places
Martin von Zweigbergk <martinvonz@google.com>
parents: 28110
diff changeset
   191
   manifest@1: changeset refers to unknown revision 941fc4534185
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   192
   file@1: c10f2164107d not in manifests
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   193
  not checking dirstate because of previous errors
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   194
  2 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   195
  (first damaged changeset appears to be 1)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   196
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   197
  $ cp -R .hg/store-full/. .hg/store
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   198
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   199
Filelog missing entry
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   200
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   201
  $ cp -f .hg/store-partial/data/file.* .hg/store/data
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   202
  $ hg verify -q
28114
2a03a365f645 verify: use similar language for missing manifest and file revisions
Martin von Zweigbergk <martinvonz@google.com>
parents: 28113
diff changeset
   203
   file@1: manifest refers to unknown revision c10f2164107d
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   204
  not checking dirstate because of previous errors
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   205
  1 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   206
  (first damaged changeset appears to be 1)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   207
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   208
  $ cp -R .hg/store-full/. .hg/store
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   209
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   210
Changelog and manifest log missing entry
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   211
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   212
  $ cp -f .hg/store-partial/00changelog.* .hg/store
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   213
  $ cp -f .hg/store-partial/00manifest.* .hg/store
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   214
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   215
   file@?: rev 1 points to nonexistent changeset 1
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   216
   (expected 0)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   217
   file@?: c10f2164107d not in manifests
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   218
  not checking dirstate because of previous errors
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   219
  1 warnings encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   220
  2 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   221
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   222
  $ cp -R .hg/store-full/. .hg/store
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   223
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   224
Changelog and filelog missing entry
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   225
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   226
  $ cp -f .hg/store-partial/00changelog.* .hg/store
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   227
  $ cp -f .hg/store-partial/data/file.* .hg/store/data
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   228
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   229
   manifest@?: rev 1 points to nonexistent changeset 1
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   230
   manifest@?: 941fc4534185 not in changesets
28114
2a03a365f645 verify: use similar language for missing manifest and file revisions
Martin von Zweigbergk <martinvonz@google.com>
parents: 28113
diff changeset
   231
   file@?: manifest refers to unknown revision c10f2164107d
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   232
  not checking dirstate because of previous errors
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   233
  3 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   234
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   235
  $ cp -R .hg/store-full/. .hg/store
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   236
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   237
Manifest and filelog missing entry
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   238
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   239
  $ cp -f .hg/store-partial/00manifest.* .hg/store
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   240
  $ cp -f .hg/store-partial/data/file.* .hg/store/data
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   241
  $ hg verify -q
28113
d2e0d57824c2 verify: include "manifest" prefix in a few more places
Martin von Zweigbergk <martinvonz@google.com>
parents: 28110
diff changeset
   242
   manifest@1: changeset refers to unknown revision 941fc4534185
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   243
  not checking dirstate because of previous errors
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   244
  1 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   245
  (first damaged changeset appears to be 1)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   246
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   247
  $ cp -R .hg/store-full/. .hg/store
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   248
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   249
Corrupt changelog base node to cause failure to read revision
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   250
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   251
  $ printf abcd | dd conv=notrunc of=.hg/store/00changelog.i bs=1 seek=16 \
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   252
  >   2> /dev/null
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   253
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   254
   0: unpacking changeset 08b1860757c2: * (glob)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   255
   manifest@?: rev 0 points to unexpected changeset 0
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   256
   manifest@?: d0b6632564d4 not in changesets
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   257
   file@?: rev 0 points to unexpected changeset 0
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   258
   (expected 1)
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   259
  not checking dirstate because of previous errors
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   260
  1 warnings encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   261
  4 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   262
  (first damaged changeset appears to be 0)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   263
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   264
  $ cp -R .hg/store-full/. .hg/store
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   265
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   266
Corrupt manifest log base node to cause failure to read revision
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   267
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   268
  $ printf abcd | dd conv=notrunc of=.hg/store/00manifest.i bs=1 seek=16 \
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   269
  >   2> /dev/null
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   270
  $ hg verify -q
28113
d2e0d57824c2 verify: include "manifest" prefix in a few more places
Martin von Zweigbergk <martinvonz@google.com>
parents: 28110
diff changeset
   271
   manifest@0: reading delta d0b6632564d4: * (glob)
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   272
   file@0: 362fef284ce2 not in manifests
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   273
  not checking dirstate because of previous errors
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   274
  2 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   275
  (first damaged changeset appears to be 0)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   276
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   277
  $ cp -R .hg/store-full/. .hg/store
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   278
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   279
Corrupt filelog base node to cause failure to read revision
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   280
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   281
  $ printf abcd | dd conv=notrunc of=.hg/store/data/file.i bs=1 seek=16 \
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   282
  >   2> /dev/null
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   283
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   284
   file@0: unpacking 362fef284ce2: * (glob)
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   285
  not checking dirstate because of previous errors
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   286
  1 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   287
  (first damaged changeset appears to be 0)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   288
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   289
  $ cp -R .hg/store-full/. .hg/store
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   290
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   291
  $ cd ..
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   292
17385
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   293
test changelog without a manifest
8016
baaa832fd253 raise RevlogError when parser can't parse the revlog index
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 6898
diff changeset
   294
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   295
  $ hg init b
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   296
  $ cd b
17385
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   297
  $ hg branch foo
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   298
  marked working directory as branch foo
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   299
  (branches are permanent and global, did you want a bookmark?)
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   300
  $ hg ci -m branchfoo
49825
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents: 49534
diff changeset
   301
  $ hg verify -q
17385
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   302
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   303
test revlog corruption
8016
baaa832fd253 raise RevlogError when parser can't parse the revlog index
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 6898
diff changeset
   304
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   305
  $ touch a
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   306
  $ hg add a
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   307
  $ hg ci -m a
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   308
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   309
  $ echo 'corrupted' > b
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   310
  $ dd if=.hg/store/data/a.i of=start bs=1 count=20 2>/dev/null
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   311
  $ cat start b > .hg/store/data/a.i
8016
baaa832fd253 raise RevlogError when parser can't parse the revlog index
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 6898
diff changeset
   312
49825
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents: 49534
diff changeset
   313
  $ hg verify -q
51428
def497c75351 rust: disable the RustIndex without persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51253
diff changeset
   314
   a@1: broken revlog! (index a is corrupted)
37410
a6651f5e2c78 verify: drop "revlog" from warning message
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32571
diff changeset
   315
  warning: orphan data file 'data/a.i'
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   316
  not checking dirstate because of previous errors
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   317
  1 warnings encountered!
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   318
  1 integrity errors encountered!
17385
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   319
  (first damaged changeset appears to be 1)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12172
diff changeset
   320
  [1]
8016
baaa832fd253 raise RevlogError when parser can't parse the revlog index
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 6898
diff changeset
   321
12172
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   322
  $ cd ..
12170
581066a319e5 verify: fix "missing revlog!" errors for revlog format v0 and add test
Thomas Arendsen Hein <thomas@intevation.de>
parents: 9690
diff changeset
   323
12172
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   324
test revlog format 0
12170
581066a319e5 verify: fix "missing revlog!" errors for revlog format v0 and add test
Thomas Arendsen Hein <thomas@intevation.de>
parents: 9690
diff changeset
   325
25472
4d2b9b304ad0 tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents: 17385
diff changeset
   326
  $ revlog-formatv0.py
12172
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   327
  $ cd formatv0
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   328
  $ hg verify
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   329
  repository uses revlog format 0
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   330
  checking changesets
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   331
  checking manifests
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   332
  crosschecking files in changesets and manifests
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   333
  checking files
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   334
  checking dirstate
39489
f1186c292d03 verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents: 37428
diff changeset
   335
  checked 1 changesets with 1 changes to 1 files
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 12327
diff changeset
   336
  $ cd ..
32288
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   337
51237
49b00a04028f rust-index: disabling flagprocessor tests
Georges Racinet on incendie.racinet.fr <georges@racinet.fr>
parents: 49827
diff changeset
   338
# rust index does not allow creation of new flags dynamically
49b00a04028f rust-index: disabling flagprocessor tests
Georges Racinet on incendie.racinet.fr <georges@racinet.fr>
parents: 49827
diff changeset
   339
#if no-rust
49b00a04028f rust-index: disabling flagprocessor tests
Georges Racinet on incendie.racinet.fr <georges@racinet.fr>
parents: 49827
diff changeset
   340
32288
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   341
test flag processor and skipflags
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   342
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   343
  $ hg init skipflags
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   344
  $ cd skipflags
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   345
  $ cat >> .hg/hgrc <<EOF
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   346
  > [extensions]
32571
b6612d8579e4 tests: fix typo in "flagprocesor"
Martin von Zweigbergk <martinvonz@google.com>
parents: 32288
diff changeset
   347
  > flagprocessor=$RUNTESTDIR/flagprocessorext.py
32288
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   348
  > EOF
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   349
  $ echo '[BASE64]content' > base64
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   350
  $ hg commit -Aqm 'flag processor content' base64
49825
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents: 49534
diff changeset
   351
  $ hg verify -q
32288
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   352
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   353
  $ cat >> $TESTTMP/break-base64.py <<EOF
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   354
  > import base64
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   355
  > base64.b64decode=lambda x: x
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   356
  > EOF
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   357
  $ cat >> .hg/hgrc <<EOF
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   358
  > breakbase64=$TESTTMP/break-base64.py
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   359
  > EOF
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   360
49825
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents: 49534
diff changeset
   361
  $ hg verify -q
49534
92892dff03f3 revlog: use the user facing filename as the display_id for filelogs
Matt Harbison <matt_harbison@yahoo.com>
parents: 48876
diff changeset
   362
   base64@0: unpacking 794cee7777cb: integrity check failed on base64:0
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   363
  not checking dirstate because of previous errors
32288
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   364
  1 integrity errors encountered!
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   365
  (first damaged changeset appears to be 0)
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   366
  [1]
49825
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents: 49534
diff changeset
   367
  $ hg verify --config verify.skipflags=2147483647 -q
32288
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   368
51237
49b00a04028f rust-index: disabling flagprocessor tests
Georges Racinet on incendie.racinet.fr <georges@racinet.fr>
parents: 49827
diff changeset
   369
#endif