mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
0e6b93a0e0
Summary: - Add support for RocksDB engine (developed as a drop in replacement for innodb) to hgsql to allow new xdb.hgsql.1-10 shards to host hg repos - Prefer MySQL test DBs in same region - Run all hgsql unit tests also for RocksDB engine - Allow for nested ifs to make that possible (downside if you switch off rockdb tests, innodb tests are run twice) Reviewed By: quark-zju Differential Revision: D7014064 fbshipit-source-id: 073c36176aa7eaf74252ef33c3f47da594920b28
50 lines
870 B
Perl
50 lines
870 B
Perl
#testcases case-innodb case-rocksdb
|
|
|
|
#if case-rocksdb
|
|
$ DBENGINE=rocksdb
|
|
#else
|
|
$ DBENGINE=innodb
|
|
#endif
|
|
|
|
$ . "$TESTDIR/hgsql/library.sh"
|
|
|
|
# Populate the db with an initial commit
|
|
|
|
$ initclient client
|
|
$ cd client
|
|
$ echo x > x
|
|
$ hg commit -qAm x
|
|
$ cd ..
|
|
|
|
$ initserver master masterrepo
|
|
$ initserver master2 masterrepo
|
|
$ cd master
|
|
$ hg log
|
|
$ hg pull -q ../client
|
|
|
|
# Verify local commits work
|
|
|
|
$ hg up
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
$ echo y > y
|
|
$ hg commit -Am y
|
|
adding y
|
|
|
|
$ cd ../master2
|
|
$ hg log -l 1
|
|
changeset: 1:d34c38483be9
|
|
tag: tip
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: y
|
|
|
|
|
|
# Verify local bookmarking works
|
|
|
|
$ hg bookmark -r 1 @
|
|
$ hg log -r @ --template '{rev}\n'
|
|
1
|
|
$ cd ../master
|
|
$ hg log -r @ --template '{rev}\n'
|
|
1
|