sapling/eden/hg-server/tests/test-repo-compengines.t
Durham Goode 98d9269874 server: copy hg to a new hg-server directory
Summary:
Create a fork of the Mercurial code that we can use to build server
rpms. The hg servers will continue to exist for a few more months while we move
the darkstorm and ediscovery use cases off them. In the mean time, we want to
start making breaking changes to the client, so let's create a stable copy of
the hg code to produce rpms for the hg servers.

The fork is based off c7770c78d, the latest hg release.

This copies the files as is, then adds some minor tweaks to get it to build:
- Disables some lint checks that appear to be bypassed by path
- sed replace eden/scm with eden/hg-server
- Removed a dependency on scm/telemetry from the edenfs-client tests since
  scm/telemetry pulls in the original eden/scm/lib/configparser which conflicts
  with the hg-server conflict parser.

allow-large-files

Reviewed By: quark-zju

Differential Revision: D27632557

fbshipit-source-id: b2f442f4ec000ea08e4d62de068750832198e1f4
2021-04-09 10:09:06 -07:00

85 lines
1.8 KiB
Perl

#require py2
#chg-compatible
A new repository uses zlib storage, which doesn't need a requirement
$ hg init default
$ cd default
$ cat .hg/requires
dotencode
fncache
generaldelta
lz4revlog
revlogv1
store
treestate
$ touch foo
$ hg -q commit -A -m 'initial commit with a lot of repeated repeated repeated text to trigger compression'
$ hg debugrevlog -c | grep 0x78
[1]
$ cd ..
Unknown compression engine to format.compression aborts
$ hg --config experimental.format.compression=unknown init unknown
abort: compression engine unknown defined by experimental.format.compression not available
(run "hg debuginstall" to list available compression engines)
[255]
A requirement specifying an unknown compression engine results in bail
$ hg init unknownrequirement
$ cd unknownrequirement
$ echo exp-compression-unknown >> .hg/requires
$ hg log
abort: repository requires features unknown to this Mercurial: exp-compression-unknown!
(see https://mercurial-scm.org/wiki/MissingRequirement for more information)
[255]
$ cd ..
#if zstd
$ hg --config experimental.format.compression=zstd init zstd
$ cd zstd
$ cat .hg/requires
dotencode
exp-compression-zstd
fncache
generaldelta
lz4revlog
revlogv1
store
treestate
$ touch foo
$ hg -q commit -A -m 'initial commit with a lot of repeated repeated repeated text'
$ hg debugrevlog -c | grep 0x28
[1]
$ cd ..
Specifying a new format.compression on an existing repo won't introduce data
with that engine or a requirement
$ cd default
$ touch bar
$ hg --config experimental.format.compression=zstd -q commit -A -m 'add bar with a lot of repeated repeated repeated text'
$ cat .hg/requires
dotencode
fncache
generaldelta
lz4revlog
revlogv1
store
treestate
$ hg debugrevlog -c | grep 0x78
[1]
#endif