Mercurial > hg
annotate tests/bundles/test-revlog-diff-relative-to-nullrev.sh @ 51279:51021612aea7 stable
bundle: highlight misbehavior when --base does not match any revision
See next changeset for fix and details.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 27 Dec 2023 18:42:13 +0100 |
parents | 786b6225793a |
children |
rev | line source |
---|---|
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) |
51046
f636103c4d67
revlog: remove legacy usage of `_generaldelta`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49239
diff
changeset
|
15 # + if revlog.delta_config.general_delta: |
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
|
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 |
51076
786b6225793a
debug-delta-chain: print less data by default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
51046
diff
changeset
|
35 ../../../hg debugdeltachain a --all-info |
49209
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 |