Mercurial > hg-stable
changeset 49257:996a70c75c66
test-revlog: update the patch used to test delta againts nullrev
We need to be careful to not create invalid delta for changelog. Changelog is
special because it does not use any delta in practice and don't use general
delta in its format.
Using the new patch will help use to test more cases.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 27 May 2022 03:14:23 +0200 |
parents | e5e3a340b965 |
children | 6aae0e1ecdbc |
files | tests/bundles/test-revlog-diff-relative-to-nullrev.sh |
diffstat | 1 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/bundles/test-revlog-diff-relative-to-nullrev.sh Fri May 27 14:37:12 2022 +0400 +++ b/tests/bundles/test-revlog-diff-relative-to-nullrev.sh Fri May 27 03:14:23 2022 +0200 @@ -1,9 +1,22 @@ #!/bin/bash # # Make sure to patch mercurial to create the delta against nullrev +# +# # Parent cdb85d0512b81031d4a7b30d6a5ddbe69ef1a876 +# +# diff --git a/mercurial/revlogutils/deltas.py b/mercurial/revlogutils/deltas.py +# --- a/mercurial/revlogutils/deltas.py +# +++ b/mercurial/revlogutils/deltas.py +# @@ -1117,7 +1117,10 @@ class deltacomputer: +# candidaterevs = next(groups) +# # if deltainfo is None: -#- deltainfo = self._fullsnapshotinfo(fh, revinfo, target_rev) -#+ deltainfo = self._builddeltainfo(revinfo, nullrev, fh) +# - deltainfo = self._fullsnapshotinfo(fh, revinfo, target_rev) +# + if revlog._generaldelta: +# + deltainfo = self._builddeltainfo(revinfo, nullrev, fh) +# + else: +# + deltainfo = self._fullsnapshotinfo(fh, revinfo, target_rev) + cd "`dirname \"$0\"`" export HGRCPATH=