##// END OF EJS Templates
tests: demonstrate crash on partial amend with copies in changesets...
Martin von Zweigbergk -
r49956:65eda809 stable
parent child Browse files
Show More
@@ -1,463 +1,472 b''
1 #testcases extra sidedata
1 #testcases extra sidedata
2
2
3 #if extra
3 #if extra
4 $ cat >> $HGRCPATH << EOF
4 $ cat >> $HGRCPATH << EOF
5 > [experimental]
5 > [experimental]
6 > copies.write-to=changeset-only
6 > copies.write-to=changeset-only
7 > copies.read-from=changeset-only
7 > copies.read-from=changeset-only
8 > [alias]
8 > [alias]
9 > changesetcopies = log -r . -T 'files: {files}
9 > changesetcopies = log -r . -T 'files: {files}
10 > {extras % "{ifcontains("files", key, "{key}: {value}\n")}"}
10 > {extras % "{ifcontains("files", key, "{key}: {value}\n")}"}
11 > {extras % "{ifcontains("copies", key, "{key}: {value}\n")}"}'
11 > {extras % "{ifcontains("copies", key, "{key}: {value}\n")}"}'
12 > EOF
12 > EOF
13 #endif
13 #endif
14
14
15 #if sidedata
15 #if sidedata
16 $ cat >> $HGRCPATH << EOF
16 $ cat >> $HGRCPATH << EOF
17 > [format]
17 > [format]
18 > exp-use-copies-side-data-changeset = yes
18 > exp-use-copies-side-data-changeset = yes
19 > EOF
19 > EOF
20 #endif
20 #endif
21
21
22 $ cat >> $HGRCPATH << EOF
22 $ cat >> $HGRCPATH << EOF
23 > [alias]
23 > [alias]
24 > showcopies = log -r . -T '{file_copies % "{source} -> {name}\n"}'
24 > showcopies = log -r . -T '{file_copies % "{source} -> {name}\n"}'
25 > [extensions]
25 > [extensions]
26 > rebase =
26 > rebase =
27 > split =
27 > split =
28 > EOF
28 > EOF
29
29
30 Check that copies are recorded correctly
30 Check that copies are recorded correctly
31
31
32 $ hg init repo
32 $ hg init repo
33 $ cd repo
33 $ cd repo
34 #if sidedata
34 #if sidedata
35 $ hg debugformat -v | egrep 'format-variant|revlog-v2|copies-sdc|changelog-v2'
35 $ hg debugformat -v | egrep 'format-variant|revlog-v2|copies-sdc|changelog-v2'
36 format-variant repo config default
36 format-variant repo config default
37 copies-sdc: yes yes no
37 copies-sdc: yes yes no
38 revlog-v2: no no no
38 revlog-v2: no no no
39 changelog-v2: yes yes no
39 changelog-v2: yes yes no
40 #else
40 #else
41 $ hg debugformat -v | egrep 'format-variant|revlog-v2|copies-sdc|changelog-v2'
41 $ hg debugformat -v | egrep 'format-variant|revlog-v2|copies-sdc|changelog-v2'
42 format-variant repo config default
42 format-variant repo config default
43 copies-sdc: no no no
43 copies-sdc: no no no
44 revlog-v2: no no no
44 revlog-v2: no no no
45 changelog-v2: no no no
45 changelog-v2: no no no
46 #endif
46 #endif
47 $ echo a > a
47 $ echo a > a
48 $ hg add a
48 $ hg add a
49 $ hg ci -m initial
49 $ hg ci -m initial
50 $ hg cp a b
50 $ hg cp a b
51 $ hg cp a c
51 $ hg cp a c
52 $ hg cp a d
52 $ hg cp a d
53 $ hg ci -m 'copy a to b, c, and d'
53 $ hg ci -m 'copy a to b, c, and d'
54
54
55 #if extra
55 #if extra
56
56
57 $ hg changesetcopies
57 $ hg changesetcopies
58 files: b c d
58 files: b c d
59 filesadded: 0
59 filesadded: 0
60 1
60 1
61 2
61 2
62
62
63 p1copies: 0\x00a (esc)
63 p1copies: 0\x00a (esc)
64 1\x00a (esc)
64 1\x00a (esc)
65 2\x00a (esc)
65 2\x00a (esc)
66 #else
66 #else
67 $ hg debugsidedata -c -v -- -1
67 $ hg debugsidedata -c -v -- -1
68 1 sidedata entries
68 1 sidedata entries
69 entry-0014 size 44
69 entry-0014 size 44
70 '\x00\x00\x00\x04\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x06\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x00abcd'
70 '\x00\x00\x00\x04\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x06\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x00abcd'
71 #endif
71 #endif
72
72
73 $ hg showcopies
73 $ hg showcopies
74 a -> b
74 a -> b
75 a -> c
75 a -> c
76 a -> d
76 a -> d
77
77
78 #if extra
78 #if extra
79
79
80 $ hg showcopies --config experimental.copies.read-from=compatibility
80 $ hg showcopies --config experimental.copies.read-from=compatibility
81 a -> b
81 a -> b
82 a -> c
82 a -> c
83 a -> d
83 a -> d
84 $ hg showcopies --config experimental.copies.read-from=filelog-only
84 $ hg showcopies --config experimental.copies.read-from=filelog-only
85
85
86 #endif
86 #endif
87
87
88 Check that renames are recorded correctly
88 Check that renames are recorded correctly
89
89
90 $ hg mv b b2
90 $ hg mv b b2
91 $ hg ci -m 'rename b to b2'
91 $ hg ci -m 'rename b to b2'
92
92
93 #if extra
93 #if extra
94
94
95 $ hg changesetcopies
95 $ hg changesetcopies
96 files: b b2
96 files: b b2
97 filesadded: 1
97 filesadded: 1
98 filesremoved: 0
98 filesremoved: 0
99
99
100 p1copies: 1\x00b (esc)
100 p1copies: 1\x00b (esc)
101
101
102 #else
102 #else
103 $ hg debugsidedata -c -v -- -1
103 $ hg debugsidedata -c -v -- -1
104 1 sidedata entries
104 1 sidedata entries
105 entry-0014 size 25
105 entry-0014 size 25
106 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x03\x00\x00\x00\x00bb2'
106 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x03\x00\x00\x00\x00bb2'
107 #endif
107 #endif
108
108
109 $ hg showcopies
109 $ hg showcopies
110 b -> b2
110 b -> b2
111
111
112
112
113 Rename onto existing file. This should get recorded in the changeset files list and in the extras,
113 Rename onto existing file. This should get recorded in the changeset files list and in the extras,
114 even though there is no filelog entry.
114 even though there is no filelog entry.
115
115
116 $ hg cp b2 c --force
116 $ hg cp b2 c --force
117 $ hg st --copies
117 $ hg st --copies
118 M c
118 M c
119 b2
119 b2
120
120
121 #if extra
121 #if extra
122
122
123 $ hg debugindex c
123 $ hg debugindex c
124 rev linkrev nodeid p1 p2
124 rev linkrev nodeid p1 p2
125 0 1 b789fdd96dc2 000000000000 000000000000
125 0 1 b789fdd96dc2 000000000000 000000000000
126
126
127 #else
127 #else
128
128
129 $ hg debugindex c
129 $ hg debugindex c
130 rev linkrev nodeid p1 p2
130 rev linkrev nodeid p1 p2
131 0 1 37d9b5d994ea 000000000000 000000000000
131 0 1 37d9b5d994ea 000000000000 000000000000
132
132
133 #endif
133 #endif
134
134
135
135
136 $ hg ci -m 'move b onto d'
136 $ hg ci -m 'move b onto d'
137
137
138 #if extra
138 #if extra
139
139
140 $ hg changesetcopies
140 $ hg changesetcopies
141 files: c
141 files: c
142
142
143 p1copies: 0\x00b2 (esc)
143 p1copies: 0\x00b2 (esc)
144
144
145 #else
145 #else
146 $ hg debugsidedata -c -v -- -1
146 $ hg debugsidedata -c -v -- -1
147 1 sidedata entries
147 1 sidedata entries
148 entry-0014 size 25
148 entry-0014 size 25
149 '\x00\x00\x00\x02\x00\x00\x00\x00\x02\x00\x00\x00\x00\x16\x00\x00\x00\x03\x00\x00\x00\x00b2c'
149 '\x00\x00\x00\x02\x00\x00\x00\x00\x02\x00\x00\x00\x00\x16\x00\x00\x00\x03\x00\x00\x00\x00b2c'
150 #endif
150 #endif
151
151
152 $ hg showcopies
152 $ hg showcopies
153 b2 -> c
153 b2 -> c
154
154
155 #if extra
155 #if extra
156
156
157 $ hg debugindex c
157 $ hg debugindex c
158 rev linkrev nodeid p1 p2
158 rev linkrev nodeid p1 p2
159 0 1 b789fdd96dc2 000000000000 000000000000
159 0 1 b789fdd96dc2 000000000000 000000000000
160
160
161 #else
161 #else
162
162
163 $ hg debugindex c
163 $ hg debugindex c
164 rev linkrev nodeid p1 p2
164 rev linkrev nodeid p1 p2
165 0 1 37d9b5d994ea 000000000000 000000000000
165 0 1 37d9b5d994ea 000000000000 000000000000
166 1 3 029625640347 000000000000 000000000000
166 1 3 029625640347 000000000000 000000000000
167
167
168 #endif
168 #endif
169
169
170 Create a merge commit with copying done during merge.
170 Create a merge commit with copying done during merge.
171
171
172 $ hg co 0
172 $ hg co 0
173 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
173 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
174 $ hg cp a e
174 $ hg cp a e
175 $ hg cp a f
175 $ hg cp a f
176 $ hg ci -m 'copy a to e and f'
176 $ hg ci -m 'copy a to e and f'
177 created new head
177 created new head
178 $ hg merge 3
178 $ hg merge 3
179 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
179 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
180 (branch merge, don't forget to commit)
180 (branch merge, don't forget to commit)
181 File 'a' exists on both sides, so 'g' could be recorded as being from p1 or p2, but we currently
181 File 'a' exists on both sides, so 'g' could be recorded as being from p1 or p2, but we currently
182 always record it as being from p1
182 always record it as being from p1
183 $ hg cp a g
183 $ hg cp a g
184 File 'd' exists only in p2, so 'h' should be from p2
184 File 'd' exists only in p2, so 'h' should be from p2
185 $ hg cp d h
185 $ hg cp d h
186 File 'f' exists only in p1, so 'i' should be from p1
186 File 'f' exists only in p1, so 'i' should be from p1
187 $ hg cp f i
187 $ hg cp f i
188 $ hg ci -m 'merge'
188 $ hg ci -m 'merge'
189
189
190 #if extra
190 #if extra
191
191
192 $ hg changesetcopies
192 $ hg changesetcopies
193 files: g h i
193 files: g h i
194 filesadded: 0
194 filesadded: 0
195 1
195 1
196 2
196 2
197
197
198 p1copies: 0\x00a (esc)
198 p1copies: 0\x00a (esc)
199 2\x00f (esc)
199 2\x00f (esc)
200 p2copies: 1\x00d (esc)
200 p2copies: 1\x00d (esc)
201
201
202 #else
202 #else
203 $ hg debugsidedata -c -v -- -1
203 $ hg debugsidedata -c -v -- -1
204 1 sidedata entries
204 1 sidedata entries
205 entry-0014 size 64
205 entry-0014 size 64
206 '\x00\x00\x00\x06\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x00\x07\x00\x00\x00\x05\x00\x00\x00\x01\x06\x00\x00\x00\x06\x00\x00\x00\x02adfghi'
206 '\x00\x00\x00\x06\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x00\x07\x00\x00\x00\x05\x00\x00\x00\x01\x06\x00\x00\x00\x06\x00\x00\x00\x02adfghi'
207 #endif
207 #endif
208
208
209 $ hg showcopies
209 $ hg showcopies
210 a -> g
210 a -> g
211 d -> h
211 d -> h
212 f -> i
212 f -> i
213
213
214 Test writing to both changeset and filelog
214 Test writing to both changeset and filelog
215
215
216 $ hg cp a j
216 $ hg cp a j
217 #if extra
217 #if extra
218 $ hg ci -m 'copy a to j' --config experimental.copies.write-to=compatibility
218 $ hg ci -m 'copy a to j' --config experimental.copies.write-to=compatibility
219 $ hg changesetcopies
219 $ hg changesetcopies
220 files: j
220 files: j
221 filesadded: 0
221 filesadded: 0
222 filesremoved:
222 filesremoved:
223
223
224 p1copies: 0\x00a (esc)
224 p1copies: 0\x00a (esc)
225 p2copies:
225 p2copies:
226 #else
226 #else
227 $ hg ci -m 'copy a to j'
227 $ hg ci -m 'copy a to j'
228 $ hg debugsidedata -c -v -- -1
228 $ hg debugsidedata -c -v -- -1
229 1 sidedata entries
229 1 sidedata entries
230 entry-0014 size 24
230 entry-0014 size 24
231 '\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00aj'
231 '\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00aj'
232 #endif
232 #endif
233 $ hg debugdata j 0
233 $ hg debugdata j 0
234 \x01 (esc)
234 \x01 (esc)
235 copy: a
235 copy: a
236 copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
236 copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
237 \x01 (esc)
237 \x01 (esc)
238 a
238 a
239 $ hg showcopies
239 $ hg showcopies
240 a -> j
240 a -> j
241 $ hg showcopies --config experimental.copies.read-from=compatibility
241 $ hg showcopies --config experimental.copies.read-from=compatibility
242 a -> j
242 a -> j
243 $ hg showcopies --config experimental.copies.read-from=filelog-only
243 $ hg showcopies --config experimental.copies.read-from=filelog-only
244 a -> j
244 a -> j
245 Existing copy information in the changeset gets removed on amend and writing
245 Existing copy information in the changeset gets removed on amend and writing
246 copy information on to the filelog
246 copy information on to the filelog
247 #if extra
247 #if extra
248 $ hg ci --amend -m 'copy a to j, v2' \
248 $ hg ci --amend -m 'copy a to j, v2' \
249 > --config experimental.copies.write-to=filelog-only
249 > --config experimental.copies.write-to=filelog-only
250 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob)
250 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob)
251 $ hg changesetcopies
251 $ hg changesetcopies
252 files: j
252 files: j
253
253
254 #else
254 #else
255 $ hg ci --amend -m 'copy a to j, v2'
255 $ hg ci --amend -m 'copy a to j, v2'
256 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob)
256 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob)
257 $ hg debugsidedata -c -v -- -1
257 $ hg debugsidedata -c -v -- -1
258 1 sidedata entries
258 1 sidedata entries
259 entry-0014 size 24
259 entry-0014 size 24
260 '\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00aj'
260 '\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00aj'
261 #endif
261 #endif
262 $ hg showcopies --config experimental.copies.read-from=filelog-only
262 $ hg showcopies --config experimental.copies.read-from=filelog-only
263 a -> j
263 a -> j
264 The entries should be written to extras even if they're empty (so the client
264 The entries should be written to extras even if they're empty (so the client
265 won't have to fall back to reading from filelogs)
265 won't have to fall back to reading from filelogs)
266 $ echo x >> j
266 $ echo x >> j
267 #if extra
267 #if extra
268 $ hg ci -m 'modify j' --config experimental.copies.write-to=compatibility
268 $ hg ci -m 'modify j' --config experimental.copies.write-to=compatibility
269 $ hg changesetcopies
269 $ hg changesetcopies
270 files: j
270 files: j
271 filesadded:
271 filesadded:
272 filesremoved:
272 filesremoved:
273
273
274 p1copies:
274 p1copies:
275 p2copies:
275 p2copies:
276 #else
276 #else
277 $ hg ci -m 'modify j'
277 $ hg ci -m 'modify j'
278 $ hg debugsidedata -c -v -- -1
278 $ hg debugsidedata -c -v -- -1
279 1 sidedata entries
279 1 sidedata entries
280 entry-0014 size 14
280 entry-0014 size 14
281 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00j'
281 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00j'
282 #endif
282 #endif
283
283
284 Test writing only to filelog
284 Test writing only to filelog
285
285
286 $ hg cp a k
286 $ hg cp a k
287 #if extra
287 #if extra
288 $ hg ci -m 'copy a to k' --config experimental.copies.write-to=filelog-only
288 $ hg ci -m 'copy a to k' --config experimental.copies.write-to=filelog-only
289
289
290 $ hg changesetcopies
290 $ hg changesetcopies
291 files: k
291 files: k
292
292
293 #else
293 #else
294 $ hg ci -m 'copy a to k'
294 $ hg ci -m 'copy a to k'
295 $ hg debugsidedata -c -v -- -1
295 $ hg debugsidedata -c -v -- -1
296 1 sidedata entries
296 1 sidedata entries
297 entry-0014 size 24
297 entry-0014 size 24
298 '\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ak'
298 '\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ak'
299 #endif
299 #endif
300
300
301 $ hg debugdata k 0
301 $ hg debugdata k 0
302 \x01 (esc)
302 \x01 (esc)
303 copy: a
303 copy: a
304 copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
304 copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
305 \x01 (esc)
305 \x01 (esc)
306 a
306 a
307 #if extra
307 #if extra
308 $ hg showcopies
308 $ hg showcopies
309
309
310 $ hg showcopies --config experimental.copies.read-from=compatibility
310 $ hg showcopies --config experimental.copies.read-from=compatibility
311 a -> k
311 a -> k
312 $ hg showcopies --config experimental.copies.read-from=filelog-only
312 $ hg showcopies --config experimental.copies.read-from=filelog-only
313 a -> k
313 a -> k
314 #else
314 #else
315 $ hg showcopies
315 $ hg showcopies
316 a -> k
316 a -> k
317 #endif
317 #endif
318
318
319 Existing copy information is preserved by amend
319 Existing copy information is preserved by amend
320 $ hg cp a l
320 $ hg cp a l
321 $ hg ci -m 'copy a to l'
321 $ hg ci -m 'copy a to l'
322 $ hg showcopies
322 $ hg showcopies
323 a -> l
323 a -> l
324 $ hg ci --amend -m 'new description'
324 $ hg ci --amend -m 'new description'
325 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob)
325 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob)
326 $ hg showcopies
326 $ hg showcopies
327 a -> l
327 a -> l
328
329 No crash on partial amend
330 $ hg st --change .
331 A l
332 $ echo modified >> a
333 $ hg rm l
334 $ hg commit --amend a 2>&1 | grep AttributeError
335 AttributeError: 'NoneType' object has no attribute 'renamed' (known-bad-output !)
336
328 $ cd ..
337 $ cd ..
329
338
330 Test rebasing a commit with copy information
339 Test rebasing a commit with copy information
331
340
332 $ hg init rebase-rename
341 $ hg init rebase-rename
333 $ cd rebase-rename
342 $ cd rebase-rename
334 $ echo a > a
343 $ echo a > a
335 $ hg ci -Aqm 'add a'
344 $ hg ci -Aqm 'add a'
336 $ echo a2 > a
345 $ echo a2 > a
337 $ hg ci -m 'modify a'
346 $ hg ci -m 'modify a'
338 $ hg co -q 0
347 $ hg co -q 0
339 $ hg mv a b
348 $ hg mv a b
340 $ hg ci -qm 'rename a to b'
349 $ hg ci -qm 'rename a to b'
341 Not only do we want this to run in-memory, it shouldn't fall back to
350 Not only do we want this to run in-memory, it shouldn't fall back to
342 on-disk merge (no conflicts), so we force it to be in-memory
351 on-disk merge (no conflicts), so we force it to be in-memory
343 with no fallback.
352 with no fallback.
344 $ hg rebase -d 1 --config rebase.experimental.inmemory=yes --config devel.rebase.force-in-memory-merge=yes
353 $ hg rebase -d 1 --config rebase.experimental.inmemory=yes --config devel.rebase.force-in-memory-merge=yes
345 rebasing 2:* tip "rename a to b" (glob)
354 rebasing 2:* tip "rename a to b" (glob)
346 merging a and b to b
355 merging a and b to b
347 saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/*-*-rebase.hg (glob)
356 saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/*-*-rebase.hg (glob)
348 $ hg st --change . --copies
357 $ hg st --change . --copies
349 A b
358 A b
350 a
359 a
351 R a
360 R a
352 $ cd ..
361 $ cd ..
353
362
354 Test splitting a commit
363 Test splitting a commit
355
364
356 $ hg init split
365 $ hg init split
357 $ cd split
366 $ cd split
358 $ echo a > a
367 $ echo a > a
359 $ echo b > b
368 $ echo b > b
360 $ hg ci -Aqm 'add a and b'
369 $ hg ci -Aqm 'add a and b'
361 $ echo a2 > a
370 $ echo a2 > a
362 $ hg mv b c
371 $ hg mv b c
363 $ hg ci -m 'modify a, move b to c'
372 $ hg ci -m 'modify a, move b to c'
364 $ hg --config ui.interactive=yes split <<EOF
373 $ hg --config ui.interactive=yes split <<EOF
365 > y
374 > y
366 > y
375 > y
367 > n
376 > n
368 > y
377 > y
369 > EOF
378 > EOF
370 diff --git a/a b/a
379 diff --git a/a b/a
371 1 hunks, 1 lines changed
380 1 hunks, 1 lines changed
372 examine changes to 'a'?
381 examine changes to 'a'?
373 (enter ? for help) [Ynesfdaq?] y
382 (enter ? for help) [Ynesfdaq?] y
374
383
375 @@ -1,1 +1,1 @@
384 @@ -1,1 +1,1 @@
376 -a
385 -a
377 +a2
386 +a2
378 record this change to 'a'?
387 record this change to 'a'?
379 (enter ? for help) [Ynesfdaq?] y
388 (enter ? for help) [Ynesfdaq?] y
380
389
381 diff --git a/b b/c
390 diff --git a/b b/c
382 rename from b
391 rename from b
383 rename to c
392 rename to c
384 examine changes to 'b' and 'c'?
393 examine changes to 'b' and 'c'?
385 (enter ? for help) [Ynesfdaq?] n
394 (enter ? for help) [Ynesfdaq?] n
386
395
387 created new head
396 created new head
388 diff --git a/b b/c
397 diff --git a/b b/c
389 rename from b
398 rename from b
390 rename to c
399 rename to c
391 examine changes to 'b' and 'c'?
400 examine changes to 'b' and 'c'?
392 (enter ? for help) [Ynesfdaq?] y
401 (enter ? for help) [Ynesfdaq?] y
393
402
394 saved backup bundle to $TESTTMP/split/.hg/strip-backup/*-*-split.hg (glob)
403 saved backup bundle to $TESTTMP/split/.hg/strip-backup/*-*-split.hg (glob)
395 $ cd ..
404 $ cd ..
396
405
397 Test committing half a rename
406 Test committing half a rename
398
407
399 $ hg init partial
408 $ hg init partial
400 $ cd partial
409 $ cd partial
401 $ echo a > a
410 $ echo a > a
402 $ hg ci -Aqm 'add a'
411 $ hg ci -Aqm 'add a'
403 $ hg mv a b
412 $ hg mv a b
404 $ hg ci -m 'remove a' a
413 $ hg ci -m 'remove a' a
405
414
406 #if sidedata
415 #if sidedata
407
416
408 Test upgrading/downgrading to sidedata storage
417 Test upgrading/downgrading to sidedata storage
409 ==============================================
418 ==============================================
410
419
411 downgrading
420 downgrading
412
421
413 $ hg debugformat -v | egrep 'format-variant|revlog-v2|copies-sdc|changelog-v2'
422 $ hg debugformat -v | egrep 'format-variant|revlog-v2|copies-sdc|changelog-v2'
414 format-variant repo config default
423 format-variant repo config default
415 copies-sdc: yes yes no
424 copies-sdc: yes yes no
416 revlog-v2: no no no
425 revlog-v2: no no no
417 changelog-v2: yes yes no
426 changelog-v2: yes yes no
418 $ hg debugsidedata -c -- 0
427 $ hg debugsidedata -c -- 0
419 1 sidedata entries
428 1 sidedata entries
420 entry-0014 size 14
429 entry-0014 size 14
421 $ hg debugsidedata -c -- 1
430 $ hg debugsidedata -c -- 1
422 1 sidedata entries
431 1 sidedata entries
423 entry-0014 size 14
432 entry-0014 size 14
424 $ hg debugsidedata -m -- 0
433 $ hg debugsidedata -m -- 0
425 $ cat << EOF > .hg/hgrc
434 $ cat << EOF > .hg/hgrc
426 > [format]
435 > [format]
427 > exp-use-copies-side-data-changeset = no
436 > exp-use-copies-side-data-changeset = no
428 > [experimental]
437 > [experimental]
429 > revlogv2 = enable-unstable-format-and-corrupt-my-data
438 > revlogv2 = enable-unstable-format-and-corrupt-my-data
430 > EOF
439 > EOF
431 $ hg debugupgraderepo --run --quiet --no-backup > /dev/null
440 $ hg debugupgraderepo --run --quiet --no-backup > /dev/null
432 $ hg debugformat -v | egrep 'format-variant|revlog-v2|copies-sdc|changelog-v2'
441 $ hg debugformat -v | egrep 'format-variant|revlog-v2|copies-sdc|changelog-v2'
433 format-variant repo config default
442 format-variant repo config default
434 copies-sdc: no no no
443 copies-sdc: no no no
435 revlog-v2: yes yes no
444 revlog-v2: yes yes no
436 changelog-v2: no no no
445 changelog-v2: no no no
437 $ hg debugsidedata -c -- 0
446 $ hg debugsidedata -c -- 0
438 $ hg debugsidedata -c -- 1
447 $ hg debugsidedata -c -- 1
439 $ hg debugsidedata -m -- 0
448 $ hg debugsidedata -m -- 0
440
449
441 upgrading
450 upgrading
442
451
443 $ cat << EOF > .hg/hgrc
452 $ cat << EOF > .hg/hgrc
444 > [format]
453 > [format]
445 > exp-use-copies-side-data-changeset = yes
454 > exp-use-copies-side-data-changeset = yes
446 > EOF
455 > EOF
447 $ hg debugupgraderepo --run --quiet --no-backup > /dev/null
456 $ hg debugupgraderepo --run --quiet --no-backup > /dev/null
448 $ hg debugformat -v | egrep 'format-variant|revlog-v2|copies-sdc|changelog-v2'
457 $ hg debugformat -v | egrep 'format-variant|revlog-v2|copies-sdc|changelog-v2'
449 format-variant repo config default
458 format-variant repo config default
450 copies-sdc: yes yes no
459 copies-sdc: yes yes no
451 revlog-v2: no no no
460 revlog-v2: no no no
452 changelog-v2: yes yes no
461 changelog-v2: yes yes no
453 $ hg debugsidedata -c -- 0
462 $ hg debugsidedata -c -- 0
454 1 sidedata entries
463 1 sidedata entries
455 entry-0014 size 14
464 entry-0014 size 14
456 $ hg debugsidedata -c -- 1
465 $ hg debugsidedata -c -- 1
457 1 sidedata entries
466 1 sidedata entries
458 entry-0014 size 14
467 entry-0014 size 14
459 $ hg debugsidedata -m -- 0
468 $ hg debugsidedata -m -- 0
460
469
461 #endif
470 #endif
462
471
463 $ cd ..
472 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now