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