test-hgsql-hggit: demostrate bytearray encoding error

Summary: This is caused by D13516212, and not covered by tests.

Reviewed By: DurhamG, StanislavGlebik

Differential Revision: D14025817

fbshipit-source-id: 8a529085c40c5d2ae17ccf3de1ccea22c8d7dbd2
This commit is contained in:
Jun Wu 2019-02-11 13:37:59 -08:00 committed by Facebook Github Bot
parent eaab89f103
commit 33de65a309

34
tests/test-hgsql-hggit.t Normal file
View File

@ -0,0 +1,34 @@
$ . "$RUNTESTDIR/hgsql/library.sh"
$ . "$RUNTESTDIR/hggit/testutil"
$ shorttraceback
$ enable lz4revlog
$ git init a-git
Initialized empty Git repository in $TESTTMP/a-git/.git/
$ cd a-git
Make "a" compressable
>>> open("a", "w").write("0\n" * 5000)
$ git add a
$ git commit -m a
[master (root-commit) *] a (glob)
1 file changed, 5000 insertions(+)
create mode 100644 a
Setup an hgsql repo
$ cd $TESTTMP
$ initserver a-hg a-hg
$ cd a-hg
Pull from git
$ hg pull $TESTTMP/a-git
pulling from $TESTTMP/a-git
importing git objects into hg
transaction abort!
rollback completed
ProgrammingError: Failed processing format-parameters; 'CustomConverter' object has no attribute '_bytearray_to_mysql'
[255]