-
Pierre-Yves David authored
Since 481259af4bdf the `debugupdatecache` command also warming the `hgtagsfnodes` cache too. We update the test to expect this file.
Pierre-Yves David authoredSince 481259af4bdf the `debugupdatecache` command also warming the `hgtagsfnodes` cache too. We update the test to expect this file.
test-make-reference.t 14.56 KiB
====================================
Test for the `make reference` script
====================================
Setup
$ export PATH=$TESTDIR/../repo-scripts/:${PATH}
$ mkdir some-dir
$ hg init some-dir/my-source-repo --config format.usegeneraldelta=False
$ hg -R some-dir/my-source-repo debugbuilddag --new-file '.+5:brancha$.+11:branchb$.+30:branchc<brancha+2<branchb+2'
Define partial set
$ cat << EOF >> p-config.yaml
> partial-sets:
> same:
> missing-last-10:
> remove: "last(all(), 10)"
> roles:
> pull:
> noop:
> same:
> source: "reference"
> target: "same"
> EOF
Wrong call
----------
$ make-reference
usage: make-reference [-h] [--optimize OPTIMIZE [OPTIMIZE ...]] [--hgrc HGRC]
[--existing-repo EXISTING_REPO]
source id partial_sets_file
make-reference: error: too few arguments
[2]
$ make-reference some-dir/my-source-repo
usage: make-reference [-h] [--optimize OPTIMIZE [OPTIMIZE ...]] [--hgrc HGRC]
[--existing-repo EXISTING_REPO]
source id partial_sets_file
make-reference: error: too few arguments
[2]
$ make-reference my-id
usage: make-reference [-h] [--optimize OPTIMIZE [OPTIMIZE ...]] [--hgrc HGRC]
[--existing-repo EXISTING_REPO]
source id partial_sets_file
make-reference: error: too few arguments
[2]
Call from scratch
-----------------
$ make-reference some-dir/my-source-repo my-reference p-config.yaml
copy of old repository backed up at $TESTTMP/my-reference-tmp?????-reference/.hg/upgradebackup.* (glob)
the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
hg cloning repository from: some-dir/my-source-repo
Running debugupgraderepo because of format mismatch:
generaldelta: False != True (repo/config)
sparserevlog: False != True (repo/config)
building a reference tarball
result available at: my-reference-0c229866-reference.tar
$ ls -1
my-reference-0c229866-reference
my-reference-0c229866-reference.tar
my-reference-0c229866.benchrepo
p-config.yaml
some-dir
$ cat my-reference-*.benchrepo
partial-sets:
missing-last-10: