tests/test-verify.t
author Arseniy Alekseyev <aalekseyev@janestreet.com>
Fri, 26 Apr 2024 19:10:35 +0100
changeset 51626 865efc020c33
parent 51615 a93e60ebea09
permissions -rw-r--r--
dirstate: remove the python-side whitelist of allowed matchers This whitelist is too permissive because it allows matchers that contain disallowed ones deep inside, for example through `intersectionmatcher`. It is also too restrictive because it doesn't pass through some of the matchers we support, such as `patternmatcher`. It's also unnecessary because unsupported matchers raise `FallbackError` and we fall back anyway. Making this change makes more of the tests use rust code path, and therefore subtly change behavior. For example, rust status in largefiles repos seems to have strange behavior.
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]
51615
a93e60ebea09 admin-verify: expect a number of errors to be returned
Raphaël Gomès <rgomes@octobus.net>
parents: 51428
diff changeset
   135
a93e60ebea09 admin-verify: expect a number of errors to be returned
Raphaël Gomès <rgomes@octobus.net>
parents: 51428
diff changeset
   136
We can check the dirstate in isolation
a93e60ebea09 admin-verify: expect a number of errors to be returned
Raphaël Gomès <rgomes@octobus.net>
parents: 51428
diff changeset
   137
  $ hg admin::verify -c dirstate
a93e60ebea09 admin-verify: expect a number of errors to be returned
Raphaël Gomès <rgomes@octobus.net>
parents: 51428
diff changeset
   138
  running 1 checks
a93e60ebea09 admin-verify: expect a number of errors to be returned
Raphaël Gomès <rgomes@octobus.net>
parents: 51428
diff changeset
   139
  running working-copy.dirstate
a93e60ebea09 admin-verify: expect a number of errors to be returned
Raphaël Gomès <rgomes@octobus.net>
parents: 51428
diff changeset
   140
  checking dirstate
a93e60ebea09 admin-verify: expect a number of errors to be returned
Raphaël Gomès <rgomes@octobus.net>
parents: 51428
diff changeset
   141
  warning: ignoring unknown working parent c5ddb05ab828!
a93e60ebea09 admin-verify: expect a number of errors to be returned
Raphaël Gomès <rgomes@octobus.net>
parents: 51428
diff changeset
   142
  file marked as tracked in p1 (000000000000) but not in manifest1
a93e60ebea09 admin-verify: expect a number of errors to be returned
Raphaël Gomès <rgomes@octobus.net>
parents: 51428
diff changeset
   143
  found 1 errors
