sapling/eden/scm/tests/test-hgsql-sqlrefill.t
Durham Goode 3588633bb7 py3: revert mysql-connector-python upgrade and hgsql tests
Summary:
The tests are broken on non-fbcode builds because
mysql-connector-python is the old version. We're unable to upgrade
mysql-connector-python on centos 7/8 because yummy is broken. This blocks us
from getting a release.

Let's roll back the mysql-connector-python upgrade for now, until yummy is
fixed.

Reviewed By: singhsrb

Differential Revision: D21162119

fbshipit-source-id: 5d0b266d72274540eca5b9a76bf151a0fbbee059
2020-04-21 13:45:23 -07:00

61 lines
954 B
Perl

#require py2
#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 (glob)
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