##// END OF EJS Templates
test-largefiles-update: conditionalize output instead of tests
Matt Harbison -
r33344:1e872b08 default
parent child Browse files
Show More
@@ -1,788 +1,780 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 > [extdiff]
9 > [extdiff]
10 > # for portability:
10 > # for portability:
11 > pdiff = sh "$RUNTESTDIR/pdiff"
11 > pdiff = sh "$RUNTESTDIR/pdiff"
12 > EOF
12 > EOF
13
13
14 $ hg init repo
14 $ hg init repo
15 $ cd repo
15 $ cd repo
16
16
17 $ echo large1 > large1
17 $ echo large1 > large1
18 $ echo large2 > large2
18 $ echo large2 > large2
19 $ hg add --large large1 large2
19 $ hg add --large large1 large2
20 $ echo normal1 > normal1
20 $ echo normal1 > normal1
21 $ hg add normal1
21 $ hg add normal1
22 $ hg commit -m '#0'
22 $ hg commit -m '#0'
23 $ echo 'large1 in #1' > large1
23 $ echo 'large1 in #1' > large1
24 $ echo 'normal1 in #1' > normal1
24 $ echo 'normal1 in #1' > normal1
25 $ hg commit -m '#1'
25 $ hg commit -m '#1'
26 $ hg pdiff -r '.^' --config extensions.extdiff=
26 $ hg pdiff -r '.^' --config extensions.extdiff=
27 diff -Nru repo.0d9d9b8dc9a3/.hglf/large1 repo/.hglf/large1
27 diff -Nru repo.0d9d9b8dc9a3/.hglf/large1 repo/.hglf/large1
28 --- repo.0d9d9b8dc9a3/.hglf/large1 * (glob)
28 --- repo.0d9d9b8dc9a3/.hglf/large1 * (glob)
29 +++ repo/.hglf/large1 * (glob)
29 +++ repo/.hglf/large1 * (glob)
30 @@ -1* +1* @@ (glob)
30 @@ -1* +1* @@ (glob)
31 -4669e532d5b2c093a78eca010077e708a071bb64
31 -4669e532d5b2c093a78eca010077e708a071bb64
32 +58e24f733a964da346e2407a2bee99d9001184f5
32 +58e24f733a964da346e2407a2bee99d9001184f5
33 diff -Nru repo.0d9d9b8dc9a3/normal1 repo/normal1
33 diff -Nru repo.0d9d9b8dc9a3/normal1 repo/normal1
34 --- repo.0d9d9b8dc9a3/normal1 * (glob)
34 --- repo.0d9d9b8dc9a3/normal1 * (glob)
35 +++ repo/normal1 * (glob)
35 +++ repo/normal1 * (glob)
36 @@ -1* +1* @@ (glob)
36 @@ -1* +1* @@ (glob)
37 -normal1
37 -normal1
38 +normal1 in #1
38 +normal1 in #1
39 [1]
39 [1]
40 $ hg update -q -C 0
40 $ hg update -q -C 0
41 $ echo 'large2 in #2' > large2
41 $ echo 'large2 in #2' > large2
42 $ hg commit -m '#2'
42 $ hg commit -m '#2'
43 created new head
43 created new head
44
44
45 Test that update also updates the lfdirstate of 'unsure' largefiles after
45 Test that update also updates the lfdirstate of 'unsure' largefiles after
46 hashing them:
46 hashing them:
47
47
48 The previous operations will usually have left us with largefiles with a mtime
48 The previous operations will usually have left us with largefiles with a mtime
49 within the same second as the dirstate was written.
49 within the same second as the dirstate was written.
50 The lfdirstate entries will thus have been written with an invalidated/unset
50 The lfdirstate entries will thus have been written with an invalidated/unset
51 mtime to make sure further changes within the same second is detected.
51 mtime to make sure further changes within the same second is detected.
52 We will however occasionally be "lucky" and get a tick between writing
52 We will however occasionally be "lucky" and get a tick between writing
53 largefiles and writing dirstate so we get valid lfdirstate timestamps. The
53 largefiles and writing dirstate so we get valid lfdirstate timestamps. The
54 following verification is thus disabled but can be verified manually.
54 following verification is thus disabled but can be verified manually.
55
55
56 #if false
56 #if false
57 $ hg debugdirstate --large --nodate
57 $ hg debugdirstate --large --nodate
58 n 644 7 unset large1
58 n 644 7 unset large1
59 n 644 13 unset large2
59 n 644 13 unset large2
60 #endif
60 #endif
61
61
62 Wait to make sure we get a tick so the mtime of the largefiles become valid.
62 Wait to make sure we get a tick so the mtime of the largefiles become valid.
63
63
64 $ sleep 1
64 $ sleep 1
65
65
66 A linear merge will update standins before performing the actual merge. It will
66 A linear merge will update standins before performing the actual merge. It will
67 do a lfdirstate status walk and find 'unset'/'unsure' files, hash them, and
67 do a lfdirstate status walk and find 'unset'/'unsure' files, hash them, and
68 update the corresponding standins.
68 update the corresponding standins.
69 Verify that it actually marks the clean files as clean in lfdirstate so
69 Verify that it actually marks the clean files as clean in lfdirstate so
70 we don't have to hash them again next time we update.
70 we don't have to hash them again next time we update.
71
71
72 $ hg up
72 $ hg up
73 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
73 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
74 updated to "f74e50bd9e55: #2"
74 updated to "f74e50bd9e55: #2"
75 1 other heads for branch "default"
75 1 other heads for branch "default"
76 $ hg debugdirstate --large --nodate
76 $ hg debugdirstate --large --nodate
77 n 644 7 set large1
77 n 644 7 set large1
78 n 644 13 set large2
78 n 644 13 set large2
79
79
80 Test that lfdirstate keeps track of last modification of largefiles and
80 Test that lfdirstate keeps track of last modification of largefiles and
81 prevents unnecessary hashing of content - also after linear/noop update
81 prevents unnecessary hashing of content - also after linear/noop update
82
82
83 $ sleep 1
83 $ sleep 1
84 $ hg st
84 $ hg st
85 $ hg debugdirstate --large --nodate
85 $ hg debugdirstate --large --nodate
86 n 644 7 set large1
86 n 644 7 set large1
87 n 644 13 set large2
87 n 644 13 set large2
88 $ hg up
88 $ hg up
89 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
89 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 updated to "f74e50bd9e55: #2"
90 updated to "f74e50bd9e55: #2"
91 1 other heads for branch "default"
91 1 other heads for branch "default"
92 $ hg debugdirstate --large --nodate
92 $ hg debugdirstate --large --nodate
93 n 644 7 set large1
93 n 644 7 set large1
94 n 644 13 set large2
94 n 644 13 set large2
95
95
96 Test that "hg merge" updates largefiles from "other" correctly
96 Test that "hg merge" updates largefiles from "other" correctly
97
97
98 (getting largefiles from "other" normally)
98 (getting largefiles from "other" normally)
99
99
100 $ hg status -A large1
100 $ hg status -A large1
101 C large1
101 C large1
102 $ cat large1
102 $ cat large1
103 large1
103 large1
104 $ cat .hglf/large1
104 $ cat .hglf/large1
105 4669e532d5b2c093a78eca010077e708a071bb64
105 4669e532d5b2c093a78eca010077e708a071bb64
106 $ hg merge --config debug.dirstate.delaywrite=2
106 $ hg merge --config debug.dirstate.delaywrite=2
107 getting changed largefiles
107 getting changed largefiles
108 1 largefiles updated, 0 removed
108 1 largefiles updated, 0 removed
109 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
109 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
110 (branch merge, don't forget to commit)
110 (branch merge, don't forget to commit)
111 $ hg status -A large1
111 $ hg status -A large1
112 M large1
112 M large1
113 $ cat large1
113 $ cat large1
114 large1 in #1
114 large1 in #1
115 $ cat .hglf/large1
115 $ cat .hglf/large1
116 58e24f733a964da346e2407a2bee99d9001184f5
116 58e24f733a964da346e2407a2bee99d9001184f5
117 $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]'
117 $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]'
118 -4669e532d5b2c093a78eca010077e708a071bb64
118 -4669e532d5b2c093a78eca010077e708a071bb64
119 +58e24f733a964da346e2407a2bee99d9001184f5
119 +58e24f733a964da346e2407a2bee99d9001184f5
120
120
121 (getting largefiles from "other" via conflict prompt)
121 (getting largefiles from "other" via conflict prompt)
122
122
123 $ hg update -q -C 2
123 $ hg update -q -C 2
124 $ echo 'large1 in #3' > large1
124 $ echo 'large1 in #3' > large1
125 $ echo 'normal1 in #3' > normal1
125 $ echo 'normal1 in #3' > normal1
126 $ hg commit -m '#3'
126 $ hg commit -m '#3'
127 $ cat .hglf/large1
127 $ cat .hglf/large1
128 e5bb990443d6a92aaf7223813720f7566c9dd05b
128 e5bb990443d6a92aaf7223813720f7566c9dd05b
129 $ hg merge --config debug.dirstate.delaywrite=2 --config ui.interactive=True <<EOF
129 $ hg merge --config debug.dirstate.delaywrite=2 --config ui.interactive=True <<EOF
130 > o
130 > o
131 > EOF
131 > EOF
132 largefile large1 has a merge conflict
132 largefile large1 has a merge conflict
133 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
133 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
134 keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or
134 keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or
135 take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o
135 take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o
136 merging normal1
136 merging normal1
137 warning: conflicts while merging normal1! (edit, then use 'hg resolve --mark')
137 warning: conflicts while merging normal1! (edit, then use 'hg resolve --mark')
138 getting changed largefiles
138 getting changed largefiles
139 1 largefiles updated, 0 removed
139 1 largefiles updated, 0 removed
140 0 files updated, 1 files merged, 0 files removed, 1 files unresolved
140 0 files updated, 1 files merged, 0 files removed, 1 files unresolved
141 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
141 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
142 [1]
142 [1]
143 $ hg status -A large1
143 $ hg status -A large1
144 M large1
144 M large1
145 $ cat large1
145 $ cat large1
146 large1 in #1
146 large1 in #1
147 $ cat .hglf/large1
147 $ cat .hglf/large1
148 58e24f733a964da346e2407a2bee99d9001184f5
148 58e24f733a964da346e2407a2bee99d9001184f5
149 $ rm normal1.orig
149 $ rm normal1.orig
150
150
151 (merge non-existing largefiles from "other" via conflict prompt -
151 (merge non-existing largefiles from "other" via conflict prompt -
152 make sure the following commit doesn't abort in a confusing way when trying to
152 make sure the following commit doesn't abort in a confusing way when trying to
153 mark the non-existing file as normal in lfdirstate)
153 mark the non-existing file as normal in lfdirstate)
154
154
155 $ mv .hg/largefiles/58e24f733a964da346e2407a2bee99d9001184f5 .
155 $ mv .hg/largefiles/58e24f733a964da346e2407a2bee99d9001184f5 .
156 $ hg update -q -C 3
156 $ hg update -q -C 3
157 $ hg merge --config largefiles.usercache=not --config debug.dirstate.delaywrite=2 --tool :local --config ui.interactive=True <<EOF
157 $ hg merge --config largefiles.usercache=not --config debug.dirstate.delaywrite=2 --tool :local --config ui.interactive=True <<EOF
158 > o
158 > o
159 > EOF
159 > EOF
160 largefile large1 has a merge conflict
160 largefile large1 has a merge conflict
161 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
161 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
162 keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or
162 keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or
163 take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o
163 take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o
164 getting changed largefiles
164 getting changed largefiles
165 large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from file:/*/$TESTTMP/repo (glob)
165 large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from file:/*/$TESTTMP/repo (glob)
166 0 largefiles updated, 0 removed
166 0 largefiles updated, 0 removed
167 0 files updated, 2 files merged, 0 files removed, 0 files unresolved
167 0 files updated, 2 files merged, 0 files removed, 0 files unresolved
168 (branch merge, don't forget to commit)
168 (branch merge, don't forget to commit)
169 $ hg commit -m '1-2-3 testing' --config largefiles.usercache=not
169 $ hg commit -m '1-2-3 testing' --config largefiles.usercache=not
170 large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from local store
170 large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from local store
171 $ hg up -C . --config largefiles.usercache=not
171 $ hg up -C . --config largefiles.usercache=not
172 getting changed largefiles
172 getting changed largefiles
173 large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from file:/*/$TESTTMP/repo (glob)
173 large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from file:/*/$TESTTMP/repo (glob)
174 0 largefiles updated, 0 removed
174 0 largefiles updated, 0 removed
175 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
175 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
176 $ hg st large1
176 $ hg st large1
177 ! large1
177 ! large1
178 $ hg rollback -q
178 $ hg rollback -q
179 $ mv 58e24f733a964da346e2407a2bee99d9001184f5 .hg/largefiles/
179 $ mv 58e24f733a964da346e2407a2bee99d9001184f5 .hg/largefiles/
180
180
181 Test that "hg revert -r REV" updates largefiles from "REV" correctly
181 Test that "hg revert -r REV" updates largefiles from "REV" correctly
182
182
183 $ hg update -q -C 3
183 $ hg update -q -C 3
184 $ hg status -A large1
184 $ hg status -A large1
185 C large1
185 C large1
186 $ cat large1
186 $ cat large1
187 large1 in #3
187 large1 in #3
188 $ cat .hglf/large1
188 $ cat .hglf/large1
189 e5bb990443d6a92aaf7223813720f7566c9dd05b
189 e5bb990443d6a92aaf7223813720f7566c9dd05b
190 $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]'
190 $ hg diff -c 1 --nodates .hglf/large1 | grep '^[+-][0-9a-z]'
191 -4669e532d5b2c093a78eca010077e708a071bb64
191 -4669e532d5b2c093a78eca010077e708a071bb64
192 +58e24f733a964da346e2407a2bee99d9001184f5
192 +58e24f733a964da346e2407a2bee99d9001184f5
193 $ hg revert --no-backup -r 1 --config debug.dirstate.delaywrite=2 large1
193 $ hg revert --no-backup -r 1 --config debug.dirstate.delaywrite=2 large1
194 $ hg status -A large1
194 $ hg status -A large1
195 M large1
195 M large1
196 $ cat large1
196 $ cat large1
197 large1 in #1
197 large1 in #1
198 $ cat .hglf/large1
198 $ cat .hglf/large1
199 58e24f733a964da346e2407a2bee99d9001184f5
199 58e24f733a964da346e2407a2bee99d9001184f5
200
200
201 Test that "hg rollback" restores status of largefiles correctly
201 Test that "hg rollback" restores status of largefiles correctly
202
202
203 $ hg update -C -q
203 $ hg update -C -q
204 $ hg remove large1
204 $ hg remove large1
205 $ test -f .hglf/large1
205 $ test -f .hglf/large1
206 [1]
206 [1]
207 $ hg forget large2
207 $ hg forget large2
208 $ test -f .hglf/large2
208 $ test -f .hglf/large2
209 [1]
209 [1]
210 $ echo largeX > largeX
210 $ echo largeX > largeX
211 $ hg add --large largeX
211 $ hg add --large largeX
212 $ cat .hglf/largeX
212 $ cat .hglf/largeX
213
213
214 $ hg commit -m 'will be rollback-ed soon'
214 $ hg commit -m 'will be rollback-ed soon'
215 $ echo largeY > largeY
215 $ echo largeY > largeY
216 $ hg add --large largeY
216 $ hg add --large largeY
217 #if windows
217
218 $ hg status -A large1
218 $ hg status -A large1
219 large1: * (glob)
219 large1: The system cannot find the file specified (windows !)
220 #else
220 large1: No such file or directory (no-windows !)
221 $ hg status -A large1
221
222 large1: No such file or directory
223 #endif
224 $ hg status -A large2
222 $ hg status -A large2
225 ? large2
223 ? large2
226 $ hg status -A largeX
224 $ hg status -A largeX
227 C largeX
225 C largeX
228 $ hg status -A largeY
226 $ hg status -A largeY
229 A largeY
227 A largeY
230 $ hg rollback
228 $ hg rollback
231 repository tip rolled back to revision 3 (undo commit)
229 repository tip rolled back to revision 3 (undo commit)
232 working directory now based on revision 3
230 working directory now based on revision 3
233 $ hg status -A large1
231 $ hg status -A large1
234 R large1
232 R large1
235 $ test -f .hglf/large1
233 $ test -f .hglf/large1
236 [1]
234 [1]
237 $ hg status -A large2
235 $ hg status -A large2
238 R large2
236 R large2
239 $ test -f .hglf/large2
237 $ test -f .hglf/large2
240 [1]
238 [1]
241 $ hg status -A largeX
239 $ hg status -A largeX
242 A largeX
240 A largeX
243 $ cat .hglf/largeX
241 $ cat .hglf/largeX
244
242
245 $ hg status -A largeY
243 $ hg status -A largeY
246 ? largeY
244 ? largeY
247 $ test -f .hglf/largeY
245 $ test -f .hglf/largeY
248 [1]
246 [1]
249 $ rm largeY
247 $ rm largeY
250
248
251 Test that "hg rollback" restores standins correctly
249 Test that "hg rollback" restores standins correctly
252
250
253 $ hg commit -m 'will be rollback-ed soon'
251 $ hg commit -m 'will be rollback-ed soon'
254 $ hg update -q -C 2
252 $ hg update -q -C 2
255 $ cat large1
253 $ cat large1
256 large1
254 large1
257 $ cat .hglf/large1
255 $ cat .hglf/large1
258 4669e532d5b2c093a78eca010077e708a071bb64
256 4669e532d5b2c093a78eca010077e708a071bb64
259 $ cat large2
257 $ cat large2
260 large2 in #2
258 large2 in #2
261 $ cat .hglf/large2
259 $ cat .hglf/large2
262 3cfce6277e7668985707b6887ce56f9f62f6ccd9
260 3cfce6277e7668985707b6887ce56f9f62f6ccd9
263
261
264 $ hg rollback -q -f
262 $ hg rollback -q -f
265 $ cat large1
263 $ cat large1
266 large1
264 large1
267 $ cat .hglf/large1
265 $ cat .hglf/large1
268 4669e532d5b2c093a78eca010077e708a071bb64
266 4669e532d5b2c093a78eca010077e708a071bb64
269 $ cat large2
267 $ cat large2
270 large2 in #2
268 large2 in #2
271 $ cat .hglf/large2
269 $ cat .hglf/large2
272 3cfce6277e7668985707b6887ce56f9f62f6ccd9
270 3cfce6277e7668985707b6887ce56f9f62f6ccd9
273
271
274 (rollback the parent of the working directory, when the parent of it
272 (rollback the parent of the working directory, when the parent of it
275 is not branch-tip)
273 is not branch-tip)
276
274
277 $ hg update -q -C 1
275 $ hg update -q -C 1
278 $ cat .hglf/large1
276 $ cat .hglf/large1
279 58e24f733a964da346e2407a2bee99d9001184f5
277 58e24f733a964da346e2407a2bee99d9001184f5
280 $ cat .hglf/large2
278 $ cat .hglf/large2
281 1deebade43c8c498a3c8daddac0244dc55d1331d
279 1deebade43c8c498a3c8daddac0244dc55d1331d
282
280
283 $ echo normalX > normalX
281 $ echo normalX > normalX
284 $ hg add normalX
282 $ hg add normalX
285 $ hg commit -m 'will be rollback-ed soon'
283 $ hg commit -m 'will be rollback-ed soon'
286 $ hg rollback -q
284 $ hg rollback -q
287
285
288 $ cat .hglf/large1
286 $ cat .hglf/large1
289 58e24f733a964da346e2407a2bee99d9001184f5
287 58e24f733a964da346e2407a2bee99d9001184f5
290 $ cat .hglf/large2
288 $ cat .hglf/large2
291 1deebade43c8c498a3c8daddac0244dc55d1331d
289 1deebade43c8c498a3c8daddac0244dc55d1331d
292 $ rm normalX
290 $ rm normalX
293
291
294 Test that "hg status" shows status of largefiles correctly just after
292 Test that "hg status" shows status of largefiles correctly just after
295 automated commit like rebase/transplant
293 automated commit like rebase/transplant
296
294
297 $ cat >> .hg/hgrc <<EOF
295 $ cat >> .hg/hgrc <<EOF
298 > [extensions]
296 > [extensions]
299 > rebase =
297 > rebase =
300 > strip =
298 > strip =
301 > transplant =
299 > transplant =
302 > EOF
300 > EOF
303 $ hg update -q -C 1
301 $ hg update -q -C 1
304 $ hg remove large1
302 $ hg remove large1
305 $ echo largeX > largeX
303 $ echo largeX > largeX
306 $ hg add --large largeX
304 $ hg add --large largeX
307 $ hg commit -m '#4'
305 $ hg commit -m '#4'
308
306
309 $ hg rebase -s 1 -d 2 --keep
307 $ hg rebase -s 1 -d 2 --keep
310 rebasing 1:72518492caa6 "#1"
308 rebasing 1:72518492caa6 "#1"
311 rebasing 4:07d6153b5c04 "#4" (tip)
309 rebasing 4:07d6153b5c04 "#4" (tip)
312 #if windows
310
313 $ hg status -A large1
311 $ hg status -A large1
314 large1: * (glob)
312 large1: The system cannot find the file specified (windows !)
315 #else
313 large1: No such file or directory (no-windows !)
316 $ hg status -A large1
314
317 large1: No such file or directory
318 #endif
319 $ hg status -A largeX
315 $ hg status -A largeX
320 C largeX
316 C largeX
321 $ hg strip -q 5
317 $ hg strip -q 5
322
318
323 $ hg update -q -C 2
319 $ hg update -q -C 2
324 $ hg transplant -q 1 4
320 $ hg transplant -q 1 4
325 #if windows
321
326 $ hg status -A large1
322 $ hg status -A large1
327 large1: * (glob)
323 large1: The system cannot find the file specified (windows !)
328 #else
324 large1: No such file or directory (no-windows !)
329 $ hg status -A large1
325
330 large1: No such file or directory
331 #endif
332 $ hg status -A largeX
326 $ hg status -A largeX
333 C largeX
327 C largeX
334 $ hg strip -q 5
328 $ hg strip -q 5
335
329
336 $ hg update -q -C 2
330 $ hg update -q -C 2
337 $ hg transplant -q --merge 1 --merge 4
331 $ hg transplant -q --merge 1 --merge 4
338 #if windows
332
339 $ hg status -A large1
333 $ hg status -A large1
340 large1: * (glob)
334 large1: The system cannot find the file specified (windows !)
341 #else
335 large1: No such file or directory (no-windows !)
342 $ hg status -A large1
336
343 large1: No such file or directory
344 #endif
345 $ hg status -A largeX
337 $ hg status -A largeX
346 C largeX
338 C largeX
347 $ hg strip -q 5
339 $ hg strip -q 5
348
340
349 Test that linear merge can detect modification (and conflict) correctly
341 Test that linear merge can detect modification (and conflict) correctly
350
342
351 (linear merge without conflict)
343 (linear merge without conflict)
352
344
353 $ echo 'large2 for linear merge (no conflict)' > large2
345 $ echo 'large2 for linear merge (no conflict)' > large2
354 $ hg update 3 --config debug.dirstate.delaywrite=2
346 $ hg update 3 --config debug.dirstate.delaywrite=2
355 getting changed largefiles
347 getting changed largefiles
356 1 largefiles updated, 0 removed
348 1 largefiles updated, 0 removed
357 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
349 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
358 $ hg status -A large2
350 $ hg status -A large2
359 M large2
351 M large2
360 $ cat large2
352 $ cat large2
361 large2 for linear merge (no conflict)
353 large2 for linear merge (no conflict)
362 $ cat .hglf/large2
354 $ cat .hglf/large2
363 9c4bf8f1b33536d6e5f89447e10620cfe52ea710
355 9c4bf8f1b33536d6e5f89447e10620cfe52ea710
364
356
365 (linear merge with conflict, choosing "other")
357 (linear merge with conflict, choosing "other")
366
358
367 $ hg update -q -C 2
359 $ hg update -q -C 2
368 $ echo 'large1 for linear merge (conflict)' > large1
360 $ echo 'large1 for linear merge (conflict)' > large1
369 $ hg update 3 --config ui.interactive=True <<EOF
361 $ hg update 3 --config ui.interactive=True <<EOF
370 > o
362 > o
371 > EOF
363 > EOF
372 largefile large1 has a merge conflict
364 largefile large1 has a merge conflict
373 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
365 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
374 keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or
366 keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or
375 take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? o
367 take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? o
376 getting changed largefiles
368 getting changed largefiles
377 1 largefiles updated, 0 removed
369 1 largefiles updated, 0 removed
378 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
370 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
379 $ hg status -A large1
371 $ hg status -A large1
380 C large1
372 C large1
381 $ cat large1
373 $ cat large1
382 large1 in #3
374 large1 in #3
383 $ cat .hglf/large1
375 $ cat .hglf/large1
384 e5bb990443d6a92aaf7223813720f7566c9dd05b
376 e5bb990443d6a92aaf7223813720f7566c9dd05b
385
377
386 (linear merge with conflict, choosing "local")
378 (linear merge with conflict, choosing "local")
387
379
388 $ hg update -q -C 2
380 $ hg update -q -C 2
389 $ echo 'large1 for linear merge (conflict)' > large1
381 $ echo 'large1 for linear merge (conflict)' > large1
390 $ hg update 3 --config debug.dirstate.delaywrite=2
382 $ hg update 3 --config debug.dirstate.delaywrite=2
391 largefile large1 has a merge conflict
383 largefile large1 has a merge conflict
392 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
384 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
393 keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or
385 keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or
394 take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l
386 take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l
395 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
387 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
396 $ hg status -A large1
388 $ hg status -A large1
397 M large1
389 M large1
398 $ cat large1
390 $ cat large1
399 large1 for linear merge (conflict)
391 large1 for linear merge (conflict)
400 $ cat .hglf/large1
392 $ cat .hglf/large1
401 ba94c2efe5b7c5e0af8d189295ce00553b0612b7
393 ba94c2efe5b7c5e0af8d189295ce00553b0612b7
402
394
403 Test a linear merge to a revision containing same-name normal file
395 Test a linear merge to a revision containing same-name normal file
404
396
405 $ hg update -q -C 3
397 $ hg update -q -C 3
406 $ hg remove large2
398 $ hg remove large2
407 $ echo 'large2 as normal file' > large2
399 $ echo 'large2 as normal file' > large2
408 $ hg add large2
400 $ hg add large2
409 $ echo 'large3 as normal file' > large3
401 $ echo 'large3 as normal file' > large3
410 $ hg add large3
402 $ hg add large3
411 $ hg commit -m '#5'
403 $ hg commit -m '#5'
412 $ hg manifest
404 $ hg manifest
413 .hglf/large1
405 .hglf/large1
414 large2
406 large2
415 large3
407 large3
416 normal1
408 normal1
417
409
418 (modified largefile is already switched to normal)
410 (modified largefile is already switched to normal)
419
411
420 $ hg update -q -C 2
412 $ hg update -q -C 2
421 $ echo 'modified large2 for linear merge' > large2
413 $ echo 'modified large2 for linear merge' > large2
422 $ hg update -q 5
414 $ hg update -q 5
423 remote turned local largefile large2 into a normal file
415 remote turned local largefile large2 into a normal file
424 keep (l)argefile or use (n)ormal file? l
416 keep (l)argefile or use (n)ormal file? l
425 $ hg debugdirstate --nodates | grep large2
417 $ hg debugdirstate --nodates | grep large2
426 a 0 -1 unset .hglf/large2
418 a 0 -1 unset .hglf/large2
427 r 0 0 set large2
419 r 0 0 set large2
428 $ hg status -A large2
420 $ hg status -A large2
429 A large2
421 A large2
430 $ cat large2
422 $ cat large2
431 modified large2 for linear merge
423 modified large2 for linear merge
432
424
433 (added largefile is already committed as normal)
425 (added largefile is already committed as normal)
434
426
435 $ hg update -q -C 2
427 $ hg update -q -C 2
436 $ echo 'large3 as large file for linear merge' > large3
428 $ echo 'large3 as large file for linear merge' > large3
437 $ hg add --large large3
429 $ hg add --large large3
438 $ hg update -q 5
430 $ hg update -q 5
439 remote turned local largefile large3 into a normal file
431 remote turned local largefile large3 into a normal file
440 keep (l)argefile or use (n)ormal file? l
432 keep (l)argefile or use (n)ormal file? l
441 $ hg debugdirstate --nodates | grep large3
433 $ hg debugdirstate --nodates | grep large3
442 a 0 -1 unset .hglf/large3
434 a 0 -1 unset .hglf/large3
443 r 0 0 set large3
435 r 0 0 set large3
444 $ hg status -A large3
436 $ hg status -A large3
445 A large3
437 A large3
446 $ cat large3
438 $ cat large3
447 large3 as large file for linear merge
439 large3 as large file for linear merge
448 $ rm -f large3 .hglf/large3
440 $ rm -f large3 .hglf/large3
449
441
450 Test that the internal linear merging works correctly
442 Test that the internal linear merging works correctly
451 (both heads are stripped to keep pairing of revision number and commit log)
443 (both heads are stripped to keep pairing of revision number and commit log)
452
444
453 $ hg update -q -C 2
445 $ hg update -q -C 2
454 $ hg strip 3 4
446 $ hg strip 3 4
455 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9530e27857f7-2e7b195d-backup.hg (glob)
447 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9530e27857f7-2e7b195d-backup.hg (glob)
456 $ mv .hg/strip-backup/9530e27857f7-2e7b195d-backup.hg $TESTTMP
448 $ mv .hg/strip-backup/9530e27857f7-2e7b195d-backup.hg $TESTTMP
457
449
458 (internal linear merging at "hg pull --update")
450 (internal linear merging at "hg pull --update")
459
451
460 $ echo 'large1 for linear merge (conflict)' > large1
452 $ echo 'large1 for linear merge (conflict)' > large1
461 $ echo 'large2 for linear merge (conflict with normal file)' > large2
453 $ echo 'large2 for linear merge (conflict with normal file)' > large2
462 $ hg pull --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-2e7b195d-backup.hg
454 $ hg pull --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-2e7b195d-backup.hg
463 pulling from $TESTTMP/9530e27857f7-2e7b195d-backup.hg (glob)
455 pulling from $TESTTMP/9530e27857f7-2e7b195d-backup.hg (glob)
464 searching for changes
456 searching for changes
465 adding changesets
457 adding changesets
466 adding manifests
458 adding manifests
467 adding file changes
459 adding file changes
468 added 3 changesets with 5 changes to 5 files
460 added 3 changesets with 5 changes to 5 files
469 remote turned local largefile large2 into a normal file
461 remote turned local largefile large2 into a normal file
470 keep (l)argefile or use (n)ormal file? l
462 keep (l)argefile or use (n)ormal file? l
471 largefile large1 has a merge conflict
463 largefile large1 has a merge conflict
472 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
464 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
473 keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or
465 keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or
474 take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l
466 take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l
475 2 files updated, 1 files merged, 0 files removed, 0 files unresolved
467 2 files updated, 1 files merged, 0 files removed, 0 files unresolved
476 updated to "d65e59e952a9: #5"
468 updated to "d65e59e952a9: #5"
477 1 other heads for branch "default"
469 1 other heads for branch "default"
478
470
479 $ hg status -A large1
471 $ hg status -A large1
480 M large1
472 M large1
481 $ cat large1
473 $ cat large1
482 large1 for linear merge (conflict)
474 large1 for linear merge (conflict)
483 $ cat .hglf/large1
475 $ cat .hglf/large1
484 ba94c2efe5b7c5e0af8d189295ce00553b0612b7
476 ba94c2efe5b7c5e0af8d189295ce00553b0612b7
485 $ hg status -A large2
477 $ hg status -A large2
486 A large2
478 A large2
487 $ cat large2
479 $ cat large2
488 large2 for linear merge (conflict with normal file)
480 large2 for linear merge (conflict with normal file)
489 $ cat .hglf/large2
481 $ cat .hglf/large2
490 d7591fe9be0f6227d90bddf3e4f52ff41fc1f544
482 d7591fe9be0f6227d90bddf3e4f52ff41fc1f544
491
483
492 (internal linear merging at "hg unbundle --update")
484 (internal linear merging at "hg unbundle --update")
493
485
494 $ hg update -q -C 2
486 $ hg update -q -C 2
495 $ hg rollback -q
487 $ hg rollback -q
496
488
497 $ echo 'large1 for linear merge (conflict)' > large1
489 $ echo 'large1 for linear merge (conflict)' > large1
498 $ echo 'large2 for linear merge (conflict with normal file)' > large2
490 $ echo 'large2 for linear merge (conflict with normal file)' > large2
499 $ hg unbundle --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-2e7b195d-backup.hg
491 $ hg unbundle --update --config debug.dirstate.delaywrite=2 $TESTTMP/9530e27857f7-2e7b195d-backup.hg
500 adding changesets
492 adding changesets
501 adding manifests
493 adding manifests
502 adding file changes
494 adding file changes
503 added 3 changesets with 5 changes to 5 files
495 added 3 changesets with 5 changes to 5 files
504 remote turned local largefile large2 into a normal file
496 remote turned local largefile large2 into a normal file
505 keep (l)argefile or use (n)ormal file? l
497 keep (l)argefile or use (n)ormal file? l
506 largefile large1 has a merge conflict
498 largefile large1 has a merge conflict
507 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
499 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
508 keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or
500 keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or
509 take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l
501 take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l
510 2 files updated, 1 files merged, 0 files removed, 0 files unresolved
502 2 files updated, 1 files merged, 0 files removed, 0 files unresolved
511 updated to "d65e59e952a9: #5"
503 updated to "d65e59e952a9: #5"
512 1 other heads for branch "default"
504 1 other heads for branch "default"
513
505
514 $ hg status -A large1
506 $ hg status -A large1
515 M large1
507 M large1
516 $ cat large1
508 $ cat large1
517 large1 for linear merge (conflict)
509 large1 for linear merge (conflict)
518 $ cat .hglf/large1
510 $ cat .hglf/large1
519 ba94c2efe5b7c5e0af8d189295ce00553b0612b7
511 ba94c2efe5b7c5e0af8d189295ce00553b0612b7
520 $ hg status -A large2
512 $ hg status -A large2
521 A large2
513 A large2
522 $ cat large2
514 $ cat large2
523 large2 for linear merge (conflict with normal file)
515 large2 for linear merge (conflict with normal file)
524 $ cat .hglf/large2
516 $ cat .hglf/large2
525 d7591fe9be0f6227d90bddf3e4f52ff41fc1f544
517 d7591fe9be0f6227d90bddf3e4f52ff41fc1f544
526
518
527 (internal linear merging in subrepo at "hg update")
519 (internal linear merging in subrepo at "hg update")
528
520
529 $ cd ..
521 $ cd ..
530 $ hg init subparent
522 $ hg init subparent
531 $ cd subparent
523 $ cd subparent
532
524
533 $ hg clone -q -u 2 ../repo sub
525 $ hg clone -q -u 2 ../repo sub
534 $ cat > .hgsub <<EOF
526 $ cat > .hgsub <<EOF
535 > sub = sub
527 > sub = sub
536 > EOF
528 > EOF
537 $ hg add .hgsub
529 $ hg add .hgsub
538 $ hg commit -m '#0@parent'
530 $ hg commit -m '#0@parent'
539 $ cat .hgsubstate
531 $ cat .hgsubstate
540 f74e50bd9e5594b7cf1e6c5cbab86ddd25f3ca2f sub
532 f74e50bd9e5594b7cf1e6c5cbab86ddd25f3ca2f sub
541 $ hg -R sub update -q
533 $ hg -R sub update -q
542 $ hg commit -m '#1@parent'
534 $ hg commit -m '#1@parent'
543 $ cat .hgsubstate
535 $ cat .hgsubstate
544 d65e59e952a9638e2ce863b41a420ca723dd3e8d sub
536 d65e59e952a9638e2ce863b41a420ca723dd3e8d sub
545 $ hg update -q 0
537 $ hg update -q 0
546
538
547 $ echo 'large1 for linear merge (conflict)' > sub/large1
539 $ echo 'large1 for linear merge (conflict)' > sub/large1
548 $ echo 'large2 for linear merge (conflict with normal file)' > sub/large2
540 $ echo 'large2 for linear merge (conflict with normal file)' > sub/large2
549 $ hg update --config ui.interactive=True --config debug.dirstate.delaywrite=2 <<EOF
541 $ hg update --config ui.interactive=True --config debug.dirstate.delaywrite=2 <<EOF
550 > m
542 > m
551 > r
543 > r
552 > l
544 > l
553 > l
545 > l
554 > EOF
546 > EOF
555 subrepository sub diverged (local revision: f74e50bd9e55, remote revision: d65e59e952a9)
547 subrepository sub diverged (local revision: f74e50bd9e55, remote revision: d65e59e952a9)
556 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
548 (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m
557 subrepository sources for sub differ (in checked out version)
549 subrepository sources for sub differ (in checked out version)
558 use (l)ocal source (f74e50bd9e55) or (r)emote source (d65e59e952a9)? r
550 use (l)ocal source (f74e50bd9e55) or (r)emote source (d65e59e952a9)? r
559 remote turned local largefile large2 into a normal file
551 remote turned local largefile large2 into a normal file
560 keep (l)argefile or use (n)ormal file? l
552 keep (l)argefile or use (n)ormal file? l
561 largefile large1 has a merge conflict
553 largefile large1 has a merge conflict
562 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
554 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
563 keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or
555 keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or
564 take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l
556 take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l
565 2 files updated, 1 files merged, 0 files removed, 0 files unresolved
557 2 files updated, 1 files merged, 0 files removed, 0 files unresolved
566 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
558 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
567
559
568 $ hg -R sub status -A sub/large1
560 $ hg -R sub status -A sub/large1
569 M sub/large1
561 M sub/large1
570 $ cat sub/large1
562 $ cat sub/large1
571 large1 for linear merge (conflict)
563 large1 for linear merge (conflict)
572 $ cat sub/.hglf/large1
564 $ cat sub/.hglf/large1
573 ba94c2efe5b7c5e0af8d189295ce00553b0612b7
565 ba94c2efe5b7c5e0af8d189295ce00553b0612b7
574 $ hg -R sub status -A sub/large2
566 $ hg -R sub status -A sub/large2
575 A sub/large2
567 A sub/large2
576 $ cat sub/large2
568 $ cat sub/large2
577 large2 for linear merge (conflict with normal file)
569 large2 for linear merge (conflict with normal file)
578 $ cat sub/.hglf/large2
570 $ cat sub/.hglf/large2
579 d7591fe9be0f6227d90bddf3e4f52ff41fc1f544
571 d7591fe9be0f6227d90bddf3e4f52ff41fc1f544
580
572
581 $ cd ..
573 $ cd ..
582 $ cd repo
574 $ cd repo
583
575
584 Test that rebase updates largefiles in the working directory even if
576 Test that rebase updates largefiles in the working directory even if
585 it is aborted by conflict.
577 it is aborted by conflict.
586
578
587 $ hg update -q -C 3
579 $ hg update -q -C 3
588 $ cat .hglf/large1
580 $ cat .hglf/large1
589 e5bb990443d6a92aaf7223813720f7566c9dd05b
581 e5bb990443d6a92aaf7223813720f7566c9dd05b
590 $ cat large1
582 $ cat large1
591 large1 in #3
583 large1 in #3
592 $ hg rebase -s 1 -d 3 --keep --config ui.interactive=True <<EOF
584 $ hg rebase -s 1 -d 3 --keep --config ui.interactive=True <<EOF
593 > o
585 > o
594 > EOF
586 > EOF
595 rebasing 1:72518492caa6 "#1"
587 rebasing 1:72518492caa6 "#1"
596 largefile large1 has a merge conflict
588 largefile large1 has a merge conflict
597 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
589 ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
598 keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or
590 keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or
599 take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o
591 take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o
600 merging normal1
592 merging normal1
601 warning: conflicts while merging normal1! (edit, then use 'hg resolve --mark')
593 warning: conflicts while merging normal1! (edit, then use 'hg resolve --mark')
602 unresolved conflicts (see hg resolve, then hg rebase --continue)
594 unresolved conflicts (see hg resolve, then hg rebase --continue)
603 [1]
595 [1]
604 $ cat .hglf/large1
596 $ cat .hglf/large1
605 58e24f733a964da346e2407a2bee99d9001184f5
597 58e24f733a964da346e2407a2bee99d9001184f5
606 $ cat large1
598 $ cat large1
607 large1 in #1
599 large1 in #1
608 $ rm normal1.orig
600 $ rm normal1.orig
609
601
610 Test that rebase updates standins for manually modified largefiles at
602 Test that rebase updates standins for manually modified largefiles at
611 the 1st commit of resuming.
603 the 1st commit of resuming.
612
604
613 $ echo "manually modified before 'hg rebase --continue'" > large1
605 $ echo "manually modified before 'hg rebase --continue'" > large1
614 $ hg resolve -m normal1
606 $ hg resolve -m normal1
615 (no more unresolved files)
607 (no more unresolved files)
616 continue: hg rebase --continue
608 continue: hg rebase --continue
617 $ hg rebase --continue --config ui.interactive=True <<EOF
609 $ hg rebase --continue --config ui.interactive=True <<EOF
618 > c
610 > c
619 > EOF
611 > EOF
620 rebasing 1:72518492caa6 "#1"
612 rebasing 1:72518492caa6 "#1"
621 rebasing 4:07d6153b5c04 "#4"
613 rebasing 4:07d6153b5c04 "#4"
622 local [dest] changed .hglf/large1 which other [source] deleted
614 local [dest] changed .hglf/large1 which other [source] deleted
623 use (c)hanged version, (d)elete, or leave (u)nresolved? c
615 use (c)hanged version, (d)elete, or leave (u)nresolved? c
624
616
625 $ hg diff -c "tip~1" --nodates .hglf/large1 | grep '^[+-][0-9a-z]'
617 $ hg diff -c "tip~1" --nodates .hglf/large1 | grep '^[+-][0-9a-z]'
626 -e5bb990443d6a92aaf7223813720f7566c9dd05b
618 -e5bb990443d6a92aaf7223813720f7566c9dd05b
627 +8a4f783556e7dea21139ca0466eafce954c75c13
619 +8a4f783556e7dea21139ca0466eafce954c75c13
628 $ rm -f large1
620 $ rm -f large1
629 $ hg update -q -C tip
621 $ hg update -q -C tip
630 $ cat large1
622 $ cat large1
631 manually modified before 'hg rebase --continue'
623 manually modified before 'hg rebase --continue'
632
624
633 Test that transplant updates largefiles, of which standins are safely
625 Test that transplant updates largefiles, of which standins are safely
634 changed, even if it is aborted by conflict of other.
626 changed, even if it is aborted by conflict of other.
635
627
636 $ hg update -q -C 5
628 $ hg update -q -C 5
637 $ cat .hglf/large1
629 $ cat .hglf/large1
638 e5bb990443d6a92aaf7223813720f7566c9dd05b
630 e5bb990443d6a92aaf7223813720f7566c9dd05b
639 $ cat large1
631 $ cat large1
640 large1 in #3
632 large1 in #3
641 $ hg diff -c 4 .hglf/largeX | grep '^[+-][0-9a-z]'
633 $ hg diff -c 4 .hglf/largeX | grep '^[+-][0-9a-z]'
642 +fa44618ea25181aff4f48b70428294790cec9f61
634 +fa44618ea25181aff4f48b70428294790cec9f61
643 $ hg transplant 4
635 $ hg transplant 4
644 applying 07d6153b5c04
636 applying 07d6153b5c04
645 patching file .hglf/large1
637 patching file .hglf/large1
646 Hunk #1 FAILED at 0
638 Hunk #1 FAILED at 0
647 1 out of 1 hunks FAILED -- saving rejects to file .hglf/large1.rej
639 1 out of 1 hunks FAILED -- saving rejects to file .hglf/large1.rej
648 patch failed to apply
640 patch failed to apply
649 abort: fix up the working directory and run hg transplant --continue
641 abort: fix up the working directory and run hg transplant --continue
650 [255]
642 [255]
651 $ hg status -A large1
643 $ hg status -A large1
652 C large1
644 C large1
653 $ cat .hglf/large1
645 $ cat .hglf/large1
654 e5bb990443d6a92aaf7223813720f7566c9dd05b
646 e5bb990443d6a92aaf7223813720f7566c9dd05b
655 $ cat large1
647 $ cat large1
656 large1 in #3
648 large1 in #3
657 $ hg status -A largeX
649 $ hg status -A largeX
658 A largeX
650 A largeX
659 $ cat .hglf/largeX
651 $ cat .hglf/largeX
660 fa44618ea25181aff4f48b70428294790cec9f61
652 fa44618ea25181aff4f48b70428294790cec9f61
661 $ cat largeX
653 $ cat largeX
662 largeX
654 largeX
663
655
664 Test that transplant updates standins for manually modified largefiles
656 Test that transplant updates standins for manually modified largefiles
665 at the 1st commit of resuming.
657 at the 1st commit of resuming.
666
658
667 $ echo "manually modified before 'hg transplant --continue'" > large1
659 $ echo "manually modified before 'hg transplant --continue'" > large1
668 $ hg transplant --continue
660 $ hg transplant --continue
669 07d6153b5c04 transplanted as f1bf30eb88cc
661 07d6153b5c04 transplanted as f1bf30eb88cc
670 $ hg diff -c tip .hglf/large1 | grep '^[+-][0-9a-z]'
662 $ hg diff -c tip .hglf/large1 | grep '^[+-][0-9a-z]'
671 -e5bb990443d6a92aaf7223813720f7566c9dd05b
663 -e5bb990443d6a92aaf7223813720f7566c9dd05b
672 +6a4f36d4075fbe0f30ec1d26ca44e63c05903671
664 +6a4f36d4075fbe0f30ec1d26ca44e63c05903671
673 $ rm -f large1
665 $ rm -f large1
674 $ hg update -q -C tip
666 $ hg update -q -C tip
675 $ cat large1
667 $ cat large1
676 manually modified before 'hg transplant --continue'
668 manually modified before 'hg transplant --continue'
677
669
678 Test that "hg status" doesn't show removal of largefiles not managed
670 Test that "hg status" doesn't show removal of largefiles not managed
679 in the target context.
671 in the target context.
680
672
681 $ hg update -q -C 4
673 $ hg update -q -C 4
682 $ hg remove largeX
674 $ hg remove largeX
683 $ hg status -A largeX
675 $ hg status -A largeX
684 R largeX
676 R largeX
685 $ hg status -A --rev '.^1' largeX
677 $ hg status -A --rev '.^1' largeX
686
678
687 #if execbit
679 #if execbit
688
680
689 Test that "hg status" against revisions other than parent notices exec
681 Test that "hg status" against revisions other than parent notices exec
690 bit changes of largefiles.
682 bit changes of largefiles.
691
683
692 $ hg update -q -C 4
684 $ hg update -q -C 4
693
685
694 (the case that large2 doesn't have exec bit in the target context but
686 (the case that large2 doesn't have exec bit in the target context but
695 in the working context)
687 in the working context)
696
688
697 $ chmod +x large2
689 $ chmod +x large2
698 $ hg status -A --rev 0 large2
690 $ hg status -A --rev 0 large2
699 M large2
691 M large2
700 $ hg commit -m 'chmod +x large2'
692 $ hg commit -m 'chmod +x large2'
701
693
702 (the case that large2 has exec bit in the target context but not in
694 (the case that large2 has exec bit in the target context but not in
703 the working context)
695 the working context)
704
696
705 $ echo dummy > dummy
697 $ echo dummy > dummy
706 $ hg add dummy
698 $ hg add dummy
707 $ hg commit -m 'revision for separation'
699 $ hg commit -m 'revision for separation'
708 $ chmod -x large2
700 $ chmod -x large2
709 $ hg status -A --rev '.^1' large2
701 $ hg status -A --rev '.^1' large2
710 M large2
702 M large2
711
703
712 #else
704 #else
713
705
714 Test that "hg status" against revisions other than parent ignores exec
706 Test that "hg status" against revisions other than parent ignores exec
715 bit correctly on the platform being unaware of it.
707 bit correctly on the platform being unaware of it.
716
708
717 $ hg update -q -C 4
709 $ hg update -q -C 4
718
710
719 $ cat > ../exec-bit.patch <<EOF
711 $ cat > ../exec-bit.patch <<EOF
720 > # HG changeset patch
712 > # HG changeset patch
721 > # User test
713 > # User test
722 > # Date 0 0
714 > # Date 0 0
723 > # Thu Jan 01 00:00:00 1970 +0000
715 > # Thu Jan 01 00:00:00 1970 +0000
724 > # Node ID be1b433a65b12b27b5519d92213e14f7e1769b90
716 > # Node ID be1b433a65b12b27b5519d92213e14f7e1769b90
725 > # Parent 07d6153b5c04313efb75deec9ba577de7faeb727
717 > # Parent 07d6153b5c04313efb75deec9ba577de7faeb727
726 > chmod +x large2
718 > chmod +x large2
727 >
719 >
728 > diff --git a/.hglf/large2 b/.hglf/large2
720 > diff --git a/.hglf/large2 b/.hglf/large2
729 > old mode 100644
721 > old mode 100644
730 > new mode 100755
722 > new mode 100755
731 > EOF
723 > EOF
732 $ hg import --exact --bypass ../exec-bit.patch
724 $ hg import --exact --bypass ../exec-bit.patch
733 applying ../exec-bit.patch
725 applying ../exec-bit.patch
734 $ hg status -A --rev tip large2
726 $ hg status -A --rev tip large2
735 C large2
727 C large2
736
728
737 #endif
729 #endif
738
730
739 Test a fatal error interrupting an update. Verify that status report dirty
731 Test a fatal error interrupting an update. Verify that status report dirty
740 files correctly after an interrupted update. Also verify that checking all
732 files correctly after an interrupted update. Also verify that checking all
741 hashes reveals it isn't clean.
733 hashes reveals it isn't clean.
742
734
743 Start with clean dirstates:
735 Start with clean dirstates:
744 $ hg up --quiet --clean --rev "8^"
736 $ hg up --quiet --clean --rev "8^"
745 $ sleep 1
737 $ sleep 1
746 $ hg st
738 $ hg st
747 Update standins without updating largefiles - large1 is modified and largeX is
739 Update standins without updating largefiles - large1 is modified and largeX is
748 added:
740 added:
749 $ cat << EOF > ../crashupdatelfiles.py
741 $ cat << EOF > ../crashupdatelfiles.py
750 > import hgext.largefiles.lfutil
742 > import hgext.largefiles.lfutil
751 > def getlfilestoupdate(oldstandins, newstandins):
743 > def getlfilestoupdate(oldstandins, newstandins):
752 > raise SystemExit(7)
744 > raise SystemExit(7)
753 > hgext.largefiles.lfutil.getlfilestoupdate = getlfilestoupdate
745 > hgext.largefiles.lfutil.getlfilestoupdate = getlfilestoupdate
754 > EOF
746 > EOF
755 $ hg up -Cr "8" --config extensions.crashupdatelfiles=../crashupdatelfiles.py
747 $ hg up -Cr "8" --config extensions.crashupdatelfiles=../crashupdatelfiles.py
756 [7]
748 [7]
757 Check large1 content and status ... and that update will undo modifications:
749 Check large1 content and status ... and that update will undo modifications:
758 $ cat large1
750 $ cat large1
759 large1 in #3
751 large1 in #3
760 $ hg st
752 $ hg st
761 M large1
753 M large1
762 ! largeX
754 ! largeX
763 $ hg up -Cr .
755 $ hg up -Cr .
764 getting changed largefiles
756 getting changed largefiles
765 2 largefiles updated, 0 removed
757 2 largefiles updated, 0 removed
766 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
758 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
767 $ cat large1
759 $ cat large1
768 manually modified before 'hg transplant --continue'
760 manually modified before 'hg transplant --continue'
769 $ hg st
761 $ hg st
770 Force largefiles rehashing and check that all changes have been caught by
762 Force largefiles rehashing and check that all changes have been caught by
771 status and update:
763 status and update:
772 $ rm .hg/largefiles/dirstate
764 $ rm .hg/largefiles/dirstate
773 $ hg st
765 $ hg st
774
766
775 $ cd ..
767 $ cd ..
776
768
777 Test that "hg convert" avoids copying largefiles from the working
769 Test that "hg convert" avoids copying largefiles from the working
778 directory into store, because "hg convert" doesn't update largefiles
770 directory into store, because "hg convert" doesn't update largefiles
779 in the working directory (removing files under ".cache/largefiles"
771 in the working directory (removing files under ".cache/largefiles"
780 forces "hg convert" to copy corresponding largefiles)
772 forces "hg convert" to copy corresponding largefiles)
781
773
782 $ cat >> $HGRCPATH <<EOF
774 $ cat >> $HGRCPATH <<EOF
783 > [extensions]
775 > [extensions]
784 > convert =
776 > convert =
785 > EOF
777 > EOF
786
778
787 $ rm $TESTTMP/.cache/largefiles/6a4f36d4075fbe0f30ec1d26ca44e63c05903671
779 $ rm $TESTTMP/.cache/largefiles/6a4f36d4075fbe0f30ec1d26ca44e63c05903671
788 $ hg convert -q repo repo.converted
780 $ hg convert -q repo repo.converted
General Comments 0
You need to be logged in to leave comments. Login now