a93e60ebea09 admin-verify: expect a number of errors to be returned
Raphaël Gomès <rgomes@octobus.net>
parents: 51428
diff changeset
   144
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   145
  $ 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
   146
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   147
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
   148
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   149
  $ rm .hg/store/00changelog.*
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   150
  $ 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
   151
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   152
   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
   153
   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
   154
   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
   155
   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
   156
   ?: 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
   157
   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
   158
   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
   159
  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
   160
  1 warnings encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   161
  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
   162
  6 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   163
  (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
   164
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   165
  $ 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
   166
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   167
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
   168
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   169
  $ rm .hg/store/00manifest.*
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   170
  $ 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
   171
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   172
   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
   173
   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
   174
   0: empty or missing file
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   175
  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
   176
  1 warnings encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   177
  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
   178
  2 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   179
  (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
   180
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   181
  $ 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
   182
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   183
Changelog missing entry
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   184
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   185
  $ 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
   186
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   187
   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
   188
   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
   189
   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
   190
   (expected 0)
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   191
  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
   192
  1 warnings encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   193
  3 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   194
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   195
  $ 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
   196
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   197
Manifest log missing entry
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
  $ 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
   200
  $ hg verify -q
28113
d2e0d57824c2 verify: include "manifest" prefix in a few more places
Martin von Zweigbergk <martinvonz@google.com>
parents: 28110
diff changeset
   201
   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
   202
   file@1: c10f2164107d not in manifests
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   203
  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
   204
  2 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   205
  (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
   206
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   207
  $ 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
   208
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   209
Filelog missing entry
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   210
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   211
  $ 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
   212
  $ 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
   213
   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
   214
  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
   215
  1 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   216
  (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
   217
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   218
  $ 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
   219
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   220
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
   221
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   222
  $ 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
   223
  $ 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
   224
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   225
   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
   226
   (expected 0)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   227
   file@?: c10f2164107d not in manifests
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   228
  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
   229
  1 warnings encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   230
  2 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   231
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   232
  $ 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
   233
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   234
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
   235
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   236
  $ 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
   237
  $ 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
   238
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   239
   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
   240
   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
   241
   file@?: manifest refers to unknown revision c10f2164107d
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   242
  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
   243
  3 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   244
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   245
  $ 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
   246
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   247
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
   248
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   249
  $ 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
   250
  $ 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
   251
  $ hg verify -q
28113
d2e0d57824c2 verify: include "manifest" prefix in a few more places
Martin von Zweigbergk <martinvonz@google.com>
parents: 28110
diff changeset
   252
   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
   253
  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
   254
  1 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   255
  (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
   256
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   257
  $ 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
   258
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   259
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
   260
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   261
  $ 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
   262
  >   2> /dev/null
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   263
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   264
   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
   265
   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
   266
   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
   267
   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
   268
   (expected 1)
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   269
  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
   270
  1 warnings encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   271
  4 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   272
  (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
   273
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   274
  $ 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
   275
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   276
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
   277
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   278
  $ 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
   279
  >   2> /dev/null
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   280
  $ hg verify -q
28113
d2e0d57824c2 verify: include "manifest" prefix in a few more places
Martin von Zweigbergk <martinvonz@google.com>
parents: 28110
diff changeset
   281
   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
   282
   file@0: 362fef284ce2 not in manifests
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   283
  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
   284
  2 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   285
  (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
   286
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   287
  $ 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
   288
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   289
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
   290
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   291
  $ 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
   292
  >   2> /dev/null
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   293
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   294
   file@0: unpacking 362fef284ce2: * (glob)
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   295
  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
   296
  1 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   297
  (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
   298
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   299
  $ 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
   300
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   301
  $ cd ..
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   302
17385
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   303
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
   304
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   305
  $ hg init b
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   306
  $ cd b
17385
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   307
  $ hg branch foo
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   308
  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
   309
  (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
   310
  $ 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
   311
  $ hg verify -q
17385
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   312
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   313
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
   314
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   315
  $ touch a
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   316
  $ hg add a
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   317
  $ hg ci -m a
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   318
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   319
  $ echo 'corrupted' > b
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   320
  $ 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
   321
  $ 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
   322
49825
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents: 49534
diff changeset
   323
  $ hg verify -q
51428
def497c75351 rust: disable the RustIndex without persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51253
diff changeset
   324
   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
   325
  warning: orphan data file 'data/a.i'
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   326
  not checking dirstate because of previous errors
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   327
  1 warnings encountered!
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   328
  1 integrity errors encountered!
17385
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   329
  (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
   330
  [1]
8016
baaa832fd253 raise RevlogError when parser can't parse the revlog index
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 6898
diff changeset
   331
12172
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   332
  $ 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
   333
12172
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   334
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
   335
25472
4d2b9b304ad0 tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents: 17385
diff changeset
   336
  $ revlog-formatv0.py
12172
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   337
  $ cd formatv0
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   338
  $ hg verify
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   339
  repository uses revlog format 0
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   340
  checking changesets
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   341
  checking manifests
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   342
  crosschecking files in changesets and manifests
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   343
  checking files
49826
c84844cd523a verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents: 49825
diff changeset
   344
  checking dirstate
39489
f1186c292d03 verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents: 37428
diff changeset
   345
  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
   346
  $ cd ..
32288
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   347
51237
49b00a04028f rust-index: disabling flagprocessor tests
Georges Racinet on incendie.racinet.fr <georges@racinet.fr>
parents: 49827
diff changeset
   348
# 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
   349
#if no-rust
49b00a04028f rust-index: disabling flagprocessor tests
Georges Racinet on incendie.racinet.fr <georges@racinet.fr>
parents: 49827
diff changeset
   350
32288
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   351
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
   352
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   353
  $ hg init skipflags
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   354
  $ cd skipflags
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   355
  $ cat >> .hg/hgrc <<EOF
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   356
  > [extensions]
32571
b6612d8579e4 tests: fix typo in "flagprocesor"
Martin von Zweigbergk <martinvonz@google.com>
parents: 32288
diff changeset
   357
  > 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
   358
  > EOF
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   359
  $ echo '[BASE64]content' > base64
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   360
  $ 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
   361
  $ hg verify -q
32288
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   362
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   363
  $ 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
   364
  > import base64
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   365
  > 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
   366
  > EOF
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   367
  $ cat >> .hg/hgrc <<EOF
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   368
  > 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
   369
  > EOF
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   370
49825
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents: 49534
diff changeset
   371
  $ 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
   372
   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
   373
  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
   374
  1 integrity errors encountered!
a2ab9ebcd85b verify: add a config option to skip certain flag processors
Jun Wu <quark@fb.com>
parents: 30556
diff changeset
   375
  (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
   376
  [1]
49825
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents: 49534
diff changeset
   377
  $ 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
   378
51237
49b00a04028f rust-index: disabling flagprocessor tests
Georges Racinet on incendie.racinet.fr <georges@racinet.fr>
parents: 49827
diff changeset
   379
#endif