tests/bundles/test-revlog-diff-relative-to-nullrev.sh
author Matt Harbison <matt_harbison@yahoo.com>
Tue, 06 Sep 2022 15:08:52 -0400
branchstable
changeset 49490 37debd850c16
parent 49239 a94f28be2e6e
child 51046 f636103c4d67
permissions -rwxr-xr-x
packaging: update dulwich to drop the certifi dependency on Windows The presence of `certifi` causes the system certificate store to be ignored, which was reported as a bug against TortoiseHg[1]. It was only pulled in on Windows because of `dulwich`, which was copied from the old TortoiseHg install scripts, in order to support `hg-git`. This version of `dulwich` raises the minimum `urllib3` to a version (1.25) that does certificate verification by default, without the help of `certifi`[2]. We already bundle a newer version of `urllib3`. Note that `certifi` can still be imported from the user site directory, if installed there. But the installer no longer disables the system certificates by default. [1] https://foss.heptapod.net/mercurial/tortoisehg/thg/-/issues/5825 [2] https://github.com/jelmer/dulwich/issues/1025
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
49209
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     1
#!/bin/bash
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     2
#
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     3
# Make sure to patch mercurial to create the delta against nullrev
49237
996a70c75c66 test-revlog: update the patch used to test delta againts nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49209
diff changeset
     4
#
996a70c75c66 test-revlog: update the patch used to test delta againts nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49209
diff changeset
     5
# # Parent  cdb85d0512b81031d4a7b30d6a5ddbe69ef1a876
996a70c75c66 test-revlog: update the patch used to test delta againts nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49209
diff changeset
     6
#
996a70c75c66 test-revlog: update the patch used to test delta againts nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49209
diff changeset
     7
# diff --git a/mercurial/revlogutils/deltas.py b/mercurial/revlogutils/deltas.py
996a70c75c66 test-revlog: update the patch used to test delta againts nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49209
diff changeset
     8
# --- a/mercurial/revlogutils/deltas.py
996a70c75c66 test-revlog: update the patch used to test delta againts nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49209
diff changeset
     9
# +++ b/mercurial/revlogutils/deltas.py
996a70c75c66 test-revlog: update the patch used to test delta againts nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49209
diff changeset
    10
# @@ -1117,7 +1117,10 @@ class deltacomputer:
996a70c75c66 test-revlog: update the patch used to test delta againts nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49209
diff changeset
    11
#                  candidaterevs = next(groups)
996a70c75c66 test-revlog: update the patch used to test delta againts nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49209
diff changeset
    12
#
49209
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    13
#          if deltainfo is None:
49237
996a70c75c66 test-revlog: update the patch used to test delta againts nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49209
diff changeset
    14
# -            deltainfo = self._fullsnapshotinfo(fh, revinfo, target_rev)
996a70c75c66 test-revlog: update the patch used to test delta againts nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49209
diff changeset
    15
# +            if revlog._generaldelta:
996a70c75c66 test-revlog: update the patch used to test delta againts nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49209
diff changeset
    16
# +                deltainfo = self._builddeltainfo(revinfo, nullrev, fh)
996a70c75c66 test-revlog: update the patch used to test delta againts nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49209
diff changeset
    17
# +            else:
996a70c75c66 test-revlog: update the patch used to test delta againts nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49209
diff changeset
    18
# +                deltainfo = self._fullsnapshotinfo(fh, revinfo, target_rev)
996a70c75c66 test-revlog: update the patch used to test delta againts nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49209
diff changeset
    19
49209
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    20
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    21
cd "`dirname \"$0\"`"
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    22
export HGRCPATH=
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    23
export HGMODULEPOLICY=py
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    24
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    25
rm -rf nullrev-diff
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    26
../../hg init nullrev-diff  --config format.revlog-compression=zlib
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    27
cd nullrev-diff
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    28
echo hi > a
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    29
../../../hg commit -Am root-B
49238
6aae0e1ecdbc test-revlog: adds a non-root revision with a delta against nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49237
diff changeset
    30
echo ho > a
6aae0e1ecdbc test-revlog: adds a non-root revision with a delta against nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49237
diff changeset
    31
../../../hg commit -Am child-A
49239
a94f28be2e6e test-revlog: adds a new root revision with a delta against nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49238
diff changeset
    32
hg up null
a94f28be2e6e test-revlog: adds a new root revision with a delta against nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49238
diff changeset
    33
echo ha > a
a94f28be2e6e test-revlog: adds a new root revision with a delta against nullrev
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49238
diff changeset
    34
../../../hg commit -Am root-A
49209
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    35
../../../hg debugdeltachain a
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    36
rm -rf .hg/cache/ .hg/wcache/
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    37
cd ..
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    38
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    39
tar cf test-revlog-diff-relative-to-nullrev.tar nullrev-diff
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    40
2dd53a33aefa test-revlog: test a repository that contains a diff against nullrev
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    41
rm -rf nullrev-diff