tests/test-verify.t
author Simon Farnsworth <simonfar@fb.com>
Mon, 06 Mar 2017 03:19:40 -0800
changeset 31204 84e8a6834223
parent 30556 c059286a0f9c
child 32288 a2ab9ebcd85b
permissions -rw-r--r--
filemerge: tag merge tool for blocked times Merge tools can take a while - let's ensure that they're appropriately tagged
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
     1
prepare repo
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
     2
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
     3
  $ hg init a
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
     4
  $ cd a
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
     5
  $ echo "some text" > FOO.txt
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
     6
  $ echo "another text" > bar.txt
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
     7
  $ echo "more text" > QUICK.txt
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
     8
  $ hg add
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
     9
  adding FOO.txt
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    10
  adding QUICK.txt
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    11
  adding bar.txt
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    12
  $ hg ci -mtest1
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    13
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    14
verify
6893
c3368278f86c add test-verify
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    15
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    16
  $ hg verify
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    17
  checking changesets
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    18
  checking manifests
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    19
  crosschecking files in changesets and manifests
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    20
  checking files
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    21
  3 files, 1 changesets, 3 total revisions
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    22
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    23
verify with journal
6893
c3368278f86c add test-verify
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    24
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    25
  $ touch .hg/store/journal
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    26
  $ hg verify
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    27
  abandoned transaction found - run hg recover
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    28
  checking changesets
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    29
  checking manifests
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    30
  crosschecking files in changesets and manifests
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    31
  checking files
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    32
  3 files, 1 changesets, 3 total revisions
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    33
  $ rm .hg/store/journal
6893
c3368278f86c add test-verify
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    34
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    35
introduce some bugs in repo
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    36
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    37
  $ cd .hg/store/data
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    38
  $ 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
    39
  $ mv bar.txt.i xbar.txt.i
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    40
  $ rm _q_u_i_c_k.txt.i
9690
b33d70849a20 verify: report existence of journal
Sune Foldager <cryo@cyanite.org>
parents: 8720
diff changeset
    41
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    42
  $ hg verify
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    43
  checking changesets
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    44
  checking manifests
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    45
  crosschecking files in changesets and manifests
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    46
  checking files
25627
9573d8f346f1 verify: clarify misleading fncache message
Matt Mackall <mpm@selenic.com>
parents: 25472
diff changeset
    47
   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
    48
   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
    49
   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
    50
   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
    51
   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
    52
   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
    53
   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
    54
   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
    55
   bar.txt@0: manifest refers to unknown revision 256559129457
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    56
  3 files, 1 changesets, 0 total revisions
25627
9573d8f346f1 verify: clarify misleading fncache message
Matt Mackall <mpm@selenic.com>
parents: 25472
diff changeset
    57
  3 warnings encountered!
25653
9d1e04f5dca7 verify: print hint to run debugrebuildfncache
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25627
diff changeset
    58
  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
    59
  6 integrity errors encountered!
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    60
  (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
    61
  [1]
6893
c3368278f86c add test-verify
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    62
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 12327
diff changeset
    63
  $ cd ../../..
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
    64
  $ cd ..
6893
c3368278f86c add test-verify
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    65
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    66
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
    67
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    68
  $ hg init missing-entries
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    69
  $ cd missing-entries
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    70
  $ echo 0 > file
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    71
  $ hg ci -Aqm0
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
    72
  $ 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
    73
  $ echo 1 > file
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    74
  $ hg ci -Aqm1
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
    75
  $ 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
    76
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    77
Entire changelog missing
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    78
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    79
  $ rm .hg/store/00changelog.*
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    80
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    81
   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
    82
   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
    83
   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
    84
  3 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    85
  (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
    86
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
    87
  $ 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
    88
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    89
Entire manifest log missing
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    90
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    91
  $ rm .hg/store/00manifest.*
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    92
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    93
   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
    94
  1 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    95
  (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
    96
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
    97
  $ 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
    98
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
    99
Entire filelog missing
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   100
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   101
  $ 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
   102
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   103
   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
   104
   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
   105
   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
   106
   file@1: manifest refers to unknown revision c10f2164107d
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   107
  1 warnings encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   108
  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
   109
  3 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   110
  (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
   111
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   112
  $ 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
   113
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   114
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
   115
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   116
  $ rm .hg/store/00changelog.*
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   117
  $ rm .hg/store/00manifest.*
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   118
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   119
  warning: orphan revlog 'data/file.i'
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   120
  1 warnings encountered!
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   121
  $ 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
   122
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   123
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
   124
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   125
  $ rm .hg/store/00changelog.*
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   126
  $ 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
   127
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   128
   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
   129
   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
   130
   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
   131
   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
   132
   ?: 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
   133
   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
   134
   file@1: manifest refers to unknown revision c10f2164107d
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   135
  1 warnings encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   136
  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
   137
  6 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   138
  (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
   139
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   140
  $ 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
   141
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   142
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
   143
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   144
  $ rm .hg/store/00manifest.*
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   145
  $ 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
   146
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   147
   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
   148
   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
   149
   0: empty or missing file
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
  2 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
Changelog missing entry
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
  $ 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
   160
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   161
   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
   162
   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
   163
   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
   164
   (expected 0)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   165
  1 warnings encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   166
  3 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   167
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   168
  $ 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
   169
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   170
Manifest log missing entry
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   171
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   172
  $ 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
   173
  $ hg verify -q
28113
d2e0d57824c2 verify: include "manifest" prefix in a few more places
Martin von Zweigbergk <martinvonz@google.com>
parents: 28110
diff changeset
   174
   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
   175
   file@1: c10f2164107d not in manifests
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   176
  2 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   177
  (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
   178
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   179
  $ 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
   180
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   181
Filelog missing entry
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
  $ 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
   184
  $ 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
   185
   file@1: manifest refers to unknown revision c10f2164107d
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   186
  1 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   187
  (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
   188
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   189
  $ 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
   190
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   191
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
   192
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   193
  $ 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
   194
  $ 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
   195
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   196
   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
   197
   (expected 0)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   198
   file@?: c10f2164107d not in manifests
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   199
  1 warnings encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   200
  2 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   201
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   202
  $ 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
   203
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   204
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
   205
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   206
  $ 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
   207
  $ 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
   208
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   209
   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
   210
   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
   211
   file@?: manifest refers to unknown revision c10f2164107d
28110
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   212
  3 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   213
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   214
  $ 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
   215
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   216
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
   217
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   218
  $ 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
   219
  $ 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
   220
  $ hg verify -q
28113
d2e0d57824c2 verify: include "manifest" prefix in a few more places
Martin von Zweigbergk <martinvonz@google.com>
parents: 28110
diff changeset
   221
   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
   222
  1 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   223
  (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
   224
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   225
  $ 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
   226
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   227
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
   228
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   229
  $ 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
   230
  >   2> /dev/null
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   231
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   232
   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
   233
   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
   234
   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
   235
   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
   236
   (expected 1)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   237
  1 warnings encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   238
  4 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   239
  (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
   240
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   241
  $ 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
   242
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   243
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
   244
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   245
  $ 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
   246
  >   2> /dev/null
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   247
  $ hg verify -q
28113
d2e0d57824c2 verify: include "manifest" prefix in a few more places
Martin von Zweigbergk <martinvonz@google.com>
parents: 28110
diff changeset
   248
   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
   249
   file@0: 362fef284ce2 not in manifests
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   250
  2 integrity errors encountered!
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   251
  (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
   252
  [1]
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 28214
diff changeset
   253
  $ 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
   254
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   255
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
   256
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   257
  $ 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
   258
  >   2> /dev/null
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   259
  $ hg verify -q
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   260
   file@0: unpacking 362fef284ce2: * (glob)
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   261
  1 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
  $ cd ..
2b41f8655bbc tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com>
parents: 25653
diff changeset
   267
17385
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   268
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
   269
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   270
  $ hg init b
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   271
  $ cd b
17385
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   272
  $ hg branch foo
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   273
  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
   274
  (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
   275
  $ hg ci -m branchfoo
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   276
  $ hg verify
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   277
  checking changesets
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   278
  checking manifests
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   279
  crosschecking files in changesets and manifests
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   280
  checking files
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   281
  0 files, 1 changesets, 0 total revisions
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   282
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   283
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
   284
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   285
  $ touch a
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   286
  $ hg add a
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   287
  $ hg ci -m a
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   288
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   289
  $ echo 'corrupted' > b
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   290
  $ 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
   291
  $ 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
   292
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   293
  $ hg verify
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   294
  checking changesets
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   295
  checking manifests
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   296
  crosschecking files in changesets and manifests
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   297
  checking files
17385
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   298
   a@1: broken revlog! (index data/a.i is corrupted)
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   299
  warning: orphan revlog 'data/a.i'
17385
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   300
  1 files, 2 changesets, 0 total revisions
11787
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   301
  1 warnings encountered!
7830e693b704 tests: unify test-verify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9690
diff changeset
   302
  1 integrity errors encountered!
17385
b32a30da608d verify: do not choke on valid changelog without manifest
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
   303
  (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
   304
  [1]
8016
baaa832fd253 raise RevlogError when parser can't parse the revlog index
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 6898
diff changeset
   305
12172
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   306
  $ 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
   307
12172
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   308
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
   309
25472
4d2b9b304ad0 tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents: 17385
diff changeset
   310
  $ revlog-formatv0.py
12172
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   311
  $ cd formatv0
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   312
  $ hg verify
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   313
  repository uses revlog format 0
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   314
  checking changesets
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   315
  checking manifests
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   316
  crosschecking files in changesets and manifests
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   317
  checking files
74f54b7775f2 merge with stable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 12170 11787
diff changeset
   318
  1 files, 1 changesets, 1 total revisions
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 12327
diff changeset
   319
  $ cd ..