mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
cec43c1e77
Summary: Infinitepush stores bundles uncompressed, which can make them quite large. Enable zstd compression of bundles, both when sending them to the server during backups, and when storing the bundle in the bundle store on the server. Reviewed By: quark-zju Differential Revision: D7777371 fbshipit-source-id: ef9360bf05bf2a6d2b76e26cd40ad1e4ee8ae076
32 lines
812 B
Raku
32 lines
812 B
Raku
$ . "$TESTDIR/library.sh"
|
|
$ . "$TESTDIR/infinitepush/library.sh"
|
|
$ setupcommon
|
|
$ cat << EOF >> $HGRCPATH
|
|
> [infinitepush]
|
|
> bundlecompression = GZ
|
|
> EOF
|
|
|
|
Setup server
|
|
$ hg init repo
|
|
$ cd repo
|
|
$ setupserver
|
|
$ cd ..
|
|
|
|
Backup a commit
|
|
$ hg clone ssh://user@dummy/repo client -q
|
|
$ cd client
|
|
$ mkcommit commit
|
|
$ hg pushbackup
|
|
starting backup .* (re)
|
|
searching for changes
|
|
remote: pushing 1 commit:
|
|
remote: 7e6a6fd9c7c8 commit
|
|
finished in \d+\.(\d+)? seconds (re)
|
|
|
|
Check the commit is compressed
|
|
$ f=`cat ../repo/.hg/scratchbranches/index/nodemap/7e6a6fd9c7c8c8c307ee14678f03d63af3a7b455`
|
|
$ hg debugbundle ../repo/.hg/scratchbranches/filebundlestore/*/*/$f
|
|
Stream params: {Compression: GZ}
|
|
changegroup -- {version: 02}
|
|
7e6a6fd9c7c8c8c307ee14678f03d63af3a7b455
|