##// END OF EJS Templates
tests: use pattern matching to mask `ECONNREFUSED` messages...
tests: use pattern matching to mask `ECONNREFUSED` messages The second and third one of these in `test-http-proxy.t` was failing on Windows. The others were found by grep and by failed tests when output was matched and an attempt was made to emit the mask pattern. The first clonebundles failure on Windows emitted: error fetching bundle: [WinError 10061] $ECONNREFUSED$ We should probably stringify that better to get rid of the "[WinError 10061]" part.

File last commit:

r49515:7ee07e1a default
r52835:73a43fe3 default
Show More
test-sqlitestore.t
135 lines | 3.3 KiB | text/troff | Tads3Lexer
/ tests / test-sqlitestore.t
Joerg Sonnenberger
sqlitestore: disable test with chg...
r47042 #require sqlite no-chg
The sqlitestore backend leaves transactions around when used with chg.
Since this backend is primarily intended as proof-of-concept for
alternative storage backends, disable it for chg test runs to avoid
the instability.
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362
$ cat >> $HGRCPATH <<EOF
> [extensions]
> sqlitestore =
> EOF
New repo should not use SQLite by default
$ hg init empty-no-sqlite
test: use `hg debugrequires` instead of `cat` in some tests...
r49295 $ hg debugrequires -R empty-no-sqlite
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 dotencode
Raphaël Gomès
dirstate-v2: fix confusion between requirement and format config variable...
r49142 dirstate-v2 (dirstate-v2 !)
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 fncache
generaldelta
persistent-nodemap: enable the feature by default when using Rust...
r47646 persistent-nodemap (rust !)
revlog-compression: use zstd by default (if available)...
r47636 revlog-compression-zstd (zstd !)
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 revlogv1
share-safe: enable by default (BC)...
r49515 share-safe
Gregory Szorc
tests: add sparserevlog requirement to test-sqlitestore.t...
r40956 sparserevlog
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 store
storage.new-repo-backend=sqlite is recognized
$ hg --config storage.new-repo-backend=sqlite init empty-sqlite
test: use `hg debugrequires` instead of `cat` in some tests...
r49295 $ hg debugrequires -R empty-sqlite
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 dotencode
Raphaël Gomès
dirstate-v2: fix confusion between requirement and format config variable...
r49142 dirstate-v2 (dirstate-v2 !)
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 exp-sqlite-001
exp-sqlite-comp-001=zstd (zstd !)
Augie Fackler
tests: fix up pure case of test-sqlitestore.t...
r40400 exp-sqlite-comp-001=$BUNDLE2_COMPRESSIONS$ (no-zstd !)
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 fncache
generaldelta
persistent-nodemap: enable the feature by default when using Rust...
r47646 persistent-nodemap (rust !)
revlog-compression: use zstd by default (if available)...
r47636 revlog-compression-zstd (zstd !)
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 revlogv1
share-safe: enable by default (BC)...
r49515 share-safe
Gregory Szorc
tests: add sparserevlog requirement to test-sqlitestore.t...
r40956 sparserevlog
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 store
$ cat >> $HGRCPATH << EOF
> [storage]
> new-repo-backend = sqlite
> EOF
Can force compression to zlib
$ hg --config storage.sqlite.compression=zlib init empty-zlib
test: use `hg debugrequires` instead of `cat` in some tests...
r49295 $ hg debugrequires -R empty-zlib
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 dotencode
Raphaël Gomès
dirstate-v2: fix confusion between requirement and format config variable...
r49142 dirstate-v2 (dirstate-v2 !)
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 exp-sqlite-001
exp-sqlite-comp-001=$BUNDLE2_COMPRESSIONS$
fncache
generaldelta
persistent-nodemap: enable the feature by default when using Rust...
r47646 persistent-nodemap (rust !)
revlog-compression: use zstd by default (if available)...
r47636 revlog-compression-zstd (zstd !)
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 revlogv1
share-safe: enable by default (BC)...
r49515 share-safe
Gregory Szorc
tests: add sparserevlog requirement to test-sqlitestore.t...
r40956 sparserevlog
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 store
Can force compression to none
$ hg --config storage.sqlite.compression=none init empty-none
test: use `hg debugrequires` instead of `cat` in some tests...
r49295 $ hg debugrequires -R empty-none
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 dotencode
Raphaël Gomès
dirstate-v2: fix confusion between requirement and format config variable...
r49142 dirstate-v2 (dirstate-v2 !)
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 exp-sqlite-001
exp-sqlite-comp-001=none
fncache
generaldelta
persistent-nodemap: enable the feature by default when using Rust...
r47646 persistent-nodemap (rust !)
revlog-compression: use zstd by default (if available)...
r47636 revlog-compression-zstd (zstd !)
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 revlogv1
share-safe: enable by default (BC)...
r49515 share-safe
Gregory Szorc
tests: add sparserevlog requirement to test-sqlitestore.t...
r40956 sparserevlog
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 store
Can make a local commit
$ hg init local-commit
$ cd local-commit
$ echo 0 > foo
$ hg commit -A -m initial
adding foo
That results in a row being inserted into various tables
Jordi Gutiérrez Hermoso
test-sqlitestore: run sqlite3 with no init file...
r41874 $ sqlite3 .hg/store/db.sqlite -init /dev/null << EOF
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 > SELECT * FROM filepath;
> EOF
1|foo
Jordi Gutiérrez Hermoso
test-sqlitestore: run sqlite3 with no init file...
r41874 $ sqlite3 .hg/store/db.sqlite -init /dev/null << EOF
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 > SELECT * FROM fileindex;
> EOF
1|1|0|-1|-1|0|0|1||6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe (esc)
Jordi Gutiérrez Hermoso
test-sqlitestore: run sqlite3 with no init file...
r41874 $ sqlite3 .hg/store/db.sqlite -init /dev/null << EOF
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 > SELECT * FROM delta;
> EOF
1|1| \xd2\xaf\x8d\xd2"\x01\xdd\x8dH\xe5\xdc\xfc\xae\xd2\x81\xff\x94"\xc7|0 (esc)
Tracking multiple files works
$ echo 1 > bar
$ hg commit -A -m 'add bar'
adding bar
Jordi Gutiérrez Hermoso
test-sqlitestore: run sqlite3 with no init file...
r41874 $ sqlite3 .hg/store/db.sqlite -init /dev/null << EOF
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 > SELECT * FROM filedata ORDER BY id ASC;
> EOF
1|1|foo|0|6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe|-1|-1|0|0|1| (esc)
2|2|bar|0|\xb8\xe0/d3s\x80!\xa0e\xf9Au\xc7\xcd#\xdb_\x05\xbe|-1|-1|1|0|2| (esc)
Multiple revisions of a file works
$ echo a >> foo
$ hg commit -m 'modify foo'
Jordi Gutiérrez Hermoso
test-sqlitestore: run sqlite3 with no init file...
r41874 $ sqlite3 .hg/store/db.sqlite -init /dev/null << EOF
Gregory Szorc
sqlitestore: file storage backend using SQLite...
r40362 > SELECT * FROM filedata ORDER BY id ASC;
> EOF
1|1|foo|0|6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe|-1|-1|0|0|1| (esc)
2|2|bar|0|\xb8\xe0/d3s\x80!\xa0e\xf9Au\xc7\xcd#\xdb_\x05\xbe|-1|-1|1|0|2| (esc)
3|1|foo|1|\xdd\xb3V\xcd\xde1p@\xf7\x8e\x90\xb8*\x8b,\xe9\x0e\xd6j+|0|-1|2|0|3|1 (esc)
$ cd ..