mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
eceb3179c4
Summary: This helps debugging some hgsql issues especially in test-globalrevs. Reviewed By: DurhamG Differential Revision: D22200509 fbshipit-source-id: cddf79a00951d135dee20a5e9fb3a486abad2ff7
60 lines
965 B
Perl
60 lines
965 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: tip doesn't match after sync (self: 2, fetchend: -1) (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
|
|
|