Changeset View
Changeset View
Standalone View
Standalone View
tests/test-empty-manifest-index.t
Create a repo such that the changelog entry refers to a null manifest node: | Test null revisions (node 0000000000000000000000000000000000000000, aka rev -1) | ||||
in various circumstances. | |||||
Make an empty repo: | |||||
$ hg init a | $ hg init a | ||||
$ cd a | $ cd a | ||||
$ hg log | |||||
$ touch x | |||||
$ hg add x | |||||
$ hg commit -m "init" | |||||
$ hg rm x | |||||
$ hg commit -q --amend | |||||
$ wc -c < .hg/store/00manifest.i | $ hg files -r 0000000000000000000000000000000000000000 | ||||
0 | [1] | ||||
$ hg files -r . | |||||
[1] | |||||
Add an empty commit (this makes the changelog refer to a null manifest node): | |||||
Make sure that the manifest can be read (and is empty): | $ hg commit -m "init" --config ui.allowemptycommit=true | ||||
$ hg --config rhg.on-unsupported=abort files -r . | $ hg files -r . | ||||
[1] | [1] | ||||
Test a null changelog rev, too: | Strip that empty commit (this makes the changelog file empty, as opposed to missing): | ||||
$ hg --config 'extensions.strip=' strip . > /dev/null | |||||
$ hg --config rhg.on-unsupported=abort files -r 0000000000000000000000000000000000000000 | $ hg files -r . | ||||
[1] | [1] |