sapling/eden/scm/tests/test-hgsql-sqlrefill.t
Mark Thomas b654a9aae5 tests: use disable treemanifest in place of setconfig
Summary: Use `disable treemanifest` in place of `setconfig extensions.treemanifest=!`

Reviewed By: quark-zju

Differential Revision: D19457678

fbshipit-source-id: 47c8b3c4f4ed5cfc97275ca67afab4a86ffe7f0d
2020-01-20 02:45:15 -08:00

60 lines
933 B
Perl

#chg-compatible
$ . "$TESTDIR/hgsql/library.sh"
$ disable treemanifest
Populate the db with an initial commit.
$ initclient client
$ cd client
$ echo p > p
$ hg commit -qAm p
$ echo q > q
$ hg commit -qAm q
$ hg -q up 0
$ echo r > r
$ hg commit -qAm r
$ hg bookmark foo
$ cd ..
Create master without sql configuration.
$ hg clone -q client master
Configure master as a server backed by sql.
$ configureserver master masterrepo
$ cd master
$ hg log -GT '{files}' 2>&1 | grep "CorruptionException:"
CorruptionException: heads don't match after sync
Fix the server using sqlrefill.
$ hg sqlrefill --i-know-what-i-am-doing 0
$ hg log -GT '{files}'
@ r
|
| o q
|/
o p
Make another commit to the server to verify that repository state is sane after
the refill.
$ echo s > s
$ hg commit -qAm s
$ hg log -GT '{files}'
@ s
|
o r
|
| o q
|/
o p