Debian Codegraph @

tests/test-pullling-to-general-delta.t

raw
1 ============================================================================
2 Pulling from modern to a non-general delta target (and other related checks)
3 ============================================================================
4
5 There is various issue that can arise when we update the code with modern
6 storage in mind while working on delta processing. So this file is meant for
7 various scenario that might break in the future or have break in the past.
8
9 Setup
10 =====
11
12 Create a modern server with an older clone
13
14 $ cat << EOF >> $HGRCPATH
15 > [command-templates]
16 > log = "{desc} {tags}\n"
17 > EOF
18
19 $ hg init server
20
21 $ hg clone --quiet --pull server client --config format.usegeneraldelta=no
22 $ hg debugformat -R client generaldelta
23 format-variant repo
24 generaldelta: no
25
26 Create some complexe history
27
28 $ cd server
29 $ hg debugbuilddag -n '.+3:a$.+5:b/a:k$.+7:c/b:l$.+6:d/a:m<k+6/l+1/m'
30 $ hg log -G
31 o r36 tip
32 |\
33 | o r35
34 | |
35 | o r34
36 | |\
37 | | o r33
38 | | |
39 | | o r32
40 | | |
41 | | o r31
42 | | |
43 | | o r30
44 | | |
45 | | o r29
46 | | |
47 | | o r28
48 | | |
49 o | | r27 m
50 |\ \ \
51 | o | | r26 d
52 | | | |
53 | o | | r25
54 | | | |
55 | o | | r24
56 | | | |
57 | o | | r23
58 | | | |
59 | o | | r22
60 | | | |
61 | o | | r21
62 | | | |
63 | o | | r20
64 | / /
65 | o | r19 l
66 | |\ \
67 | | o | r18 c
68 | | | |
69 | | o | r17
70 | | | |
71 | | o | r16
72 | | | |
73 | | o | r15
74 | | | |
75 | | o | r14
76 | | | |
77 | | o | r13
78 | | | |
79 | | o | r12
80 | | | |
81 | | o | r11
82 | | /
83 +---o r10 k
84 | |/
85 | o r9 b
86 | |
87 | o r8
88 | |
89 | o r7
90 | |
91 | o r6
92 | |
93 | o r5
94 | |
95 | o r4
96 |
97 o r3 a
98 |
99 o r2
100 |
101 o r1
102 |
103 o r0
104
105 $ cd ..
106
107
108 Pull it in the client
109 =====================
110
111
112 pull with default value
113 -----------------------
114
115 $ cp -R client client-simple-pull
116 $ hg -R client-simple-pull pull
117 pulling from $TESTTMP/server
118 requesting all changes
119 adding changesets
120 adding manifests
121 adding file changes
122 added 37 changesets with 37 changes to 37 files
123 new changesets 61246295ee1e:b4b117cbbcf3
124 (run 'hg update' to get a working copy)
125 $ hg -R client-simple-pull verify
126 checking changesets
127 checking manifests
128 crosschecking files in changesets and manifests
129 checking files
130 checking dirstate
131 checked 37 changesets with 37 changes to 37 files
132
133
134 pull with "no-reuse" policy
135 ---------------------------
136
137 $ cp -R client client-no-reuse
138 $ hg -R client-no-reuse pull --config paths.default:pulled-delta-reuse-policy=no-reuse
139 pulling from $TESTTMP/server
140 requesting all changes
141 adding changesets
142 adding manifests
143 adding file changes
144 added 37 changesets with 37 changes to 37 files
145 new changesets 61246295ee1e:b4b117cbbcf3
146 (run 'hg update' to get a working copy)
147 $ hg -R client-no-reuse verify
148 checking changesets
149 checking manifests
150 crosschecking files in changesets and manifests
151 checking files
152 checking dirstate
153 checked 37 changesets with 37 changes to 37 files
154
155
156 pull with "try-base" policy
157 ---------------------------
158
159 $ cp -R client client-try-base
160 $ hg -R client-try-base pull --config paths.default:pulled-delta-reuse-policy=try-base
161 pulling from $TESTTMP/server
162 requesting all changes
163 adding changesets
164 adding manifests
165 adding file changes
166 added 37 changesets with 37 changes to 37 files
167 new changesets 61246295ee1e:b4b117cbbcf3
168 (run 'hg update' to get a working copy)
169 $ hg -R client-try-base verify
170 checking changesets
171 checking manifests
172 crosschecking files in changesets and manifests
173 checking files
174 checking dirstate
175 checked 37 changesets with 37 changes to 37 files
176
177
178 pull with "forced" policy
179 -------------------------
180
181 $ cp -R client client-forced
182 $ hg -R client-forced paths --config paths.default:pulled-delta-reuse-policy=forced
183 default = $TESTTMP/server
184 default:pulled-delta-reuse-policy = forced
185 $ hg -R client-forced pull --config paths.default:pulled-delta-reuse-policy=forced
186 pulling from $TESTTMP/server
187 requesting all changes
188 adding changesets
189 adding manifests
190 adding file changes
191 added 37 changesets with 37 changes to 37 files
192 new changesets 61246295ee1e:b4b117cbbcf3
193 (run 'hg update' to get a working copy)
194 $ hg -R client-forced verify
195 checking changesets
196 checking manifests
197 crosschecking files in changesets and manifests
198 checking files
199 checking dirstate
200 checked 37 changesets with 37 changes to 37 files