tests/bundles/test-revlog-diff-relative-to-nullrev.sh
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 14 Jun 2022 11:26:18 +0200
branchstable
changeset 49344 0cc5f74ff7f0
parent 49209 2dd53a33aefa
child 49237 996a70c75c66
permissions -rwxr-xr-x
purge: prevent a silly crash with --confirm --files if --files is passed, there was no directory to checks and `msg` was undefined. This is now fixed and tested.

#!/bin/bash
#
# Make sure to patch mercurial to create the delta against nullrev
#          if deltainfo is None:
#-             deltainfo = self._fullsnapshotinfo(fh, revinfo, target_rev)
#+             deltainfo = self._builddeltainfo(revinfo, nullrev, fh)

cd "`dirname \"$0\"`"
export HGRCPATH=
export HGMODULEPOLICY=py

rm -rf nullrev-diff
../../hg init nullrev-diff  --config format.revlog-compression=zlib
cd nullrev-diff
echo hi > a
../../../hg commit -Am root-B
../../../hg debugdeltachain a
rm -rf .hg/cache/ .hg/wcache/
cd ..

tar cf test-revlog-diff-relative-to-nullrev.tar nullrev-diff

rm -rf nullrev-diff