Mercurial > hg
annotate tests/test-empty-manifest-index.t @ 48198:61ce70fd420e
rhg: handle null changelog and manifest revisions
Differential Revision: https://phab.mercurial-scm.org/D11650
author | Arseniy Alekseyev <aalekseyev@janestreet.com> |
---|---|
date | Tue, 12 Oct 2021 19:43:51 +0100 |
parents | |
children | 9d0e5629cfbf |
rev | line source |
---|---|
48198
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
1 Create a repo such that the changelog entry refers to a null manifest node: |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
2 |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
3 $ hg init a |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
4 $ cd a |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
5 $ hg log |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
6 $ touch x |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
7 $ hg add x |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
8 $ hg commit -m "init" |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
9 $ hg rm x |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
10 $ hg commit -q --amend |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
11 |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
12 $ wc -c < .hg/store/00manifest.i |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
13 0 |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
14 |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
15 Make sure that the manifest can be read (and is empty): |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
16 |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
17 $ hg --config rhg.on-unsupported=abort files -r . |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
18 [1] |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
19 |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
20 Test a null changelog rev, too: |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
21 |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
22 $ hg --config rhg.on-unsupported=abort files -r 0000000000000000000000000000000000000000 |
61ce70fd420e
rhg: handle null changelog and manifest revisions
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff
changeset
|
23 [1] |