Mercurial > hg
annotate tests/test-revlog-delta-find.t @ 51110:042d32355a4a
tests: demonstrate crash in `unstable()` with internal-phase orphans
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 31 Oct 2023 22:33:45 -0700 |
parents | 23b0999f6201 |
children | fa4c4fa232d6 |
rev | line source |
---|---|
49764
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
1 ========================================================== |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
2 Test various things around delta computation within revlog |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
3 ========================================================== |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
4 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
5 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
6 basic setup |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
7 ----------- |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
8 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
9 $ cat << EOF >> $HGRCPATH |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
10 > [debug] |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
11 > revlog.debug-delta=yes |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
12 > EOF |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
13 $ cat << EOF >> sha256line.py |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
14 > # a way to quickly produce file of significant size and poorly compressable content. |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
15 > import hashlib |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
16 > import sys |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
17 > for line in sys.stdin: |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
18 > print(hashlib.sha256(line.encode('utf8')).hexdigest()) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
19 > EOF |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
20 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
21 $ hg init base-repo |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
22 $ cd base-repo |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
23 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
24 create a "large" file |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
25 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
26 $ $TESTDIR/seq.py 1000 | $PYTHON $TESTTMP/sha256line.py > my-file.txt |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
27 $ hg add my-file.txt |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
28 $ hg commit -m initial-commit |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
29 DBG-DELTAS: FILELOG:my-file.txt: rev=0: delta-base=0 * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
30 DBG-DELTAS: MANIFESTLOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
31 DBG-DELTAS: CHANGELOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
32 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
33 Add more change at the end of the file |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
34 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
35 $ $TESTDIR/seq.py 1001 1200 | $PYTHON $TESTTMP/sha256line.py >> my-file.txt |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
36 $ hg commit -m "large-change" |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
37 DBG-DELTAS: FILELOG:my-file.txt: rev=1: delta-base=0 * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
38 DBG-DELTAS: MANIFESTLOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
39 DBG-DELTAS: CHANGELOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
40 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
41 Add small change at the start |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
42 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
43 $ hg up 'desc("initial-commit")' --quiet |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
44 $ mv my-file.txt foo |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
45 $ echo "small change at the start" > my-file.txt |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
46 $ cat foo >> my-file.txt |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
47 $ rm foo |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
48 $ hg commit -m "small-change" |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
49 DBG-DELTAS: FILELOG:my-file.txt: rev=2: delta-base=0 * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
50 DBG-DELTAS: MANIFESTLOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
51 DBG-DELTAS: CHANGELOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
52 created new head |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
53 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
54 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
55 $ hg log -r 'head()' -T '{node}\n' >> ../base-heads.nodes |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
56 $ hg log -r 'desc("initial-commit")' -T '{node}\n' >> ../initial.node |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
57 $ hg log -r 'desc("small-change")' -T '{node}\n' >> ../small.node |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
58 $ hg log -r 'desc("large-change")' -T '{node}\n' >> ../large.node |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
59 $ cd .. |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
60 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
61 Check delta find policy and result for merge on commit |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
62 ====================================================== |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
63 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
64 Check that delta of merge pick best of the two parents |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
65 ------------------------------------------------------ |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
66 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
67 As we check against both parents, the one with the largest change should |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
68 produce the smallest delta and be picked. |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
69 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
70 $ hg clone base-repo test-parents --quiet |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
71 $ hg -R test-parents update 'nodefromfile("small.node")' --quiet |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
72 $ hg -R test-parents merge 'nodefromfile("large.node")' --quiet |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
73 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
74 The delta base is the "large" revision as it produce a smaller delta. |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
75 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
76 $ hg -R test-parents commit -m "merge from small change" |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
77 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=1 * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
78 DBG-DELTAS: MANIFESTLOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
79 DBG-DELTAS: CHANGELOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
80 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
81 Check that the behavior tested above can we disabled |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
82 ---------------------------------------------------- |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
83 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
84 We disable the checking of both parent at the same time. The `small` change, |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
85 that produce a less optimal delta, should be picked first as it is "closer" to |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
86 the new commit. |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
87 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
88 $ hg clone base-repo test-no-parents --quiet |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
89 $ hg -R test-no-parents update 'nodefromfile("small.node")' --quiet |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
90 $ hg -R test-no-parents merge 'nodefromfile("large.node")' --quiet |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
91 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
92 The delta base is the "large" revision as it produce a smaller delta. |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
93 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
94 $ hg -R test-no-parents commit -m "merge from small change" \ |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
95 > --config storage.revlog.optimize-delta-parent-choice=no |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
96 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
97 DBG-DELTAS: MANIFESTLOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
98 DBG-DELTAS: CHANGELOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
99 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
100 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
101 Check delta-find policy and result when unbundling |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
102 ================================================== |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
103 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
104 Build a bundle with all delta built against p1 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
105 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
106 $ hg bundle -R test-parents --all --config devel.bundle.delta=p1 all-p1.hg |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
107 4 changesets found |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
108 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
109 Default policy of trusting delta from the bundle |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
110 ------------------------------------------------ |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
111 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
112 Keeping the `p1` delta used in the bundle is sub-optimal for storage, but |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
113 strusting in-bundle delta is faster to apply. |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
114 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
115 $ hg init bundle-default |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
116 $ hg -R bundle-default unbundle all-p1.hg --quiet |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
117 DBG-DELTAS: CHANGELOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
118 DBG-DELTAS: CHANGELOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
119 DBG-DELTAS: CHANGELOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
120 DBG-DELTAS: CHANGELOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
121 DBG-DELTAS: MANIFESTLOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
122 DBG-DELTAS: MANIFESTLOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
123 DBG-DELTAS: MANIFESTLOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
124 DBG-DELTAS: MANIFESTLOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
125 DBG-DELTAS: FILELOG:my-file.txt: rev=0: delta-base=0 * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
126 DBG-DELTAS: FILELOG:my-file.txt: rev=1: delta-base=0 * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
127 DBG-DELTAS: FILELOG:my-file.txt: rev=2: delta-base=0 * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
128 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
129 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
130 (confirm the file revision are in the same order, 2 should be smaller than 1) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
131 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
132 $ hg -R bundle-default debugdata my-file.txt 2 | wc -l |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
133 \s*1001 (re) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
134 $ hg -R bundle-default debugdata my-file.txt 1 | wc -l |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
135 \s*1200 (re) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
136 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
137 explicitly enabled |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
138 ------------------ |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
139 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
140 Keeping the `p1` delta used in the bundle is sub-optimal for storage, but |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
141 strusting in-bundle delta is faster to apply. |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
142 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
143 $ hg init bundle-reuse-enabled |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
144 $ hg -R bundle-reuse-enabled unbundle all-p1.hg --quiet \ |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
145 > --config storage.revlog.reuse-external-delta-parent=yes |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
146 DBG-DELTAS: CHANGELOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
147 DBG-DELTAS: CHANGELOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
148 DBG-DELTAS: CHANGELOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
149 DBG-DELTAS: CHANGELOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
150 DBG-DELTAS: MANIFESTLOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
151 DBG-DELTAS: MANIFESTLOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
152 DBG-DELTAS: MANIFESTLOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
153 DBG-DELTAS: MANIFESTLOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
154 DBG-DELTAS: FILELOG:my-file.txt: rev=0: delta-base=0 * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
155 DBG-DELTAS: FILELOG:my-file.txt: rev=1: delta-base=0 * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
156 DBG-DELTAS: FILELOG:my-file.txt: rev=2: delta-base=0 * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
157 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
158 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
159 (confirm the file revision are in the same order, 2 should be smaller than 1) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
160 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
161 $ hg -R bundle-reuse-enabled debugdata my-file.txt 2 | wc -l |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
162 \s*1001 (re) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
163 $ hg -R bundle-reuse-enabled debugdata my-file.txt 1 | wc -l |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
164 \s*1200 (re) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
165 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
166 explicitly disabled |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
167 ------------------- |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
168 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
169 Not reusing the delta-base from the parent means we the delta will be made |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
170 against the "best" parent. (so not the same as the previous two) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
171 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
172 $ hg init bundle-reuse-disabled |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
173 $ hg -R bundle-reuse-disabled unbundle all-p1.hg --quiet \ |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
174 > --config storage.revlog.reuse-external-delta-parent=no |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
175 DBG-DELTAS: CHANGELOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
176 DBG-DELTAS: CHANGELOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
177 DBG-DELTAS: CHANGELOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
178 DBG-DELTAS: CHANGELOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
179 DBG-DELTAS: MANIFESTLOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
180 DBG-DELTAS: MANIFESTLOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
181 DBG-DELTAS: MANIFESTLOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
182 DBG-DELTAS: MANIFESTLOG: * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
183 DBG-DELTAS: FILELOG:my-file.txt: rev=0: delta-base=0 * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
184 DBG-DELTAS: FILELOG:my-file.txt: rev=1: delta-base=0 * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
185 DBG-DELTAS: FILELOG:my-file.txt: rev=2: delta-base=0 * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
186 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=1 * (glob) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
187 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
188 (confirm the file revision are in the same order, 2 should be smaller than 1) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
189 |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
190 $ hg -R bundle-reuse-disabled debugdata my-file.txt 2 | wc -l |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
191 \s*1001 (re) |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
192 $ hg -R bundle-reuse-disabled debugdata my-file.txt 1 | wc -l |
e300f445ca77
delta-find: add a test checking various simple behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
193 \s*1200 (re) |
49767
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
194 |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
195 |
50207
f35cf52acabd
delta-find: rename `delta-reuse-policy` to `pulled-delta-reuse-policy`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49777
diff
changeset
|
196 Check the path.*:pulled-delta-reuse-policy option |
49767
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
197 ========================================== |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
198 |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
199 Get a repository with the bad parent picked and a clone ready to pull the merge |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
200 |
50805
23b0999f6201
compat: use cp -R in `test-revlog-delta-find.t` (issue6835)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50657
diff
changeset
|
201 $ cp -aR bundle-reuse-enabled peer-bad-delta |
49767
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
202 $ hg clone peer-bad-delta local-pre-pull --rev `cat large.node` --rev `cat small.node` --quiet |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
203 DBG-DELTAS: CHANGELOG: * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
204 DBG-DELTAS: CHANGELOG: * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
205 DBG-DELTAS: CHANGELOG: * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
206 DBG-DELTAS: MANIFESTLOG: * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
207 DBG-DELTAS: MANIFESTLOG: * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
208 DBG-DELTAS: MANIFESTLOG: * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
209 DBG-DELTAS: FILELOG:my-file.txt: rev=0: delta-base=0 * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
210 DBG-DELTAS: FILELOG:my-file.txt: rev=1: delta-base=0 * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
211 DBG-DELTAS: FILELOG:my-file.txt: rev=2: delta-base=0 * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
212 |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
213 Check the parent order for the file |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
214 |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
215 $ hg -R local-pre-pull debugdata my-file.txt 2 | wc -l |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
216 \s*1001 (re) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
217 $ hg -R local-pre-pull debugdata my-file.txt 1 | wc -l |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
218 \s*1200 (re) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
219 |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
220 Pull with no value (so the default) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
221 ----------------------------------- |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
222 |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
223 default is to reuse the (bad) delta |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
224 |
50805
23b0999f6201
compat: use cp -R in `test-revlog-delta-find.t` (issue6835)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50657
diff
changeset
|
225 $ cp -aR local-pre-pull local-no-value |
49767
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
226 $ hg -R local-no-value pull --quiet |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
227 DBG-DELTAS: CHANGELOG: * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
228 DBG-DELTAS: MANIFESTLOG: * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
229 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
230 |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
231 Pull with explicitly the default |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
232 -------------------------------- |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
233 |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
234 default is to reuse the (bad) delta |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
235 |
50805
23b0999f6201
compat: use cp -R in `test-revlog-delta-find.t` (issue6835)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50657
diff
changeset
|
236 $ cp -aR local-pre-pull local-default |
50207
f35cf52acabd
delta-find: rename `delta-reuse-policy` to `pulled-delta-reuse-policy`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49777
diff
changeset
|
237 $ hg -R local-default pull --quiet --config 'paths.default:pulled-delta-reuse-policy=default' |
49767
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
238 DBG-DELTAS: CHANGELOG: * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
239 DBG-DELTAS: MANIFESTLOG: * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
240 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
241 |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
242 Pull with no-reuse |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
243 ------------------ |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
244 |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
245 We don't reuse the base, so we get a better delta |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
246 |
50805
23b0999f6201
compat: use cp -R in `test-revlog-delta-find.t` (issue6835)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50657
diff
changeset
|
247 $ cp -aR local-pre-pull local-no-reuse |
50207
f35cf52acabd
delta-find: rename `delta-reuse-policy` to `pulled-delta-reuse-policy`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49777
diff
changeset
|
248 $ hg -R local-no-reuse pull --quiet --config 'paths.default:pulled-delta-reuse-policy=no-reuse' |
49767
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
249 DBG-DELTAS: CHANGELOG: * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
250 DBG-DELTAS: MANIFESTLOG: * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
251 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=1 * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
252 |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
253 Pull with try-base |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
254 ------------------ |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
255 |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
256 We requested to use the (bad) delta |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
257 |
50805
23b0999f6201
compat: use cp -R in `test-revlog-delta-find.t` (issue6835)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50657
diff
changeset
|
258 $ cp -aR local-pre-pull local-try-base |
50207
f35cf52acabd
delta-find: rename `delta-reuse-policy` to `pulled-delta-reuse-policy`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49777
diff
changeset
|
259 $ hg -R local-try-base pull --quiet --config 'paths.default:pulled-delta-reuse-policy=try-base' |
49767
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
260 DBG-DELTAS: CHANGELOG: * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
261 DBG-DELTAS: MANIFESTLOG: * (glob) |
f1887500f3ec
delta-find: add a `delta-reuse-policy` on configuration `path`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49764
diff
changeset
|
262 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |
49768
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
263 |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
264 Case where we force a "bad" delta to be applied |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
265 =============================================== |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
266 |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
267 We build a very different file content to force a full snapshot |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
268 |
50805
23b0999f6201
compat: use cp -R in `test-revlog-delta-find.t` (issue6835)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50657
diff
changeset
|
269 $ cp -aR peer-bad-delta peer-bad-delta-with-full |
23b0999f6201
compat: use cp -R in `test-revlog-delta-find.t` (issue6835)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50657
diff
changeset
|
270 $ cp -aR local-pre-pull local-pre-pull-full |
49768
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
271 $ echo '[paths]' >> local-pre-pull-full/.hg/hgrc |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
272 $ echo 'default=../peer-bad-delta-with-full' >> local-pre-pull-full/.hg/hgrc |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
273 |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
274 $ hg -R peer-bad-delta-with-full update 'desc("merge")' --quiet |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
275 $ ($TESTDIR/seq.py 2000 2100; $TESTDIR/seq.py 500 510; $TESTDIR/seq.py 3000 3050) \ |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
276 > | $PYTHON $TESTTMP/sha256line.py > peer-bad-delta-with-full/my-file.txt |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
277 $ hg -R peer-bad-delta-with-full commit -m 'trigger-full' |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
278 DBG-DELTAS: FILELOG:my-file.txt: rev=4: delta-base=4 * (glob) |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
279 DBG-DELTAS: MANIFESTLOG: * (glob) |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
280 DBG-DELTAS: CHANGELOG: * (glob) |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
281 |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
282 Check that "try-base" behavior challenge the delta |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
283 -------------------------------------------------- |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
284 |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
285 The bundling process creates a delta against the previous revision, however this |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
286 is an invalid chain for the client, so it is not considered and we do a full |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
287 snapshot again. |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
288 |
50805
23b0999f6201
compat: use cp -R in `test-revlog-delta-find.t` (issue6835)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50657
diff
changeset
|
289 $ cp -aR local-pre-pull-full local-try-base-full |
49768
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
290 $ hg -R local-try-base-full pull --quiet \ |
50207
f35cf52acabd
delta-find: rename `delta-reuse-policy` to `pulled-delta-reuse-policy`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49777
diff
changeset
|
291 > --config 'paths.default:pulled-delta-reuse-policy=try-base' |
49768
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
292 DBG-DELTAS: CHANGELOG: * (glob) |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
293 DBG-DELTAS: CHANGELOG: * (glob) |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
294 DBG-DELTAS: MANIFESTLOG: * (glob) |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
295 DBG-DELTAS: MANIFESTLOG: * (glob) |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
296 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
297 DBG-DELTAS: FILELOG:my-file.txt: rev=4: delta-base=4 * (glob) |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
298 |
49777
e1953a34c110
bundle: emit full snapshot as is, without doing a redelta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49768
diff
changeset
|
299 Check that "forced" behavior do not challenge the delta, even if it is full. |
e1953a34c110
bundle: emit full snapshot as is, without doing a redelta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49768
diff
changeset
|
300 --------------------------------------------------------------------------- |
e1953a34c110
bundle: emit full snapshot as is, without doing a redelta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49768
diff
changeset
|
301 |
e1953a34c110
bundle: emit full snapshot as is, without doing a redelta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49768
diff
changeset
|
302 A full bundle should be accepted as full bundle without recomputation |
e1953a34c110
bundle: emit full snapshot as is, without doing a redelta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49768
diff
changeset
|
303 |
50805
23b0999f6201
compat: use cp -R in `test-revlog-delta-find.t` (issue6835)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50657
diff
changeset
|
304 $ cp -aR local-pre-pull-full local-forced-full |
49777
e1953a34c110
bundle: emit full snapshot as is, without doing a redelta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49768
diff
changeset
|
305 $ hg -R local-forced-full pull --quiet \ |
50207
f35cf52acabd
delta-find: rename `delta-reuse-policy` to `pulled-delta-reuse-policy`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49777
diff
changeset
|
306 > --config 'paths.default:pulled-delta-reuse-policy=forced' |
49777
e1953a34c110
bundle: emit full snapshot as is, without doing a redelta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49768
diff
changeset
|
307 DBG-DELTAS: CHANGELOG: * (glob) |
e1953a34c110
bundle: emit full snapshot as is, without doing a redelta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49768
diff
changeset
|
308 DBG-DELTAS: CHANGELOG: * (glob) |
e1953a34c110
bundle: emit full snapshot as is, without doing a redelta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49768
diff
changeset
|
309 DBG-DELTAS: MANIFESTLOG: * (glob) |
e1953a34c110
bundle: emit full snapshot as is, without doing a redelta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49768
diff
changeset
|
310 DBG-DELTAS: MANIFESTLOG: * (glob) |
e1953a34c110
bundle: emit full snapshot as is, without doing a redelta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49768
diff
changeset
|
311 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |
e1953a34c110
bundle: emit full snapshot as is, without doing a redelta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49768
diff
changeset
|
312 DBG-DELTAS: FILELOG:my-file.txt: rev=4: delta-base=4 is-cached=1 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - * (glob) |
e1953a34c110
bundle: emit full snapshot as is, without doing a redelta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49768
diff
changeset
|
313 |
49768
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
314 Check that "forced" behavior do not challenge the delta, even if it is bad. |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
315 --------------------------------------------------------------------------- |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
316 |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
317 The client does not challenge anything and applies the bizarre delta directly. |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
318 |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
319 Note: If the bundling process becomes smarter, this test might no longer work |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
320 (as the server won't be sending "bad" deltas anymore) and might need something |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
321 more subtle to test this behavior. |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
322 |
49777
e1953a34c110
bundle: emit full snapshot as is, without doing a redelta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49768
diff
changeset
|
323 $ hg bundle -R peer-bad-delta-with-full --all --config devel.bundle.delta=p1 all-p1.hg |
e1953a34c110
bundle: emit full snapshot as is, without doing a redelta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49768
diff
changeset
|
324 5 changesets found |
50805
23b0999f6201
compat: use cp -R in `test-revlog-delta-find.t` (issue6835)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50657
diff
changeset
|
325 $ cp -aR local-pre-pull-full local-forced-full-p1 |
49777
e1953a34c110
bundle: emit full snapshot as is, without doing a redelta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49768
diff
changeset
|
326 $ hg -R local-forced-full-p1 pull --quiet \ |
50207
f35cf52acabd
delta-find: rename `delta-reuse-policy` to `pulled-delta-reuse-policy`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49777
diff
changeset
|
327 > --config 'paths.*:pulled-delta-reuse-policy=forced' all-p1.hg |
49768
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
328 DBG-DELTAS: CHANGELOG: * (glob) |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
329 DBG-DELTAS: CHANGELOG: * (glob) |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
330 DBG-DELTAS: MANIFESTLOG: * (glob) |
bcae90c53def
delta-find: add a delta-reuse policy that blindly accepts incoming deltas
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49767
diff
changeset
|
331 DBG-DELTAS: MANIFESTLOG: * (glob) |
50657
e77ca247b85b
delta-find: fix pulled-delta-reuse-policy=forced behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50656
diff
changeset
|
332 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 is-cached=1 *search-rounds=0 try-count=0* (glob) |
e77ca247b85b
delta-find: fix pulled-delta-reuse-policy=forced behavior
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50656
diff
changeset
|
333 DBG-DELTAS: FILELOG:my-file.txt: rev=4: delta-base=3 is-cached=1 *search-rounds=0 try-count=0* (glob) |
50647
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
334 |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
335 Check that running "forced" on a non-general delta repository does not corrupt it |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
336 --------------------------------------------------------------------------------- |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
337 |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
338 Even if requested to be used, some of the delta in the revlog cannot be stored on a non-general delta repository. We check that the bundle application was correct. |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
339 |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
340 $ hg init \ |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
341 > --config format.usegeneraldelta=no \ |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
342 > --config format.sparse-revlog=no \ |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
343 > local-forced-full-p1-no-gd |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
344 $ hg debugformat -R local-forced-full-p1-no-gd | grep generaldelta |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
345 generaldelta: no |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
346 $ hg -R local-forced-full-p1-no-gd pull --quiet local-pre-pull-full \ |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
347 > --config debug.revlog.debug-delta=no |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
348 $ hg -R local-forced-full-p1-no-gd pull --quiet \ |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
349 > --config 'paths.*:pulled-delta-reuse-policy=forced' all-p1.hg |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
350 DBG-DELTAS: CHANGELOG: * (glob) |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
351 DBG-DELTAS: CHANGELOG: * (glob) |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
352 DBG-DELTAS: MANIFESTLOG: * (glob) |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
353 DBG-DELTAS: MANIFESTLOG: * (glob) |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
354 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=0 * - search-rounds=1 try-count=1 * (glob) |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
355 DBG-DELTAS: FILELOG:my-file.txt: rev=4: delta-base=4 * - search-rounds=1 try-count=1 * (glob) |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
356 $ hg -R local-forced-full-p1-no-gd verify |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
357 checking changesets |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
358 checking manifests |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
359 crosschecking files in changesets and manifests |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
360 checking files |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
361 checking dirstate |
7c5edf6fbf01
tests: check `pulled-delta-reuse-policy=forced` without general delta
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50207
diff
changeset
|
362 checked 5 changesets with 5 changes to 1 files |