Show More
@@ -1,607 +1,622 b'' | |||
|
1 | 1 | This file focuses mainly on updating largefiles in the working |
|
2 | 2 | directory (and ".hg/largefiles/dirstate") |
|
3 | 3 | |
|
4 | 4 | $ cat >> $HGRCPATH <<EOF |
|
5 | 5 | > [ui] |
|
6 | 6 | > merge = internal:fail |
|
7 | 7 | > [extensions] |
|
8 | 8 | > largefiles = |
|
9 | 9 | > EOF |
|
10 | 10 | |
|
11 | 11 | $ hg init repo |
|
12 | 12 | $ cd repo |
|
13 | 13 | |
|
14 | 14 | $ echo large1 > large1 |
|
15 | 15 | $ echo large2 > large2 |
|
16 | 16 | $ hg add --large large1 large2 |
|
17 | 17 | $ echo normal1 > normal1 |
|
18 | 18 | $ hg add normal1 |
|
19 | 19 | $ hg commit -m '#0' |
|
20 | 20 | $ echo 'large1 in #1' > large1 |
|
21 | 21 | $ echo 'normal1 in #1' > normal1 |
|
22 | 22 | $ hg commit -m '#1' |
|
23 | 23 | $ hg update -q -C 0 |
|
24 | 24 | $ echo 'large2 in #2' > large2 |
|
25 | 25 | $ hg commit -m '#2' |
|
26 | 26 | created new head |
|
27 | 27 | |
|
28 | Test that lfdirstate keeps track of last modification of largefiles and | |
|
29 | prevents unnecessary hashing of content - also after linear/noop update | |
|
30 | ||
|
31 | $ sleep 1 | |
|
32 | $ hg st | |
|
33 | $ hg debugdirstate --large --nodate | |
|
34 | n 644 7 large1 | |
|
35 | n 644 13 large2 | |
|
36 | $ hg up | |
|
37 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
38 | $ hg debugdirstate --large --nodate | |
|
39 | n 0 -1 large1 | |
|
40 | n 0 -1 large2 | |
|
41 | BAD: ^^ | |
|
42 | ||
|
28 | 43 | Test that "hg merge" updates largefiles from "other" correctly |
|
29 | 44 | |
|
30 | 45 | (getting largefiles from "other" normally) |
|
31 | 46 | |
|
32 | 47 | $ hg status -A large1 |
|
33 | 48 | C large1 |
|
34 | 49 | $ cat large1 |
|
35 | 50 | large1 |
|
36 | 51 | $ cat .hglf/large1 |
|
37 | 52 | 4669e532d5b2c093a78eca010077e708a071bb64 |
|
38 | 53 | $ hg merge --config debug.dirstate.delaywrite=2 |
|
39 | 54 | getting changed largefiles |
|
40 | 55 | 1 largefiles updated, 0 removed |
|
41 | 56 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
42 | 57 | (branch merge, don't forget to commit) |
|
43 | 58 | $ hg status -A large1 |
|
44 | 59 | M large1 |
|
45 | 60 | $ cat large1 |
|
46 | 61 | large1 in #1 |
|
47 | 62 | $ cat .hglf/large1 |
|
48 | 63 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
49 | 64 | $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]' |
|
50 | 65 | -4669e532d5b2c093a78eca010077e708a071bb64 |
|
51 | 66 | +58e24f733a964da346e2407a2bee99d9001184f5 |
|
52 | 67 | |
|
53 | 68 | (getting largefiles from "other" via conflict prompt) |
|
54 | 69 | |
|
55 | 70 | $ hg update -q -C 2 |
|
56 | 71 | $ echo 'large1 in #3' > large1 |
|
57 | 72 | $ echo 'normal1 in #3' > normal1 |
|
58 | 73 | $ hg commit -m '#3' |
|
59 | 74 | $ cat .hglf/large1 |
|
60 | 75 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
61 | 76 | $ hg merge --config debug.dirstate.delaywrite=2 --config ui.interactive=True <<EOF |
|
62 | 77 | > o |
|
63 | 78 | > EOF |
|
64 | 79 | largefile large1 has a merge conflict |
|
65 | 80 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
66 | 81 | keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or |
|
67 | 82 | take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o |
|
68 | 83 | merging normal1 |
|
69 | 84 | warning: conflicts during merge. |
|
70 | 85 | merging normal1 incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
71 | 86 | getting changed largefiles |
|
72 | 87 | 1 largefiles updated, 0 removed |
|
73 | 88 | 0 files updated, 1 files merged, 0 files removed, 1 files unresolved |
|
74 | 89 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
75 | 90 | [1] |
|
76 | 91 | $ hg status -A large1 |
|
77 | 92 | M large1 |
|
78 | 93 | $ cat large1 |
|
79 | 94 | large1 in #1 |
|
80 | 95 | $ cat .hglf/large1 |
|
81 | 96 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
82 | 97 | |
|
83 | 98 | Test that "hg revert -r REV" updates largefiles from "REV" correctly |
|
84 | 99 | |
|
85 | 100 | $ hg update -q -C 3 |
|
86 | 101 | $ hg status -A large1 |
|
87 | 102 | C large1 |
|
88 | 103 | $ cat large1 |
|
89 | 104 | large1 in #3 |
|
90 | 105 | $ cat .hglf/large1 |
|
91 | 106 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
92 | 107 | $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]' |
|
93 | 108 | -4669e532d5b2c093a78eca010077e708a071bb64 |
|
94 | 109 | +58e24f733a964da346e2407a2bee99d9001184f5 |
|
95 | 110 | $ hg revert --no-backup -r 1 --config debug.dirstate.delaywrite=2 large1 |
|
96 | 111 | $ hg status -A large1 |
|
97 | 112 | M large1 |
|
98 | 113 | $ cat large1 |
|
99 | 114 | large1 in #1 |
|
100 | 115 | $ cat .hglf/large1 |
|
101 | 116 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
102 | 117 | |
|
103 | 118 | Test that "hg rollback" restores status of largefiles correctly |
|
104 | 119 | |
|
105 | 120 | $ hg update -C -q |
|
106 | 121 | $ hg remove large1 |
|
107 | 122 | $ test -f .hglf/large1 |
|
108 | 123 | [1] |
|
109 | 124 | $ hg forget large2 |
|
110 | 125 | $ test -f .hglf/large2 |
|
111 | 126 | [1] |
|
112 | 127 | $ echo largeX > largeX |
|
113 | 128 | $ hg add --large largeX |
|
114 | 129 | $ cat .hglf/largeX |
|
115 | 130 | |
|
116 | 131 | $ hg commit -m 'will be rollback-ed soon' |
|
117 | 132 | $ echo largeY > largeY |
|
118 | 133 | $ hg add --large largeY |
|
119 | 134 | #if windows |
|
120 | 135 | $ hg status -A large1 |
|
121 | 136 | large1: * (glob) |
|
122 | 137 | #else |
|
123 | 138 | $ hg status -A large1 |
|
124 | 139 | large1: No such file or directory |
|
125 | 140 | #endif |
|
126 | 141 | $ hg status -A large2 |
|
127 | 142 | ? large2 |
|
128 | 143 | $ hg status -A largeX |
|
129 | 144 | C largeX |
|
130 | 145 | $ hg status -A largeY |
|
131 | 146 | A largeY |
|
132 | 147 | $ hg rollback |
|
133 | 148 | repository tip rolled back to revision 3 (undo commit) |
|
134 | 149 | working directory now based on revision 3 |
|
135 | 150 | $ hg status -A large1 |
|
136 | 151 | R large1 |
|
137 | 152 | $ test -f .hglf/large1 |
|
138 | 153 | [1] |
|
139 | 154 | $ hg status -A large2 |
|
140 | 155 | R large2 |
|
141 | 156 | $ test -f .hglf/large2 |
|
142 | 157 | [1] |
|
143 | 158 | $ hg status -A largeX |
|
144 | 159 | A largeX |
|
145 | 160 | $ cat .hglf/largeX |
|
146 | 161 | |
|
147 | 162 | $ hg status -A largeY |
|
148 | 163 | ? largeY |
|
149 | 164 | $ test -f .hglf/largeY |
|
150 | 165 | [1] |
|
151 | 166 | |
|
152 | 167 | Test that "hg rollback" restores standins correctly |
|
153 | 168 | |
|
154 | 169 | $ hg commit -m 'will be rollback-ed soon' |
|
155 | 170 | $ hg update -q -C 2 |
|
156 | 171 | $ cat large1 |
|
157 | 172 | large1 |
|
158 | 173 | $ cat .hglf/large1 |
|
159 | 174 | 4669e532d5b2c093a78eca010077e708a071bb64 |
|
160 | 175 | $ cat large2 |
|
161 | 176 | large2 in #2 |
|
162 | 177 | $ cat .hglf/large2 |
|
163 | 178 | 3cfce6277e7668985707b6887ce56f9f62f6ccd9 |
|
164 | 179 | |
|
165 | 180 | $ hg rollback -q -f |
|
166 | 181 | $ cat large1 |
|
167 | 182 | large1 |
|
168 | 183 | $ cat .hglf/large1 |
|
169 | 184 | 4669e532d5b2c093a78eca010077e708a071bb64 |
|
170 | 185 | $ cat large2 |
|
171 | 186 | large2 in #2 |
|
172 | 187 | $ cat .hglf/large2 |
|
173 | 188 | 3cfce6277e7668985707b6887ce56f9f62f6ccd9 |
|
174 | 189 | |
|
175 | 190 | (rollback the parent of the working directory, when the parent of it |
|
176 | 191 | is not branch-tip) |
|
177 | 192 | |
|
178 | 193 | $ hg update -q -C 1 |
|
179 | 194 | $ cat .hglf/large1 |
|
180 | 195 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
181 | 196 | $ cat .hglf/large2 |
|
182 | 197 | 1deebade43c8c498a3c8daddac0244dc55d1331d |
|
183 | 198 | |
|
184 | 199 | $ echo normalX > normalX |
|
185 | 200 | $ hg add normalX |
|
186 | 201 | $ hg commit -m 'will be rollback-ed soon' |
|
187 | 202 | $ hg rollback -q |
|
188 | 203 | |
|
189 | 204 | $ cat .hglf/large1 |
|
190 | 205 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
191 | 206 | $ cat .hglf/large2 |
|
192 | 207 | 1deebade43c8c498a3c8daddac0244dc55d1331d |
|
193 | 208 | |
|
194 | 209 | Test that "hg status" shows status of largefiles correctly just after |
|
195 | 210 | automated commit like rebase/transplant |
|
196 | 211 | |
|
197 | 212 | $ cat >> .hg/hgrc <<EOF |
|
198 | 213 | > [extensions] |
|
199 | 214 | > rebase = |
|
200 | 215 | > strip = |
|
201 | 216 | > transplant = |
|
202 | 217 | > EOF |
|
203 | 218 | $ hg update -q -C 1 |
|
204 | 219 | $ hg remove large1 |
|
205 | 220 | $ echo largeX > largeX |
|
206 | 221 | $ hg add --large largeX |
|
207 | 222 | $ hg commit -m '#4' |
|
208 | 223 | |
|
209 | 224 | $ hg rebase -s 1 -d 2 --keep |
|
210 | 225 | #if windows |
|
211 | 226 | $ hg status -A large1 |
|
212 | 227 | large1: * (glob) |
|
213 | 228 | #else |
|
214 | 229 | $ hg status -A large1 |
|
215 | 230 | large1: No such file or directory |
|
216 | 231 | #endif |
|
217 | 232 | $ hg status -A largeX |
|
218 | 233 | C largeX |
|
219 | 234 | $ hg strip -q 5 |
|
220 | 235 | |
|
221 | 236 | $ hg update -q -C 2 |
|
222 | 237 | $ hg transplant -q 1 4 |
|
223 | 238 | #if windows |
|
224 | 239 | $ hg status -A large1 |
|
225 | 240 | large1: * (glob) |
|
226 | 241 | #else |
|
227 | 242 | $ hg status -A large1 |
|
228 | 243 | large1: No such file or directory |
|
229 | 244 | #endif |
|
230 | 245 | $ hg status -A largeX |
|
231 | 246 | C largeX |
|
232 | 247 | $ hg strip -q 5 |
|
233 | 248 | |
|
234 | 249 | $ hg update -q -C 2 |
|
235 | 250 | $ hg transplant -q --merge 1 --merge 4 |
|
236 | 251 | #if windows |
|
237 | 252 | $ hg status -A large1 |
|
238 | 253 | large1: * (glob) |
|
239 | 254 | #else |
|
240 | 255 | $ hg status -A large1 |
|
241 | 256 | large1: No such file or directory |
|
242 | 257 | #endif |
|
243 | 258 | $ hg status -A largeX |
|
244 | 259 | C largeX |
|
245 | 260 | $ hg strip -q 5 |
|
246 | 261 | |
|
247 | 262 | Test that linear merge can detect modification (and conflict) correctly |
|
248 | 263 | |
|
249 | 264 | (linear merge without conflict) |
|
250 | 265 | |
|
251 | 266 | $ echo 'large2 for linear merge (no conflict)' > large2 |
|
252 | 267 | $ hg update 3 --config debug.dirstate.delaywrite=2 |
|
253 | 268 | getting changed largefiles |
|
254 | 269 | 1 largefiles updated, 0 removed |
|
255 | 270 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
256 | 271 | $ hg status -A large2 |
|
257 | 272 | M large2 |
|
258 | 273 | $ cat large2 |
|
259 | 274 | large2 for linear merge (no conflict) |
|
260 | 275 | $ cat .hglf/large2 |
|
261 | 276 | 9c4bf8f1b33536d6e5f89447e10620cfe52ea710 |
|
262 | 277 | |
|
263 | 278 | (linear merge with conflict, choosing "other") |
|
264 | 279 | |
|
265 | 280 | $ hg update -q -C 2 |
|
266 | 281 | $ echo 'large1 for linear merge (conflict)' > large1 |
|
267 | 282 | $ hg update 3 --config ui.interactive=True <<EOF |
|
268 | 283 | > o |
|
269 | 284 | > EOF |
|
270 | 285 | largefile large1 has a merge conflict |
|
271 | 286 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
272 | 287 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or |
|
273 | 288 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? o |
|
274 | 289 | getting changed largefiles |
|
275 | 290 | 1 largefiles updated, 0 removed |
|
276 | 291 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
277 | 292 | $ hg status -A large1 |
|
278 | 293 | C large1 |
|
279 | 294 | $ cat large1 |
|
280 | 295 | large1 in #3 |
|
281 | 296 | $ cat .hglf/large1 |
|
282 | 297 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
283 | 298 | |
|
284 | 299 | (linear merge with conflict, choosing "local") |
|
285 | 300 | |
|
286 | 301 | $ hg update -q -C 2 |
|
287 | 302 | $ echo 'large1 for linear merge (conflict)' > large1 |
|
288 | 303 | $ hg update 3 --config debug.dirstate.delaywrite=2 |
|
289 | 304 | largefile large1 has a merge conflict |
|
290 | 305 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
291 | 306 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or |
|
292 | 307 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l |
|
293 | 308 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
294 | 309 | $ hg status -A large1 |
|
295 | 310 | M large1 |
|
296 | 311 | $ cat large1 |
|
297 | 312 | large1 for linear merge (conflict) |
|
298 | 313 | $ cat .hglf/large1 |
|
299 | 314 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 |
|
300 | 315 | |
|
301 | 316 | Test a linear merge to a revision containing same-name normal file |
|
302 | 317 | |
|
303 | 318 | $ hg update -q -C 3 |
|
304 | 319 | $ hg remove large2 |
|
305 | 320 | $ echo 'large2 as normal file' > large2 |
|
306 | 321 | $ hg add large2 |
|
307 | 322 | $ echo 'large3 as normal file' > large3 |
|
308 | 323 | $ hg add large3 |
|
309 | 324 | $ hg commit -m '#5' |
|
310 | 325 | $ hg manifest |
|
311 | 326 | .hglf/large1 |
|
312 | 327 | large2 |
|
313 | 328 | large3 |
|
314 | 329 | normal1 |
|
315 | 330 | |
|
316 | 331 | (modified largefile is already switched to normal) |
|
317 | 332 | |
|
318 | 333 | $ hg update -q -C 2 |
|
319 | 334 | $ echo 'modified large2 for linear merge' > large2 |
|
320 | 335 | $ hg update -q 5 |
|
321 | 336 | local changed .hglf/large2 which remote deleted |
|
322 | 337 | use (c)hanged version or (d)elete? c |
|
323 | 338 | remote turned local largefile large2 into a normal file |
|
324 | 339 | keep (l)argefile or use (n)ormal file? l |
|
325 | 340 | $ hg debugdirstate --nodates | grep large2 |
|
326 | 341 | a 0 -1 .hglf/large2 |
|
327 | 342 | r 0 0 large2 |
|
328 | 343 | $ hg status -A large2 |
|
329 | 344 | A large2 |
|
330 | 345 | $ cat large2 |
|
331 | 346 | modified large2 for linear merge |
|
332 | 347 | |
|
333 | 348 | (added largefile is already committed as normal) |
|
334 | 349 | |
|
335 | 350 | $ hg update -q -C 2 |
|
336 | 351 | $ echo 'large3 as large file for linear merge' > large3 |
|
337 | 352 | $ hg add --large large3 |
|
338 | 353 | $ hg update -q 5 |
|
339 | 354 | remote turned local largefile large3 into a normal file |
|
340 | 355 | keep (l)argefile or use (n)ormal file? l |
|
341 | 356 | $ hg debugdirstate --nodates | grep large3 |
|
342 | 357 | a 0 -1 .hglf/large3 |
|
343 | 358 | r 0 0 large3 |
|
344 | 359 | $ hg status -A large3 |
|
345 | 360 | A large3 |
|
346 | 361 | $ cat large3 |
|
347 | 362 | large3 as large file for linear merge |
|
348 | 363 | $ rm -f large3 .hglf/large3 |
|
349 | 364 | |
|
350 | 365 | Test that the internal linear merging works correctly |
|
351 | 366 | (both heads are stripped to keep pairing of revision number and commit log) |
|
352 | 367 | |
|
353 | 368 | $ hg update -q -C 2 |
|
354 | 369 | $ hg strip 3 4 |
|
355 | 370 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9530e27857f7-backup.hg (glob) |
|
356 | 371 | $ mv .hg/strip-backup/9530e27857f7-backup.hg $TESTTMP |
|
357 | 372 | |
|
358 | 373 | (internal linear merging at "hg pull --update") |
|
359 | 374 | |
|
360 | 375 | $ echo 'large1 for linear merge (conflict)' > large1 |
|
361 | 376 | $ echo 'large2 for linear merge (conflict with normal file)' > large2 |
|
362 | 377 | $ hg pull --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-backup.hg |
|
363 | 378 | pulling from $TESTTMP/9530e27857f7-backup.hg (glob) |
|
364 | 379 | searching for changes |
|
365 | 380 | adding changesets |
|
366 | 381 | adding manifests |
|
367 | 382 | adding file changes |
|
368 | 383 | added 3 changesets with 5 changes to 5 files |
|
369 | 384 | local changed .hglf/large2 which remote deleted |
|
370 | 385 | use (c)hanged version or (d)elete? c |
|
371 | 386 | remote turned local largefile large2 into a normal file |
|
372 | 387 | keep (l)argefile or use (n)ormal file? l |
|
373 | 388 | largefile large1 has a merge conflict |
|
374 | 389 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
375 | 390 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or |
|
376 | 391 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l |
|
377 | 392 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
378 | 393 | |
|
379 | 394 | $ hg status -A large1 |
|
380 | 395 | M large1 |
|
381 | 396 | $ cat large1 |
|
382 | 397 | large1 for linear merge (conflict) |
|
383 | 398 | $ cat .hglf/large1 |
|
384 | 399 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 |
|
385 | 400 | $ hg status -A large2 |
|
386 | 401 | A large2 |
|
387 | 402 | $ cat large2 |
|
388 | 403 | large2 for linear merge (conflict with normal file) |
|
389 | 404 | $ cat .hglf/large2 |
|
390 | 405 | d7591fe9be0f6227d90bddf3e4f52ff41fc1f544 |
|
391 | 406 | |
|
392 | 407 | (internal linear merging at "hg unbundle --update") |
|
393 | 408 | |
|
394 | 409 | $ hg update -q -C 2 |
|
395 | 410 | $ hg rollback -q |
|
396 | 411 | |
|
397 | 412 | $ echo 'large1 for linear merge (conflict)' > large1 |
|
398 | 413 | $ echo 'large2 for linear merge (conflict with normal file)' > large2 |
|
399 | 414 | $ hg unbundle --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-backup.hg |
|
400 | 415 | adding changesets |
|
401 | 416 | adding manifests |
|
402 | 417 | adding file changes |
|
403 | 418 | added 3 changesets with 5 changes to 5 files |
|
404 | 419 | local changed .hglf/large2 which remote deleted |
|
405 | 420 | use (c)hanged version or (d)elete? c |
|
406 | 421 | remote turned local largefile large2 into a normal file |
|
407 | 422 | keep (l)argefile or use (n)ormal file? l |
|
408 | 423 | largefile large1 has a merge conflict |
|
409 | 424 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
410 | 425 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or |
|
411 | 426 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l |
|
412 | 427 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
413 | 428 | |
|
414 | 429 | $ hg status -A large1 |
|
415 | 430 | M large1 |
|
416 | 431 | $ cat large1 |
|
417 | 432 | large1 for linear merge (conflict) |
|
418 | 433 | $ cat .hglf/large1 |
|
419 | 434 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 |
|
420 | 435 | $ hg status -A large2 |
|
421 | 436 | A large2 |
|
422 | 437 | $ cat large2 |
|
423 | 438 | large2 for linear merge (conflict with normal file) |
|
424 | 439 | $ cat .hglf/large2 |
|
425 | 440 | d7591fe9be0f6227d90bddf3e4f52ff41fc1f544 |
|
426 | 441 | |
|
427 | 442 | (internal linear merging in subrepo at "hg update") |
|
428 | 443 | |
|
429 | 444 | $ cd .. |
|
430 | 445 | $ hg init subparent |
|
431 | 446 | $ cd subparent |
|
432 | 447 | |
|
433 | 448 | $ hg clone -q -u 2 ../repo sub |
|
434 | 449 | $ cat > .hgsub <<EOF |
|
435 | 450 | > sub = sub |
|
436 | 451 | > EOF |
|
437 | 452 | $ hg add .hgsub |
|
438 | 453 | $ hg commit -m '#0@parent' |
|
439 | 454 | $ cat .hgsubstate |
|
440 | 455 | f74e50bd9e5594b7cf1e6c5cbab86ddd25f3ca2f sub |
|
441 | 456 | $ hg -R sub update -q |
|
442 | 457 | $ hg commit -m '#1@parent' |
|
443 | 458 | $ cat .hgsubstate |
|
444 | 459 | d65e59e952a9638e2ce863b41a420ca723dd3e8d sub |
|
445 | 460 | $ hg update -q 0 |
|
446 | 461 | |
|
447 | 462 | $ echo 'large1 for linear merge (conflict)' > sub/large1 |
|
448 | 463 | $ echo 'large2 for linear merge (conflict with normal file)' > sub/large2 |
|
449 | 464 | $ hg update --config ui.interactive=True --config debug.dirstate.delaywrite=2 <<EOF |
|
450 | 465 | > m |
|
451 | 466 | > r |
|
452 | 467 | > c |
|
453 | 468 | > l |
|
454 | 469 | > l |
|
455 | 470 | > EOF |
|
456 | 471 | subrepository sub diverged (local revision: f74e50bd9e55, remote revision: d65e59e952a9) |
|
457 | 472 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
458 | 473 | subrepository sources for sub differ (in checked out version) |
|
459 | 474 | use (l)ocal source (f74e50bd9e55) or (r)emote source (d65e59e952a9)? r |
|
460 | 475 | local changed .hglf/large2 which remote deleted |
|
461 | 476 | use (c)hanged version or (d)elete? c |
|
462 | 477 | remote turned local largefile large2 into a normal file |
|
463 | 478 | keep (l)argefile or use (n)ormal file? l |
|
464 | 479 | largefile large1 has a merge conflict |
|
465 | 480 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
466 | 481 | keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or |
|
467 | 482 | take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l |
|
468 | 483 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
469 | 484 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
470 | 485 | |
|
471 | 486 | $ hg -R sub status -A sub/large1 |
|
472 | 487 | M sub/large1 |
|
473 | 488 | $ cat sub/large1 |
|
474 | 489 | large1 for linear merge (conflict) |
|
475 | 490 | $ cat sub/.hglf/large1 |
|
476 | 491 | ba94c2efe5b7c5e0af8d189295ce00553b0612b7 |
|
477 | 492 | $ hg -R sub status -A sub/large2 |
|
478 | 493 | A sub/large2 |
|
479 | 494 | $ cat sub/large2 |
|
480 | 495 | large2 for linear merge (conflict with normal file) |
|
481 | 496 | $ cat sub/.hglf/large2 |
|
482 | 497 | d7591fe9be0f6227d90bddf3e4f52ff41fc1f544 |
|
483 | 498 | |
|
484 | 499 | $ cd .. |
|
485 | 500 | $ cd repo |
|
486 | 501 | |
|
487 | 502 | Test that rebase updates largefiles in the working directory even if |
|
488 | 503 | it is aborted by conflict. |
|
489 | 504 | |
|
490 | 505 | $ hg update -q -C 3 |
|
491 | 506 | $ cat .hglf/large1 |
|
492 | 507 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
493 | 508 | $ cat large1 |
|
494 | 509 | large1 in #3 |
|
495 | 510 | $ hg rebase -s 1 -d 3 --keep --config ui.interactive=True <<EOF |
|
496 | 511 | > o |
|
497 | 512 | > EOF |
|
498 | 513 | largefile large1 has a merge conflict |
|
499 | 514 | ancestor was 4669e532d5b2c093a78eca010077e708a071bb64 |
|
500 | 515 | keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or |
|
501 | 516 | take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o |
|
502 | 517 | merging normal1 |
|
503 | 518 | warning: conflicts during merge. |
|
504 | 519 | merging normal1 incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
505 | 520 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
506 | 521 | [1] |
|
507 | 522 | $ cat .hglf/large1 |
|
508 | 523 | 58e24f733a964da346e2407a2bee99d9001184f5 |
|
509 | 524 | $ cat large1 |
|
510 | 525 | large1 in #1 |
|
511 | 526 | |
|
512 | 527 | $ hg rebase -q --abort |
|
513 | 528 | rebase aborted |
|
514 | 529 | |
|
515 | 530 | Test that transplant updates largefiles, of which standins are safely |
|
516 | 531 | changed, even if it is aborted by conflict of other. |
|
517 | 532 | |
|
518 | 533 | $ hg update -q -C 5 |
|
519 | 534 | $ cat .hglf/large1 |
|
520 | 535 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
521 | 536 | $ cat large1 |
|
522 | 537 | large1 in #3 |
|
523 | 538 | $ hg diff -c 4 .hglf/largeX | grep '^[+-][0-9a-z]' |
|
524 | 539 | +fa44618ea25181aff4f48b70428294790cec9f61 |
|
525 | 540 | $ hg transplant 4 |
|
526 | 541 | applying 07d6153b5c04 |
|
527 | 542 | patching file .hglf/large1 |
|
528 | 543 | Hunk #1 FAILED at 0 |
|
529 | 544 | 1 out of 1 hunks FAILED -- saving rejects to file .hglf/large1.rej |
|
530 | 545 | patch failed to apply |
|
531 | 546 | abort: fix up the merge and run hg transplant --continue |
|
532 | 547 | [255] |
|
533 | 548 | $ hg status -A large1 |
|
534 | 549 | C large1 |
|
535 | 550 | $ cat .hglf/large1 |
|
536 | 551 | e5bb990443d6a92aaf7223813720f7566c9dd05b |
|
537 | 552 | $ cat large1 |
|
538 | 553 | large1 in #3 |
|
539 | 554 | $ hg status -A largeX |
|
540 | 555 | A largeX |
|
541 | 556 | $ cat .hglf/largeX |
|
542 | 557 | fa44618ea25181aff4f48b70428294790cec9f61 |
|
543 | 558 | $ cat largeX |
|
544 | 559 | largeX |
|
545 | 560 | |
|
546 | 561 | Test that "hg status" doesn't show removal of largefiles not managed |
|
547 | 562 | in the target context. |
|
548 | 563 | |
|
549 | 564 | $ hg update -q -C 4 |
|
550 | 565 | $ hg remove largeX |
|
551 | 566 | $ hg status -A largeX |
|
552 | 567 | R largeX |
|
553 | 568 | $ hg status -A --rev '.^1' largeX |
|
554 | 569 | |
|
555 | 570 | #if execbit |
|
556 | 571 | |
|
557 | 572 | Test that "hg status" against revisions other than parent notices exec |
|
558 | 573 | bit changes of largefiles. |
|
559 | 574 | |
|
560 | 575 | $ hg update -q -C 4 |
|
561 | 576 | |
|
562 | 577 | (the case that large2 doesn't have exec bit in the target context but |
|
563 | 578 | in the working context) |
|
564 | 579 | |
|
565 | 580 | $ chmod +x large2 |
|
566 | 581 | $ hg status -A --rev 0 large2 |
|
567 | 582 | M large2 |
|
568 | 583 | $ hg commit -m 'chmod +x large2' |
|
569 | 584 | |
|
570 | 585 | (the case that large2 has exec bit in the target context but not in |
|
571 | 586 | the working context) |
|
572 | 587 | |
|
573 | 588 | $ echo dummy > dummy |
|
574 | 589 | $ hg add dummy |
|
575 | 590 | $ hg commit -m 'revision for separation' |
|
576 | 591 | $ chmod -x large2 |
|
577 | 592 | $ hg status -A --rev '.^1' large2 |
|
578 | 593 | M large2 |
|
579 | 594 | |
|
580 | 595 | #else |
|
581 | 596 | |
|
582 | 597 | Test that "hg status" against revisions other than parent ignores exec |
|
583 | 598 | bit correctly on the platform being unaware of it. |
|
584 | 599 | |
|
585 | 600 | $ hg update -q -C 4 |
|
586 | 601 | |
|
587 | 602 | $ cat > exec-bit.patch <<EOF |
|
588 | 603 | > # HG changeset patch |
|
589 | 604 | > # User test |
|
590 | 605 | > # Date 0 0 |
|
591 | 606 | > # Thu Jan 01 00:00:00 1970 +0000 |
|
592 | 607 | > # Node ID be1b433a65b12b27b5519d92213e14f7e1769b90 |
|
593 | 608 | > # Parent 07d6153b5c04313efb75deec9ba577de7faeb727 |
|
594 | 609 | > chmod +x large2 |
|
595 | 610 | > |
|
596 | 611 | > diff --git a/.hglf/large2 b/.hglf/large2 |
|
597 | 612 | > old mode 100644 |
|
598 | 613 | > new mode 100755 |
|
599 | 614 | > EOF |
|
600 | 615 | $ hg import --exact --bypass exec-bit.patch |
|
601 | 616 | applying exec-bit.patch |
|
602 | 617 | $ hg status -A --rev tip large2 |
|
603 | 618 | C large2 |
|
604 | 619 | |
|
605 | 620 | #endif |
|
606 | 621 | |
|
607 | 622 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now