sapling/tests/test-hgsql-sqlrefill.t
Jun Wu 4ddedaf7d2 tests: remove most rocksdb test cases
Summary:
RocksDB and InnoDB are highly compatibile. There is no need to test RocksDB
engine for every hgsql related tests. Only use rocksdb for 2 of the tests.

Reviewed By: phillco

Differential Revision: D10055068

fbshipit-source-id: f9b7ef546fe7d457b0390e49014ebbe56d3c12c1
2018-09-26 14:20:15 -07:00

58 lines
904 B
Perl

$ . "$TESTDIR/hgsql/library.sh"
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:"
hgext.hgsql.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