##// END OF EJS Templates
tests: correct quoting of double quotes in here documents used to write hooks...
Jim Hague -
r17462:8085fed2 stable
parent child Browse files
Show More
@@ -1,372 +1,372
1 $ hg init
1 $ hg init
2
2
3 Setup:
3 Setup:
4
4
5 $ echo a >> a
5 $ echo a >> a
6 $ hg ci -Am 'base'
6 $ hg ci -Am 'base'
7 adding a
7 adding a
8
8
9 Refuse to amend public csets:
9 Refuse to amend public csets:
10
10
11 $ hg phase -r . -p
11 $ hg phase -r . -p
12 $ hg ci --amend
12 $ hg ci --amend
13 abort: cannot amend public changesets
13 abort: cannot amend public changesets
14 [255]
14 [255]
15 $ hg phase -r . -f -d
15 $ hg phase -r . -f -d
16
16
17 $ echo a >> a
17 $ echo a >> a
18 $ hg ci -Am 'base1'
18 $ hg ci -Am 'base1'
19
19
20 Nothing to amend:
20 Nothing to amend:
21
21
22 $ hg ci --amend
22 $ hg ci --amend
23 nothing changed
23 nothing changed
24 [1]
24 [1]
25
25
26 $ cat >> $HGRCPATH <<EOF
26 $ cat >> $HGRCPATH <<EOF
27 > [hooks]
27 > [hooks]
28 > pretxncommit.foo = sh -c "echo \"pretxncommit \$HG_NODE\"; hg id -r \$HG_NODE"
28 > pretxncommit.foo = sh -c "echo \\"pretxncommit \$HG_NODE\\"; hg id -r \$HG_NODE"
29 > EOF
29 > EOF
30
30
31 Amending changeset with changes in working dir:
31 Amending changeset with changes in working dir:
32
32
33 $ echo a >> a
33 $ echo a >> a
34 $ hg ci --amend -m 'amend base1'
34 $ hg ci --amend -m 'amend base1'
35 pretxncommit 9cd25b479c51be2f4ed2c38e7abdf7ce67d8e0dc
35 pretxncommit 9cd25b479c51be2f4ed2c38e7abdf7ce67d8e0dc
36 9cd25b479c51 tip
36 9cd25b479c51 tip
37 saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-amend-backup.hg (glob)
37 saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-amend-backup.hg (glob)
38 $ echo 'pretxncommit.foo = ' >> $HGRCPATH
38 $ echo 'pretxncommit.foo = ' >> $HGRCPATH
39 $ hg diff -c .
39 $ hg diff -c .
40 diff -r ad120869acf0 -r 9cd25b479c51 a
40 diff -r ad120869acf0 -r 9cd25b479c51 a
41 --- a/a Thu Jan 01 00:00:00 1970 +0000
41 --- a/a Thu Jan 01 00:00:00 1970 +0000
42 +++ b/a Thu Jan 01 00:00:00 1970 +0000
42 +++ b/a Thu Jan 01 00:00:00 1970 +0000
43 @@ -1,1 +1,3 @@
43 @@ -1,1 +1,3 @@
44 a
44 a
45 +a
45 +a
46 +a
46 +a
47 $ hg log
47 $ hg log
48 changeset: 1:9cd25b479c51
48 changeset: 1:9cd25b479c51
49 tag: tip
49 tag: tip
50 user: test
50 user: test
51 date: Thu Jan 01 00:00:00 1970 +0000
51 date: Thu Jan 01 00:00:00 1970 +0000
52 summary: amend base1
52 summary: amend base1
53
53
54 changeset: 0:ad120869acf0
54 changeset: 0:ad120869acf0
55 user: test
55 user: test
56 date: Thu Jan 01 00:00:00 1970 +0000
56 date: Thu Jan 01 00:00:00 1970 +0000
57 summary: base
57 summary: base
58
58
59
59
60 Add new file:
60 Add new file:
61
61
62 $ echo b > b
62 $ echo b > b
63 $ hg ci --amend -Am 'amend base1 new file'
63 $ hg ci --amend -Am 'amend base1 new file'
64 adding b
64 adding b
65 saved backup bundle to $TESTTMP/.hg/strip-backup/9cd25b479c51-amend-backup.hg (glob)
65 saved backup bundle to $TESTTMP/.hg/strip-backup/9cd25b479c51-amend-backup.hg (glob)
66
66
67 Remove file that was added in amended commit:
67 Remove file that was added in amended commit:
68
68
69 $ hg rm b
69 $ hg rm b
70 $ hg ci --amend -m 'amend base1 remove new file'
70 $ hg ci --amend -m 'amend base1 remove new file'
71 saved backup bundle to $TESTTMP/.hg/strip-backup/e2bb3ecffd2f-amend-backup.hg (glob)
71 saved backup bundle to $TESTTMP/.hg/strip-backup/e2bb3ecffd2f-amend-backup.hg (glob)
72
72
73 $ hg cat b
73 $ hg cat b
74 b: no such file in rev 664a9b2d60cd
74 b: no such file in rev 664a9b2d60cd
75 [1]
75 [1]
76
76
77 No changes, just a different message:
77 No changes, just a different message:
78
78
79 $ hg ci -v --amend -m 'no changes, new message'
79 $ hg ci -v --amend -m 'no changes, new message'
80 amending changeset 664a9b2d60cd
80 amending changeset 664a9b2d60cd
81 copying changeset 664a9b2d60cd to ad120869acf0
81 copying changeset 664a9b2d60cd to ad120869acf0
82 a
82 a
83 stripping amended changeset 664a9b2d60cd
83 stripping amended changeset 664a9b2d60cd
84 1 changesets found
84 1 changesets found
85 saved backup bundle to $TESTTMP/.hg/strip-backup/664a9b2d60cd-amend-backup.hg (glob)
85 saved backup bundle to $TESTTMP/.hg/strip-backup/664a9b2d60cd-amend-backup.hg (glob)
86 1 changesets found
86 1 changesets found
87 adding branch
87 adding branch
88 adding changesets
88 adding changesets
89 adding manifests
89 adding manifests
90 adding file changes
90 adding file changes
91 added 1 changesets with 1 changes to 1 files
91 added 1 changesets with 1 changes to 1 files
92 committed changeset 1:ea6e356ff2ad
92 committed changeset 1:ea6e356ff2ad
93 $ hg diff -c .
93 $ hg diff -c .
94 diff -r ad120869acf0 -r ea6e356ff2ad a
94 diff -r ad120869acf0 -r ea6e356ff2ad a
95 --- a/a Thu Jan 01 00:00:00 1970 +0000
95 --- a/a Thu Jan 01 00:00:00 1970 +0000
96 +++ b/a Thu Jan 01 00:00:00 1970 +0000
96 +++ b/a Thu Jan 01 00:00:00 1970 +0000
97 @@ -1,1 +1,3 @@
97 @@ -1,1 +1,3 @@
98 a
98 a
99 +a
99 +a
100 +a
100 +a
101 $ hg log
101 $ hg log
102 changeset: 1:ea6e356ff2ad
102 changeset: 1:ea6e356ff2ad
103 tag: tip
103 tag: tip
104 user: test
104 user: test
105 date: Thu Jan 01 00:00:00 1970 +0000
105 date: Thu Jan 01 00:00:00 1970 +0000
106 summary: no changes, new message
106 summary: no changes, new message
107
107
108 changeset: 0:ad120869acf0
108 changeset: 0:ad120869acf0
109 user: test
109 user: test
110 date: Thu Jan 01 00:00:00 1970 +0000
110 date: Thu Jan 01 00:00:00 1970 +0000
111 summary: base
111 summary: base
112
112
113
113
114 Disable default date on commit so when -d isn't given, the old date is preserved:
114 Disable default date on commit so when -d isn't given, the old date is preserved:
115
115
116 $ echo '[defaults]' >> $HGRCPATH
116 $ echo '[defaults]' >> $HGRCPATH
117 $ echo 'commit=' >> $HGRCPATH
117 $ echo 'commit=' >> $HGRCPATH
118
118
119 Test -u/-d:
119 Test -u/-d:
120
120
121 $ hg ci --amend -u foo -d '1 0'
121 $ hg ci --amend -u foo -d '1 0'
122 saved backup bundle to $TESTTMP/.hg/strip-backup/ea6e356ff2ad-amend-backup.hg (glob)
122 saved backup bundle to $TESTTMP/.hg/strip-backup/ea6e356ff2ad-amend-backup.hg (glob)
123 $ echo a >> a
123 $ echo a >> a
124 $ hg ci --amend -u foo -d '1 0'
124 $ hg ci --amend -u foo -d '1 0'
125 saved backup bundle to $TESTTMP/.hg/strip-backup/377b91ce8b56-amend-backup.hg (glob)
125 saved backup bundle to $TESTTMP/.hg/strip-backup/377b91ce8b56-amend-backup.hg (glob)
126 $ hg log -r .
126 $ hg log -r .
127 changeset: 1:2c94e4a5756f
127 changeset: 1:2c94e4a5756f
128 tag: tip
128 tag: tip
129 user: foo
129 user: foo
130 date: Thu Jan 01 00:00:01 1970 +0000
130 date: Thu Jan 01 00:00:01 1970 +0000
131 summary: no changes, new message
131 summary: no changes, new message
132
132
133
133
134 Open editor with old commit message if a message isn't given otherwise:
134 Open editor with old commit message if a message isn't given otherwise:
135
135
136 $ cat > editor.sh << '__EOF__'
136 $ cat > editor.sh << '__EOF__'
137 > #!/bin/sh
137 > #!/bin/sh
138 > cat $1
138 > cat $1
139 > echo "another precious commit message" > "$1"
139 > echo "another precious commit message" > "$1"
140 > __EOF__
140 > __EOF__
141 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v
141 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v
142 amending changeset 2c94e4a5756f
142 amending changeset 2c94e4a5756f
143 copying changeset 2c94e4a5756f to ad120869acf0
143 copying changeset 2c94e4a5756f to ad120869acf0
144 no changes, new message
144 no changes, new message
145
145
146
146
147 HG: Enter commit message. Lines beginning with 'HG:' are removed.
147 HG: Enter commit message. Lines beginning with 'HG:' are removed.
148 HG: Leave message empty to abort commit.
148 HG: Leave message empty to abort commit.
149 HG: --
149 HG: --
150 HG: user: foo
150 HG: user: foo
151 HG: branch 'default'
151 HG: branch 'default'
152 HG: changed a
152 HG: changed a
153 a
153 a
154 stripping amended changeset 2c94e4a5756f
154 stripping amended changeset 2c94e4a5756f
155 1 changesets found
155 1 changesets found
156 saved backup bundle to $TESTTMP/.hg/strip-backup/2c94e4a5756f-amend-backup.hg (glob)
156 saved backup bundle to $TESTTMP/.hg/strip-backup/2c94e4a5756f-amend-backup.hg (glob)
157 1 changesets found
157 1 changesets found
158 adding branch
158 adding branch
159 adding changesets
159 adding changesets
160 adding manifests
160 adding manifests
161 adding file changes
161 adding file changes
162 added 1 changesets with 1 changes to 1 files
162 added 1 changesets with 1 changes to 1 files
163 committed changeset 1:ffb49186f961
163 committed changeset 1:ffb49186f961
164
164
165 Same, but with changes in working dir (different code path):
165 Same, but with changes in working dir (different code path):
166
166
167 $ echo a >> a
167 $ echo a >> a
168 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v
168 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v
169 amending changeset ffb49186f961
169 amending changeset ffb49186f961
170 another precious commit message
170 another precious commit message
171
171
172
172
173 HG: Enter commit message. Lines beginning with 'HG:' are removed.
173 HG: Enter commit message. Lines beginning with 'HG:' are removed.
174 HG: Leave message empty to abort commit.
174 HG: Leave message empty to abort commit.
175 HG: --
175 HG: --
176 HG: user: foo
176 HG: user: foo
177 HG: branch 'default'
177 HG: branch 'default'
178 HG: changed a
178 HG: changed a
179 a
179 a
180 copying changeset 27f3aacd3011 to ad120869acf0
180 copying changeset 27f3aacd3011 to ad120869acf0
181 a
181 a
182 stripping intermediate changeset 27f3aacd3011
182 stripping intermediate changeset 27f3aacd3011
183 stripping amended changeset ffb49186f961
183 stripping amended changeset ffb49186f961
184 2 changesets found
184 2 changesets found
185 saved backup bundle to $TESTTMP/.hg/strip-backup/ffb49186f961-amend-backup.hg (glob)
185 saved backup bundle to $TESTTMP/.hg/strip-backup/ffb49186f961-amend-backup.hg (glob)
186 1 changesets found
186 1 changesets found
187 adding branch
187 adding branch
188 adding changesets
188 adding changesets
189 adding manifests
189 adding manifests
190 adding file changes
190 adding file changes
191 added 1 changesets with 1 changes to 1 files
191 added 1 changesets with 1 changes to 1 files
192 committed changeset 1:fb6cca43446f
192 committed changeset 1:fb6cca43446f
193
193
194 $ rm editor.sh
194 $ rm editor.sh
195 $ hg log -r .
195 $ hg log -r .
196 changeset: 1:fb6cca43446f
196 changeset: 1:fb6cca43446f
197 tag: tip
197 tag: tip
198 user: foo
198 user: foo
199 date: Thu Jan 01 00:00:01 1970 +0000
199 date: Thu Jan 01 00:00:01 1970 +0000
200 summary: another precious commit message
200 summary: another precious commit message
201
201
202
202
203 Moving bookmarks, preserve active bookmark:
203 Moving bookmarks, preserve active bookmark:
204
204
205 $ hg book book1
205 $ hg book book1
206 $ hg book book2
206 $ hg book book2
207 $ hg ci --amend -m 'move bookmarks'
207 $ hg ci --amend -m 'move bookmarks'
208 saved backup bundle to $TESTTMP/.hg/strip-backup/fb6cca43446f-amend-backup.hg (glob)
208 saved backup bundle to $TESTTMP/.hg/strip-backup/fb6cca43446f-amend-backup.hg (glob)
209 $ hg book
209 $ hg book
210 book1 1:0cf1c7a51bcf
210 book1 1:0cf1c7a51bcf
211 * book2 1:0cf1c7a51bcf
211 * book2 1:0cf1c7a51bcf
212 $ echo a >> a
212 $ echo a >> a
213 $ hg ci --amend -m 'move bookmarks'
213 $ hg ci --amend -m 'move bookmarks'
214 saved backup bundle to $TESTTMP/.hg/strip-backup/0cf1c7a51bcf-amend-backup.hg (glob)
214 saved backup bundle to $TESTTMP/.hg/strip-backup/0cf1c7a51bcf-amend-backup.hg (glob)
215 $ hg book
215 $ hg book
216 book1 1:7344472bd951
216 book1 1:7344472bd951
217 * book2 1:7344472bd951
217 * book2 1:7344472bd951
218
218
219 $ echo '[defaults]' >> $HGRCPATH
219 $ echo '[defaults]' >> $HGRCPATH
220 $ echo "commit=-d '0 0'" >> $HGRCPATH
220 $ echo "commit=-d '0 0'" >> $HGRCPATH
221
221
222 Moving branches:
222 Moving branches:
223
223
224 $ hg branch foo
224 $ hg branch foo
225 marked working directory as branch foo
225 marked working directory as branch foo
226 (branches are permanent and global, did you want a bookmark?)
226 (branches are permanent and global, did you want a bookmark?)
227 $ echo a >> a
227 $ echo a >> a
228 $ hg ci -m 'branch foo'
228 $ hg ci -m 'branch foo'
229 $ hg branch default -f
229 $ hg branch default -f
230 marked working directory as branch default
230 marked working directory as branch default
231 (branches are permanent and global, did you want a bookmark?)
231 (branches are permanent and global, did you want a bookmark?)
232 $ hg ci --amend -m 'back to default'
232 $ hg ci --amend -m 'back to default'
233 saved backup bundle to $TESTTMP/.hg/strip-backup/1661ca36a2db-amend-backup.hg (glob)
233 saved backup bundle to $TESTTMP/.hg/strip-backup/1661ca36a2db-amend-backup.hg (glob)
234 $ hg branches
234 $ hg branches
235 default 2:f24ee5961967
235 default 2:f24ee5961967
236
236
237 Close branch:
237 Close branch:
238
238
239 $ hg up -q 0
239 $ hg up -q 0
240 $ echo b >> b
240 $ echo b >> b
241 $ hg branch foo
241 $ hg branch foo
242 marked working directory as branch foo
242 marked working directory as branch foo
243 (branches are permanent and global, did you want a bookmark?)
243 (branches are permanent and global, did you want a bookmark?)
244 $ hg ci -Am 'fork'
244 $ hg ci -Am 'fork'
245 adding b
245 adding b
246 $ echo b >> b
246 $ echo b >> b
247 $ hg ci -mb
247 $ hg ci -mb
248 $ hg ci --amend --close-branch -m 'closing branch foo'
248 $ hg ci --amend --close-branch -m 'closing branch foo'
249 saved backup bundle to $TESTTMP/.hg/strip-backup/c962248fa264-amend-backup.hg (glob)
249 saved backup bundle to $TESTTMP/.hg/strip-backup/c962248fa264-amend-backup.hg (glob)
250
250
251 Same thing, different code path:
251 Same thing, different code path:
252
252
253 $ echo b >> b
253 $ echo b >> b
254 $ hg ci -m 'reopen branch'
254 $ hg ci -m 'reopen branch'
255 reopening closed branch head 4
255 reopening closed branch head 4
256 $ echo b >> b
256 $ echo b >> b
257 $ hg ci --amend --close-branch
257 $ hg ci --amend --close-branch
258 saved backup bundle to $TESTTMP/.hg/strip-backup/5e302dcc12b8-amend-backup.hg (glob)
258 saved backup bundle to $TESTTMP/.hg/strip-backup/5e302dcc12b8-amend-backup.hg (glob)
259 $ hg branches
259 $ hg branches
260 default 2:f24ee5961967
260 default 2:f24ee5961967
261
261
262 Refuse to amend merges:
262 Refuse to amend merges:
263
263
264 $ hg up -q default
264 $ hg up -q default
265 $ hg merge foo
265 $ hg merge foo
266 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
266 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
267 (branch merge, don't forget to commit)
267 (branch merge, don't forget to commit)
268 $ hg ci --amend
268 $ hg ci --amend
269 abort: cannot amend while merging
269 abort: cannot amend while merging
270 [255]
270 [255]
271 $ hg ci -m 'merge'
271 $ hg ci -m 'merge'
272 $ hg ci --amend
272 $ hg ci --amend
273 abort: cannot amend merge changesets
273 abort: cannot amend merge changesets
274 [255]
274 [255]
275
275
276 Follow copies/renames:
276 Follow copies/renames:
277
277
278 $ hg mv b c
278 $ hg mv b c
279 $ hg ci -m 'b -> c'
279 $ hg ci -m 'b -> c'
280 $ hg mv c d
280 $ hg mv c d
281 $ hg ci --amend -m 'b -> d'
281 $ hg ci --amend -m 'b -> d'
282 saved backup bundle to $TESTTMP/.hg/strip-backup/9c207120aa98-amend-backup.hg (glob)
282 saved backup bundle to $TESTTMP/.hg/strip-backup/9c207120aa98-amend-backup.hg (glob)
283 $ hg st --rev '.^' --copies d
283 $ hg st --rev '.^' --copies d
284 A d
284 A d
285 b
285 b
286 $ hg cp d e
286 $ hg cp d e
287 $ hg ci -m 'e = d'
287 $ hg ci -m 'e = d'
288 $ hg cp e f
288 $ hg cp e f
289 $ hg ci --amend -m 'f = d'
289 $ hg ci --amend -m 'f = d'
290 saved backup bundle to $TESTTMP/.hg/strip-backup/fda2b3b27b22-amend-backup.hg (glob)
290 saved backup bundle to $TESTTMP/.hg/strip-backup/fda2b3b27b22-amend-backup.hg (glob)
291 $ hg st --rev '.^' --copies f
291 $ hg st --rev '.^' --copies f
292 A f
292 A f
293 d
293 d
294
294
295 $ mv f f.orig
295 $ mv f f.orig
296 $ hg rm -A f
296 $ hg rm -A f
297 $ hg ci -m removef
297 $ hg ci -m removef
298 $ hg cp a f
298 $ hg cp a f
299 $ mv f.orig f
299 $ mv f.orig f
300 $ hg ci --amend -m replacef
300 $ hg ci --amend -m replacef
301 saved backup bundle to $TESTTMP/.hg/strip-backup/20a7413547f9-amend-backup.hg (glob)
301 saved backup bundle to $TESTTMP/.hg/strip-backup/20a7413547f9-amend-backup.hg (glob)
302 $ hg st --change . --copies
302 $ hg st --change . --copies
303 $ hg log -r . --template "{file_copies}\n"
303 $ hg log -r . --template "{file_copies}\n"
304
304
305
305
306 Move added file (issue3410):
306 Move added file (issue3410):
307
307
308 $ echo g >> g
308 $ echo g >> g
309 $ hg ci -Am g
309 $ hg ci -Am g
310 adding g
310 adding g
311 $ hg mv g h
311 $ hg mv g h
312 $ hg ci --amend
312 $ hg ci --amend
313 saved backup bundle to $TESTTMP/.hg/strip-backup/5daa77a5d616-amend-backup.hg (glob)
313 saved backup bundle to $TESTTMP/.hg/strip-backup/5daa77a5d616-amend-backup.hg (glob)
314 $ hg st --change . --copies h
314 $ hg st --change . --copies h
315 A h
315 A h
316 $ hg log -r . --template "{file_copies}\n"
316 $ hg log -r . --template "{file_copies}\n"
317
317
318
318
319 Can't rollback an amend:
319 Can't rollback an amend:
320
320
321 $ hg rollback
321 $ hg rollback
322 no rollback information available
322 no rollback information available
323 [1]
323 [1]
324
324
325 Preserve extra dict (issue3430):
325 Preserve extra dict (issue3430):
326
326
327 $ hg branch a
327 $ hg branch a
328 marked working directory as branch a
328 marked working directory as branch a
329 (branches are permanent and global, did you want a bookmark?)
329 (branches are permanent and global, did you want a bookmark?)
330 $ echo a >> a
330 $ echo a >> a
331 $ hg ci -ma
331 $ hg ci -ma
332 $ hg ci --amend -m "a'"
332 $ hg ci --amend -m "a'"
333 saved backup bundle to $TESTTMP/.hg/strip-backup/167f8e3031df-amend-backup.hg (glob)
333 saved backup bundle to $TESTTMP/.hg/strip-backup/167f8e3031df-amend-backup.hg (glob)
334 $ hg log -r . --template "{branch}\n"
334 $ hg log -r . --template "{branch}\n"
335 a
335 a
336 $ hg ci --amend -m "a''"
336 $ hg ci --amend -m "a''"
337 saved backup bundle to $TESTTMP/.hg/strip-backup/ceac1a44c806-amend-backup.hg (glob)
337 saved backup bundle to $TESTTMP/.hg/strip-backup/ceac1a44c806-amend-backup.hg (glob)
338 $ hg log -r . --template "{branch}\n"
338 $ hg log -r . --template "{branch}\n"
339 a
339 a
340
340
341 Also preserve other entries in the dict that are in the old commit,
341 Also preserve other entries in the dict that are in the old commit,
342 first graft something so there's an additional entry:
342 first graft something so there's an additional entry:
343
343
344 $ hg up 0 -q
344 $ hg up 0 -q
345 $ echo z > z
345 $ echo z > z
346 $ hg ci -Am 'fork'
346 $ hg ci -Am 'fork'
347 adding z
347 adding z
348 created new head
348 created new head
349 $ hg up 11
349 $ hg up 11
350 5 files updated, 0 files merged, 1 files removed, 0 files unresolved
350 5 files updated, 0 files merged, 1 files removed, 0 files unresolved
351 $ hg graft 12
351 $ hg graft 12
352 grafting revision 12
352 grafting revision 12
353 $ hg ci --amend -m 'graft amend'
353 $ hg ci --amend -m 'graft amend'
354 saved backup bundle to $TESTTMP/.hg/strip-backup/18a5124daf7a-amend-backup.hg (glob)
354 saved backup bundle to $TESTTMP/.hg/strip-backup/18a5124daf7a-amend-backup.hg (glob)
355 $ hg log -r . --debug | grep extra
355 $ hg log -r . --debug | grep extra
356 extra: branch=a
356 extra: branch=a
357 extra: source=2647734878ef0236dda712fae9c1651cf694ea8a
357 extra: source=2647734878ef0236dda712fae9c1651cf694ea8a
358
358
359 Preserve phase
359 Preserve phase
360
360
361 $ hg phase '.^::.'
361 $ hg phase '.^::.'
362 11: draft
362 11: draft
363 13: draft
363 13: draft
364 $ hg phase --secret --force .
364 $ hg phase --secret --force .
365 $ hg phase '.^::.'
365 $ hg phase '.^::.'
366 11: draft
366 11: draft
367 13: secret
367 13: secret
368 $ hg commit --amend -m 'amend for phase' -q
368 $ hg commit --amend -m 'amend for phase' -q
369 $ hg phase '.^::.'
369 $ hg phase '.^::.'
370 11: draft
370 11: draft
371 13: secret
371 13: secret
372
372
@@ -1,1460 +1,1460
1 $ USERCACHE="$TESTTMP/cache"; export USERCACHE
1 $ USERCACHE="$TESTTMP/cache"; export USERCACHE
2 $ mkdir "${USERCACHE}"
2 $ mkdir "${USERCACHE}"
3 $ cat >> $HGRCPATH <<EOF
3 $ cat >> $HGRCPATH <<EOF
4 > [extensions]
4 > [extensions]
5 > largefiles=
5 > largefiles=
6 > purge=
6 > purge=
7 > rebase=
7 > rebase=
8 > transplant=
8 > transplant=
9 > [phases]
9 > [phases]
10 > publish=False
10 > publish=False
11 > [largefiles]
11 > [largefiles]
12 > minsize=2
12 > minsize=2
13 > patterns=glob:**.dat
13 > patterns=glob:**.dat
14 > usercache=${USERCACHE}
14 > usercache=${USERCACHE}
15 > [hooks]
15 > [hooks]
16 > precommit=sh -c "echo \"Invoking status precommit hook\"; hg status"
16 > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status"
17 > EOF
17 > EOF
18
18
19 Create the repo with a couple of revisions of both large and normal
19 Create the repo with a couple of revisions of both large and normal
20 files, testing that status correctly shows largefiles and that summary output
20 files, testing that status correctly shows largefiles and that summary output
21 is correct.
21 is correct.
22
22
23 $ hg init a
23 $ hg init a
24 $ cd a
24 $ cd a
25 $ mkdir sub
25 $ mkdir sub
26 $ echo normal1 > normal1
26 $ echo normal1 > normal1
27 $ echo normal2 > sub/normal2
27 $ echo normal2 > sub/normal2
28 $ echo large1 > large1
28 $ echo large1 > large1
29 $ echo large2 > sub/large2
29 $ echo large2 > sub/large2
30 $ hg add normal1 sub/normal2
30 $ hg add normal1 sub/normal2
31 $ hg add --large large1 sub/large2
31 $ hg add --large large1 sub/large2
32 $ hg commit -m "add files"
32 $ hg commit -m "add files"
33 Invoking status precommit hook
33 Invoking status precommit hook
34 A large1
34 A large1
35 A normal1
35 A normal1
36 A sub/large2
36 A sub/large2
37 A sub/normal2
37 A sub/normal2
38 $ echo normal11 > normal1
38 $ echo normal11 > normal1
39 $ echo normal22 > sub/normal2
39 $ echo normal22 > sub/normal2
40 $ echo large11 > large1
40 $ echo large11 > large1
41 $ echo large22 > sub/large2
41 $ echo large22 > sub/large2
42 $ hg commit -m "edit files"
42 $ hg commit -m "edit files"
43 Invoking status precommit hook
43 Invoking status precommit hook
44 M large1
44 M large1
45 M normal1
45 M normal1
46 M sub/large2
46 M sub/large2
47 M sub/normal2
47 M sub/normal2
48 $ hg sum --large
48 $ hg sum --large
49 parent: 1:ce8896473775 tip
49 parent: 1:ce8896473775 tip
50 edit files
50 edit files
51 branch: default
51 branch: default
52 commit: (clean)
52 commit: (clean)
53 update: (current)
53 update: (current)
54 largefiles: No remote repo
54 largefiles: No remote repo
55
55
56 Commit preserved largefile contents.
56 Commit preserved largefile contents.
57
57
58 $ cat normal1
58 $ cat normal1
59 normal11
59 normal11
60 $ cat large1
60 $ cat large1
61 large11
61 large11
62 $ cat sub/normal2
62 $ cat sub/normal2
63 normal22
63 normal22
64 $ cat sub/large2
64 $ cat sub/large2
65 large22
65 large22
66
66
67 Test status, subdir and unknown files
67 Test status, subdir and unknown files
68
68
69 $ echo unknown > sub/unknown
69 $ echo unknown > sub/unknown
70 $ hg st --all
70 $ hg st --all
71 ? sub/unknown
71 ? sub/unknown
72 C large1
72 C large1
73 C normal1
73 C normal1
74 C sub/large2
74 C sub/large2
75 C sub/normal2
75 C sub/normal2
76 $ hg st --all sub
76 $ hg st --all sub
77 ? sub/unknown
77 ? sub/unknown
78 C sub/large2
78 C sub/large2
79 C sub/normal2
79 C sub/normal2
80 $ rm sub/unknown
80 $ rm sub/unknown
81
81
82 Remove both largefiles and normal files.
82 Remove both largefiles and normal files.
83
83
84 $ hg remove normal1 large1
84 $ hg remove normal1 large1
85 $ hg status large1
85 $ hg status large1
86 R large1
86 R large1
87 $ hg commit -m "remove files"
87 $ hg commit -m "remove files"
88 Invoking status precommit hook
88 Invoking status precommit hook
89 R large1
89 R large1
90 R normal1
90 R normal1
91 $ ls
91 $ ls
92 sub
92 sub
93 $ echo "testlargefile" > large1-test
93 $ echo "testlargefile" > large1-test
94 $ hg add --large large1-test
94 $ hg add --large large1-test
95 $ hg st
95 $ hg st
96 A large1-test
96 A large1-test
97 $ hg rm large1-test
97 $ hg rm large1-test
98 not removing large1-test: file has been marked for add (use forget to undo)
98 not removing large1-test: file has been marked for add (use forget to undo)
99 $ hg st
99 $ hg st
100 A large1-test
100 A large1-test
101 $ hg forget large1-test
101 $ hg forget large1-test
102 $ hg st
102 $ hg st
103 ? large1-test
103 ? large1-test
104 $ rm large1-test
104 $ rm large1-test
105
105
106 Copy both largefiles and normal files (testing that status output is correct).
106 Copy both largefiles and normal files (testing that status output is correct).
107
107
108 $ hg cp sub/normal2 normal1
108 $ hg cp sub/normal2 normal1
109 $ hg cp sub/large2 large1
109 $ hg cp sub/large2 large1
110 $ hg commit -m "copy files"
110 $ hg commit -m "copy files"
111 Invoking status precommit hook
111 Invoking status precommit hook
112 A large1
112 A large1
113 A normal1
113 A normal1
114 $ cat normal1
114 $ cat normal1
115 normal22
115 normal22
116 $ cat large1
116 $ cat large1
117 large22
117 large22
118
118
119 Test moving largefiles and verify that normal files are also unaffected.
119 Test moving largefiles and verify that normal files are also unaffected.
120
120
121 $ hg mv normal1 normal3
121 $ hg mv normal1 normal3
122 $ hg mv large1 large3
122 $ hg mv large1 large3
123 $ hg mv sub/normal2 sub/normal4
123 $ hg mv sub/normal2 sub/normal4
124 $ hg mv sub/large2 sub/large4
124 $ hg mv sub/large2 sub/large4
125 $ hg commit -m "move files"
125 $ hg commit -m "move files"
126 Invoking status precommit hook
126 Invoking status precommit hook
127 A large3
127 A large3
128 A normal3
128 A normal3
129 A sub/large4
129 A sub/large4
130 A sub/normal4
130 A sub/normal4
131 R large1
131 R large1
132 R normal1
132 R normal1
133 R sub/large2
133 R sub/large2
134 R sub/normal2
134 R sub/normal2
135 $ cat normal3
135 $ cat normal3
136 normal22
136 normal22
137 $ cat large3
137 $ cat large3
138 large22
138 large22
139 $ cat sub/normal4
139 $ cat sub/normal4
140 normal22
140 normal22
141 $ cat sub/large4
141 $ cat sub/large4
142 large22
142 large22
143
143
144 Test copies and moves from a directory other than root (issue3516)
144 Test copies and moves from a directory other than root (issue3516)
145
145
146 $ cd ..
146 $ cd ..
147 $ hg init lf_cpmv
147 $ hg init lf_cpmv
148 $ cd lf_cpmv
148 $ cd lf_cpmv
149 $ mkdir dira
149 $ mkdir dira
150 $ mkdir dira/dirb
150 $ mkdir dira/dirb
151 $ touch dira/dirb/largefile
151 $ touch dira/dirb/largefile
152 $ hg add --large dira/dirb/largefile
152 $ hg add --large dira/dirb/largefile
153 $ hg commit -m "added"
153 $ hg commit -m "added"
154 Invoking status precommit hook
154 Invoking status precommit hook
155 A dira/dirb/largefile
155 A dira/dirb/largefile
156 $ cd dira
156 $ cd dira
157 $ hg cp dirb/largefile foo/largefile
157 $ hg cp dirb/largefile foo/largefile
158 $ hg ci -m "deep copy"
158 $ hg ci -m "deep copy"
159 Invoking status precommit hook
159 Invoking status precommit hook
160 A dira/foo/largefile
160 A dira/foo/largefile
161 $ find . | sort
161 $ find . | sort
162 .
162 .
163 ./dirb
163 ./dirb
164 ./dirb/largefile
164 ./dirb/largefile
165 ./foo
165 ./foo
166 ./foo/largefile
166 ./foo/largefile
167 $ hg mv foo/largefile baz/largefile
167 $ hg mv foo/largefile baz/largefile
168 $ hg ci -m "moved"
168 $ hg ci -m "moved"
169 Invoking status precommit hook
169 Invoking status precommit hook
170 A dira/baz/largefile
170 A dira/baz/largefile
171 R dira/foo/largefile
171 R dira/foo/largefile
172 $ find . | sort
172 $ find . | sort
173 .
173 .
174 ./baz
174 ./baz
175 ./baz/largefile
175 ./baz/largefile
176 ./dirb
176 ./dirb
177 ./dirb/largefile
177 ./dirb/largefile
178 ./foo
178 ./foo
179 $ cd ../../a
179 $ cd ../../a
180
180
181 #if hgweb
181 #if hgweb
182 Test display of largefiles in hgweb
182 Test display of largefiles in hgweb
183
183
184 $ hg serve -d -p $HGPORT --pid-file ../hg.pid
184 $ hg serve -d -p $HGPORT --pid-file ../hg.pid
185 $ cat ../hg.pid >> $DAEMON_PIDS
185 $ cat ../hg.pid >> $DAEMON_PIDS
186 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/?style=raw'
186 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/?style=raw'
187 200 Script output follows
187 200 Script output follows
188
188
189
189
190 drwxr-xr-x sub
190 drwxr-xr-x sub
191 -rw-r--r-- 41 large3
191 -rw-r--r-- 41 large3
192 -rw-r--r-- 9 normal3
192 -rw-r--r-- 9 normal3
193
193
194
194
195 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/sub/?style=raw'
195 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/sub/?style=raw'
196 200 Script output follows
196 200 Script output follows
197
197
198
198
199 -rw-r--r-- 41 large4
199 -rw-r--r-- 41 large4
200 -rw-r--r-- 9 normal4
200 -rw-r--r-- 9 normal4
201
201
202
202
203 $ "$TESTDIR/killdaemons.py"
203 $ "$TESTDIR/killdaemons.py"
204 #endif
204 #endif
205
205
206 Test archiving the various revisions. These hit corner cases known with
206 Test archiving the various revisions. These hit corner cases known with
207 archiving.
207 archiving.
208
208
209 $ hg archive -r 0 ../archive0
209 $ hg archive -r 0 ../archive0
210 $ hg archive -r 1 ../archive1
210 $ hg archive -r 1 ../archive1
211 $ hg archive -r 2 ../archive2
211 $ hg archive -r 2 ../archive2
212 $ hg archive -r 3 ../archive3
212 $ hg archive -r 3 ../archive3
213 $ hg archive -r 4 ../archive4
213 $ hg archive -r 4 ../archive4
214 $ cd ../archive0
214 $ cd ../archive0
215 $ cat normal1
215 $ cat normal1
216 normal1
216 normal1
217 $ cat large1
217 $ cat large1
218 large1
218 large1
219 $ cat sub/normal2
219 $ cat sub/normal2
220 normal2
220 normal2
221 $ cat sub/large2
221 $ cat sub/large2
222 large2
222 large2
223 $ cd ../archive1
223 $ cd ../archive1
224 $ cat normal1
224 $ cat normal1
225 normal11
225 normal11
226 $ cat large1
226 $ cat large1
227 large11
227 large11
228 $ cat sub/normal2
228 $ cat sub/normal2
229 normal22
229 normal22
230 $ cat sub/large2
230 $ cat sub/large2
231 large22
231 large22
232 $ cd ../archive2
232 $ cd ../archive2
233 $ ls
233 $ ls
234 sub
234 sub
235 $ cat sub/normal2
235 $ cat sub/normal2
236 normal22
236 normal22
237 $ cat sub/large2
237 $ cat sub/large2
238 large22
238 large22
239 $ cd ../archive3
239 $ cd ../archive3
240 $ cat normal1
240 $ cat normal1
241 normal22
241 normal22
242 $ cat large1
242 $ cat large1
243 large22
243 large22
244 $ cat sub/normal2
244 $ cat sub/normal2
245 normal22
245 normal22
246 $ cat sub/large2
246 $ cat sub/large2
247 large22
247 large22
248 $ cd ../archive4
248 $ cd ../archive4
249 $ cat normal3
249 $ cat normal3
250 normal22
250 normal22
251 $ cat large3
251 $ cat large3
252 large22
252 large22
253 $ cat sub/normal4
253 $ cat sub/normal4
254 normal22
254 normal22
255 $ cat sub/large4
255 $ cat sub/large4
256 large22
256 large22
257
257
258 Commit corner case: specify files to commit.
258 Commit corner case: specify files to commit.
259
259
260 $ cd ../a
260 $ cd ../a
261 $ echo normal3 > normal3
261 $ echo normal3 > normal3
262 $ echo large3 > large3
262 $ echo large3 > large3
263 $ echo normal4 > sub/normal4
263 $ echo normal4 > sub/normal4
264 $ echo large4 > sub/large4
264 $ echo large4 > sub/large4
265 $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again"
265 $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again"
266 Invoking status precommit hook
266 Invoking status precommit hook
267 M large3
267 M large3
268 M normal3
268 M normal3
269 M sub/large4
269 M sub/large4
270 M sub/normal4
270 M sub/normal4
271 $ cat normal3
271 $ cat normal3
272 normal3
272 normal3
273 $ cat large3
273 $ cat large3
274 large3
274 large3
275 $ cat sub/normal4
275 $ cat sub/normal4
276 normal4
276 normal4
277 $ cat sub/large4
277 $ cat sub/large4
278 large4
278 large4
279
279
280 One more commit corner case: commit from a subdirectory.
280 One more commit corner case: commit from a subdirectory.
281
281
282 $ cd ../a
282 $ cd ../a
283 $ echo normal33 > normal3
283 $ echo normal33 > normal3
284 $ echo large33 > large3
284 $ echo large33 > large3
285 $ echo normal44 > sub/normal4
285 $ echo normal44 > sub/normal4
286 $ echo large44 > sub/large4
286 $ echo large44 > sub/large4
287 $ cd sub
287 $ cd sub
288 $ hg commit -m "edit files yet again"
288 $ hg commit -m "edit files yet again"
289 Invoking status precommit hook
289 Invoking status precommit hook
290 M large3
290 M large3
291 M normal3
291 M normal3
292 M sub/large4
292 M sub/large4
293 M sub/normal4
293 M sub/normal4
294 $ cat ../normal3
294 $ cat ../normal3
295 normal33
295 normal33
296 $ cat ../large3
296 $ cat ../large3
297 large33
297 large33
298 $ cat normal4
298 $ cat normal4
299 normal44
299 normal44
300 $ cat large4
300 $ cat large4
301 large44
301 large44
302
302
303 Committing standins is not allowed.
303 Committing standins is not allowed.
304
304
305 $ cd ..
305 $ cd ..
306 $ echo large3 > large3
306 $ echo large3 > large3
307 $ hg commit .hglf/large3 -m "try to commit standin"
307 $ hg commit .hglf/large3 -m "try to commit standin"
308 abort: file ".hglf/large3" is a largefile standin
308 abort: file ".hglf/large3" is a largefile standin
309 (commit the largefile itself instead)
309 (commit the largefile itself instead)
310 [255]
310 [255]
311
311
312 Corner cases for adding largefiles.
312 Corner cases for adding largefiles.
313
313
314 $ echo large5 > large5
314 $ echo large5 > large5
315 $ hg add --large large5
315 $ hg add --large large5
316 $ hg add --large large5
316 $ hg add --large large5
317 large5 already a largefile
317 large5 already a largefile
318 $ mkdir sub2
318 $ mkdir sub2
319 $ echo large6 > sub2/large6
319 $ echo large6 > sub2/large6
320 $ echo large7 > sub2/large7
320 $ echo large7 > sub2/large7
321 $ hg add --large sub2
321 $ hg add --large sub2
322 adding sub2/large6 as a largefile (glob)
322 adding sub2/large6 as a largefile (glob)
323 adding sub2/large7 as a largefile (glob)
323 adding sub2/large7 as a largefile (glob)
324 $ hg st
324 $ hg st
325 M large3
325 M large3
326 A large5
326 A large5
327 A sub2/large6
327 A sub2/large6
328 A sub2/large7
328 A sub2/large7
329
329
330 Test "hg status" with combination of 'file pattern' and 'directory
330 Test "hg status" with combination of 'file pattern' and 'directory
331 pattern' for largefiles:
331 pattern' for largefiles:
332
332
333 $ hg status sub2/large6 sub2
333 $ hg status sub2/large6 sub2
334 A sub2/large6
334 A sub2/large6
335 A sub2/large7
335 A sub2/large7
336
336
337 Config settings (pattern **.dat, minsize 2 MB) are respected.
337 Config settings (pattern **.dat, minsize 2 MB) are respected.
338
338
339 $ echo testdata > test.dat
339 $ echo testdata > test.dat
340 $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null
340 $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null
341 $ hg add
341 $ hg add
342 adding reallylarge as a largefile
342 adding reallylarge as a largefile
343 adding test.dat as a largefile
343 adding test.dat as a largefile
344
344
345 Test that minsize and --lfsize handle float values;
345 Test that minsize and --lfsize handle float values;
346 also tests that --lfsize overrides largefiles.minsize.
346 also tests that --lfsize overrides largefiles.minsize.
347 (0.250 MB = 256 kB = 262144 B)
347 (0.250 MB = 256 kB = 262144 B)
348
348
349 $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null
349 $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null
350 $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null
350 $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null
351 $ hg --config largefiles.minsize=.25 add
351 $ hg --config largefiles.minsize=.25 add
352 adding ratherlarge as a largefile
352 adding ratherlarge as a largefile
353 adding medium
353 adding medium
354 $ hg forget medium
354 $ hg forget medium
355 $ hg --config largefiles.minsize=.25 add --lfsize=.125
355 $ hg --config largefiles.minsize=.25 add --lfsize=.125
356 adding medium as a largefile
356 adding medium as a largefile
357 $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null
357 $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null
358 $ hg --config largefiles.minsize=.25 add --lfsize=.125
358 $ hg --config largefiles.minsize=.25 add --lfsize=.125
359 adding notlarge
359 adding notlarge
360 $ hg forget notlarge
360 $ hg forget notlarge
361
361
362 Test forget on largefiles.
362 Test forget on largefiles.
363
363
364 $ hg forget large3 large5 test.dat reallylarge ratherlarge medium
364 $ hg forget large3 large5 test.dat reallylarge ratherlarge medium
365 $ hg commit -m "add/edit more largefiles"
365 $ hg commit -m "add/edit more largefiles"
366 Invoking status precommit hook
366 Invoking status precommit hook
367 A sub2/large6
367 A sub2/large6
368 A sub2/large7
368 A sub2/large7
369 R large3
369 R large3
370 ? large5
370 ? large5
371 ? medium
371 ? medium
372 ? notlarge
372 ? notlarge
373 ? ratherlarge
373 ? ratherlarge
374 ? reallylarge
374 ? reallylarge
375 ? test.dat
375 ? test.dat
376 $ hg st
376 $ hg st
377 ? large3
377 ? large3
378 ? large5
378 ? large5
379 ? medium
379 ? medium
380 ? notlarge
380 ? notlarge
381 ? ratherlarge
381 ? ratherlarge
382 ? reallylarge
382 ? reallylarge
383 ? test.dat
383 ? test.dat
384
384
385 Purge with largefiles: verify that largefiles are still in the working
385 Purge with largefiles: verify that largefiles are still in the working
386 dir after a purge.
386 dir after a purge.
387
387
388 $ hg purge --all
388 $ hg purge --all
389 $ cat sub/large4
389 $ cat sub/large4
390 large44
390 large44
391 $ cat sub2/large6
391 $ cat sub2/large6
392 large6
392 large6
393 $ cat sub2/large7
393 $ cat sub2/large7
394 large7
394 large7
395
395
396 Test addremove: verify that files that should be added as largfiles are added as
396 Test addremove: verify that files that should be added as largfiles are added as
397 such and that already-existing largfiles are not added as normal files by
397 such and that already-existing largfiles are not added as normal files by
398 accident.
398 accident.
399
399
400 $ rm normal3
400 $ rm normal3
401 $ rm sub/large4
401 $ rm sub/large4
402 $ echo "testing addremove with patterns" > testaddremove.dat
402 $ echo "testing addremove with patterns" > testaddremove.dat
403 $ echo "normaladdremove" > normaladdremove
403 $ echo "normaladdremove" > normaladdremove
404 $ hg addremove
404 $ hg addremove
405 removing sub/large4
405 removing sub/large4
406 adding testaddremove.dat as a largefile
406 adding testaddremove.dat as a largefile
407 removing normal3
407 removing normal3
408 adding normaladdremove
408 adding normaladdremove
409
409
410 Test addremove with -R
410 Test addremove with -R
411
411
412 $ hg up -C
412 $ hg up -C
413 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
413 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
414 getting changed largefiles
414 getting changed largefiles
415 1 largefiles updated, 0 removed
415 1 largefiles updated, 0 removed
416 $ rm normal3
416 $ rm normal3
417 $ rm sub/large4
417 $ rm sub/large4
418 $ echo "testing addremove with patterns" > testaddremove.dat
418 $ echo "testing addremove with patterns" > testaddremove.dat
419 $ echo "normaladdremove" > normaladdremove
419 $ echo "normaladdremove" > normaladdremove
420 $ cd ..
420 $ cd ..
421 $ hg -R a addremove
421 $ hg -R a addremove
422 removing sub/large4
422 removing sub/large4
423 adding a/testaddremove.dat as a largefile (glob)
423 adding a/testaddremove.dat as a largefile (glob)
424 removing normal3
424 removing normal3
425 adding normaladdremove
425 adding normaladdremove
426 $ cd a
426 $ cd a
427
427
428 Test 3364
428 Test 3364
429 $ hg clone . ../addrm
429 $ hg clone . ../addrm
430 updating to branch default
430 updating to branch default
431 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
431 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
432 getting changed largefiles
432 getting changed largefiles
433 3 largefiles updated, 0 removed
433 3 largefiles updated, 0 removed
434 $ cd ../addrm
434 $ cd ../addrm
435 $ cat >> .hg/hgrc <<EOF
435 $ cat >> .hg/hgrc <<EOF
436 > [hooks]
436 > [hooks]
437 > post-commit.stat=sh -c "echo \"Invoking status postcommit hook\"; hg status -A"
437 > post-commit.stat=sh -c "echo \\"Invoking status postcommit hook\\"; hg status -A"
438 > EOF
438 > EOF
439 $ touch foo
439 $ touch foo
440 $ hg add --large foo
440 $ hg add --large foo
441 $ hg ci -m "add foo"
441 $ hg ci -m "add foo"
442 Invoking status precommit hook
442 Invoking status precommit hook
443 A foo
443 A foo
444 Invoking status postcommit hook
444 Invoking status postcommit hook
445 C foo
445 C foo
446 C normal3
446 C normal3
447 C sub/large4
447 C sub/large4
448 C sub/normal4
448 C sub/normal4
449 C sub2/large6
449 C sub2/large6
450 C sub2/large7
450 C sub2/large7
451 $ rm foo
451 $ rm foo
452 $ hg st
452 $ hg st
453 ! foo
453 ! foo
454 hmm.. no precommit invoked, but there is a postcommit??
454 hmm.. no precommit invoked, but there is a postcommit??
455 $ hg ci -m "will not checkin"
455 $ hg ci -m "will not checkin"
456 nothing changed
456 nothing changed
457 Invoking status postcommit hook
457 Invoking status postcommit hook
458 ! foo
458 ! foo
459 C normal3
459 C normal3
460 C sub/large4
460 C sub/large4
461 C sub/normal4
461 C sub/normal4
462 C sub2/large6
462 C sub2/large6
463 C sub2/large7
463 C sub2/large7
464 [1]
464 [1]
465 $ hg addremove
465 $ hg addremove
466 removing foo
466 removing foo
467 $ hg st
467 $ hg st
468 R foo
468 R foo
469 $ hg ci -m "used to say nothing changed"
469 $ hg ci -m "used to say nothing changed"
470 Invoking status precommit hook
470 Invoking status precommit hook
471 R foo
471 R foo
472 Invoking status postcommit hook
472 Invoking status postcommit hook
473 C normal3
473 C normal3
474 C sub/large4
474 C sub/large4
475 C sub/normal4
475 C sub/normal4
476 C sub2/large6
476 C sub2/large6
477 C sub2/large7
477 C sub2/large7
478 $ hg st
478 $ hg st
479
479
480 Test 3507 (both normal files and largefiles were a problem)
480 Test 3507 (both normal files and largefiles were a problem)
481
481
482 $ touch normal
482 $ touch normal
483 $ touch large
483 $ touch large
484 $ hg add normal
484 $ hg add normal
485 $ hg add --large large
485 $ hg add --large large
486 $ hg ci -m "added"
486 $ hg ci -m "added"
487 Invoking status precommit hook
487 Invoking status precommit hook
488 A large
488 A large
489 A normal
489 A normal
490 Invoking status postcommit hook
490 Invoking status postcommit hook
491 C large
491 C large
492 C normal
492 C normal
493 C normal3
493 C normal3
494 C sub/large4
494 C sub/large4
495 C sub/normal4
495 C sub/normal4
496 C sub2/large6
496 C sub2/large6
497 C sub2/large7
497 C sub2/large7
498 $ hg remove normal
498 $ hg remove normal
499 $ hg addremove --traceback
499 $ hg addremove --traceback
500 $ hg ci -m "addremoved normal"
500 $ hg ci -m "addremoved normal"
501 Invoking status precommit hook
501 Invoking status precommit hook
502 R normal
502 R normal
503 Invoking status postcommit hook
503 Invoking status postcommit hook
504 C large
504 C large
505 C normal3
505 C normal3
506 C sub/large4
506 C sub/large4
507 C sub/normal4
507 C sub/normal4
508 C sub2/large6
508 C sub2/large6
509 C sub2/large7
509 C sub2/large7
510 $ hg up -C '.^'
510 $ hg up -C '.^'
511 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
511 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
512 getting changed largefiles
512 getting changed largefiles
513 0 largefiles updated, 0 removed
513 0 largefiles updated, 0 removed
514 $ hg remove large
514 $ hg remove large
515 $ hg addremove --traceback
515 $ hg addremove --traceback
516 $ hg ci -m "removed large"
516 $ hg ci -m "removed large"
517 Invoking status precommit hook
517 Invoking status precommit hook
518 R large
518 R large
519 created new head
519 created new head
520 Invoking status postcommit hook
520 Invoking status postcommit hook
521 C normal
521 C normal
522 C normal3
522 C normal3
523 C sub/large4
523 C sub/large4
524 C sub/normal4
524 C sub/normal4
525 C sub2/large6
525 C sub2/large6
526 C sub2/large7
526 C sub2/large7
527
527
528 Test that a standin can't be added as a large file
528 Test that a standin can't be added as a large file
529
529
530 $ touch large
530 $ touch large
531 $ hg add --large large
531 $ hg add --large large
532 $ hg ci -m "add"
532 $ hg ci -m "add"
533 Invoking status precommit hook
533 Invoking status precommit hook
534 A large
534 A large
535 Invoking status postcommit hook
535 Invoking status postcommit hook
536 C large
536 C large
537 C normal
537 C normal
538 C normal3
538 C normal3
539 C sub/large4
539 C sub/large4
540 C sub/normal4
540 C sub/normal4
541 C sub2/large6
541 C sub2/large6
542 C sub2/large7
542 C sub2/large7
543 $ hg remove large
543 $ hg remove large
544 $ touch large
544 $ touch large
545 $ hg addremove --config largefiles.patterns=**large --traceback
545 $ hg addremove --config largefiles.patterns=**large --traceback
546 adding large as a largefile
546 adding large as a largefile
547
547
548 Test that outgoing --large works (with revsets too)
548 Test that outgoing --large works (with revsets too)
549 $ hg outgoing --rev '.^' --large
549 $ hg outgoing --rev '.^' --large
550 comparing with $TESTTMP/a (glob)
550 comparing with $TESTTMP/a (glob)
551 searching for changes
551 searching for changes
552 changeset: 8:c02fd3b77ec4
552 changeset: 8:c02fd3b77ec4
553 user: test
553 user: test
554 date: Thu Jan 01 00:00:00 1970 +0000
554 date: Thu Jan 01 00:00:00 1970 +0000
555 summary: add foo
555 summary: add foo
556
556
557 changeset: 9:289dd08c9bbb
557 changeset: 9:289dd08c9bbb
558 user: test
558 user: test
559 date: Thu Jan 01 00:00:00 1970 +0000
559 date: Thu Jan 01 00:00:00 1970 +0000
560 summary: used to say nothing changed
560 summary: used to say nothing changed
561
561
562 changeset: 10:34f23ac6ac12
562 changeset: 10:34f23ac6ac12
563 user: test
563 user: test
564 date: Thu Jan 01 00:00:00 1970 +0000
564 date: Thu Jan 01 00:00:00 1970 +0000
565 summary: added
565 summary: added
566
566
567 changeset: 12:710c1b2f523c
567 changeset: 12:710c1b2f523c
568 parent: 10:34f23ac6ac12
568 parent: 10:34f23ac6ac12
569 user: test
569 user: test
570 date: Thu Jan 01 00:00:00 1970 +0000
570 date: Thu Jan 01 00:00:00 1970 +0000
571 summary: removed large
571 summary: removed large
572
572
573 searching for changes
573 searching for changes
574 largefiles to upload:
574 largefiles to upload:
575 large
575 large
576 foo
576 foo
577
577
578 $ cd ../a
578 $ cd ../a
579
579
580 Clone a largefiles repo.
580 Clone a largefiles repo.
581
581
582 $ hg clone . ../b
582 $ hg clone . ../b
583 updating to branch default
583 updating to branch default
584 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
584 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
585 getting changed largefiles
585 getting changed largefiles
586 3 largefiles updated, 0 removed
586 3 largefiles updated, 0 removed
587 $ cd ../b
587 $ cd ../b
588 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
588 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
589 7:daea875e9014 add/edit more largefiles
589 7:daea875e9014 add/edit more largefiles
590 6:4355d653f84f edit files yet again
590 6:4355d653f84f edit files yet again
591 5:9d5af5072dbd edit files again
591 5:9d5af5072dbd edit files again
592 4:74c02385b94c move files
592 4:74c02385b94c move files
593 3:9e8fbc4bce62 copy files
593 3:9e8fbc4bce62 copy files
594 2:51a0ae4d5864 remove files
594 2:51a0ae4d5864 remove files
595 1:ce8896473775 edit files
595 1:ce8896473775 edit files
596 0:30d30fe6a5be add files
596 0:30d30fe6a5be add files
597 $ cat normal3
597 $ cat normal3
598 normal33
598 normal33
599 $ cat sub/normal4
599 $ cat sub/normal4
600 normal44
600 normal44
601 $ cat sub/large4
601 $ cat sub/large4
602 large44
602 large44
603 $ cat sub2/large6
603 $ cat sub2/large6
604 large6
604 large6
605 $ cat sub2/large7
605 $ cat sub2/large7
606 large7
606 large7
607 $ cd ..
607 $ cd ..
608 $ hg clone a -r 3 c
608 $ hg clone a -r 3 c
609 adding changesets
609 adding changesets
610 adding manifests
610 adding manifests
611 adding file changes
611 adding file changes
612 added 4 changesets with 10 changes to 4 files
612 added 4 changesets with 10 changes to 4 files
613 updating to branch default
613 updating to branch default
614 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
614 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
615 getting changed largefiles
615 getting changed largefiles
616 2 largefiles updated, 0 removed
616 2 largefiles updated, 0 removed
617 $ cd c
617 $ cd c
618 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
618 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
619 3:9e8fbc4bce62 copy files
619 3:9e8fbc4bce62 copy files
620 2:51a0ae4d5864 remove files
620 2:51a0ae4d5864 remove files
621 1:ce8896473775 edit files
621 1:ce8896473775 edit files
622 0:30d30fe6a5be add files
622 0:30d30fe6a5be add files
623 $ cat normal1
623 $ cat normal1
624 normal22
624 normal22
625 $ cat large1
625 $ cat large1
626 large22
626 large22
627 $ cat sub/normal2
627 $ cat sub/normal2
628 normal22
628 normal22
629 $ cat sub/large2
629 $ cat sub/large2
630 large22
630 large22
631
631
632 Old revisions of a clone have correct largefiles content (this also
632 Old revisions of a clone have correct largefiles content (this also
633 tests update).
633 tests update).
634
634
635 $ hg update -r 1
635 $ hg update -r 1
636 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
636 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
637 getting changed largefiles
637 getting changed largefiles
638 1 largefiles updated, 0 removed
638 1 largefiles updated, 0 removed
639 $ cat large1
639 $ cat large1
640 large11
640 large11
641 $ cat sub/large2
641 $ cat sub/large2
642 large22
642 large22
643 $ cd ..
643 $ cd ..
644
644
645 Test cloning with --all-largefiles flag
645 Test cloning with --all-largefiles flag
646
646
647 $ rm "${USERCACHE}"/*
647 $ rm "${USERCACHE}"/*
648 $ hg clone --all-largefiles a a-backup
648 $ hg clone --all-largefiles a a-backup
649 updating to branch default
649 updating to branch default
650 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
650 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
651 getting changed largefiles
651 getting changed largefiles
652 3 largefiles updated, 0 removed
652 3 largefiles updated, 0 removed
653 8 additional largefiles cached
653 8 additional largefiles cached
654
654
655 $ hg clone --all-largefiles a ssh://localhost/a
655 $ hg clone --all-largefiles a ssh://localhost/a
656 abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a
656 abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a
657 [255]
657 [255]
658
658
659 Test pulling with --all-largefiles flag
659 Test pulling with --all-largefiles flag
660
660
661 $ rm -Rf a-backup
661 $ rm -Rf a-backup
662 $ hg clone -r 1 a a-backup
662 $ hg clone -r 1 a a-backup
663 adding changesets
663 adding changesets
664 adding manifests
664 adding manifests
665 adding file changes
665 adding file changes
666 added 2 changesets with 8 changes to 4 files
666 added 2 changesets with 8 changes to 4 files
667 updating to branch default
667 updating to branch default
668 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
668 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
669 getting changed largefiles
669 getting changed largefiles
670 2 largefiles updated, 0 removed
670 2 largefiles updated, 0 removed
671 $ rm "${USERCACHE}"/*
671 $ rm "${USERCACHE}"/*
672 $ cd a-backup
672 $ cd a-backup
673 $ hg pull --all-largefiles
673 $ hg pull --all-largefiles
674 pulling from $TESTTMP/a (glob)
674 pulling from $TESTTMP/a (glob)
675 searching for changes
675 searching for changes
676 adding changesets
676 adding changesets
677 adding manifests
677 adding manifests
678 adding file changes
678 adding file changes
679 added 6 changesets with 16 changes to 8 files
679 added 6 changesets with 16 changes to 8 files
680 (run 'hg update' to get a working copy)
680 (run 'hg update' to get a working copy)
681 caching new largefiles
681 caching new largefiles
682 3 largefiles cached
682 3 largefiles cached
683 3 additional largefiles cached
683 3 additional largefiles cached
684 $ cd ..
684 $ cd ..
685
685
686 Rebasing between two repositories does not revert largefiles to old
686 Rebasing between two repositories does not revert largefiles to old
687 revisions (this was a very bad bug that took a lot of work to fix).
687 revisions (this was a very bad bug that took a lot of work to fix).
688
688
689 $ hg clone a d
689 $ hg clone a d
690 updating to branch default
690 updating to branch default
691 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
691 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
692 getting changed largefiles
692 getting changed largefiles
693 3 largefiles updated, 0 removed
693 3 largefiles updated, 0 removed
694 $ cd b
694 $ cd b
695 $ echo large4-modified > sub/large4
695 $ echo large4-modified > sub/large4
696 $ echo normal3-modified > normal3
696 $ echo normal3-modified > normal3
697 $ hg commit -m "modify normal file and largefile in repo b"
697 $ hg commit -m "modify normal file and largefile in repo b"
698 Invoking status precommit hook
698 Invoking status precommit hook
699 M normal3
699 M normal3
700 M sub/large4
700 M sub/large4
701 $ cd ../d
701 $ cd ../d
702 $ echo large6-modified > sub2/large6
702 $ echo large6-modified > sub2/large6
703 $ echo normal4-modified > sub/normal4
703 $ echo normal4-modified > sub/normal4
704 $ hg commit -m "modify normal file largefile in repo d"
704 $ hg commit -m "modify normal file largefile in repo d"
705 Invoking status precommit hook
705 Invoking status precommit hook
706 M sub/normal4
706 M sub/normal4
707 M sub2/large6
707 M sub2/large6
708 $ cd ..
708 $ cd ..
709 $ hg clone d e
709 $ hg clone d e
710 updating to branch default
710 updating to branch default
711 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
711 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
712 getting changed largefiles
712 getting changed largefiles
713 3 largefiles updated, 0 removed
713 3 largefiles updated, 0 removed
714 $ cd d
714 $ cd d
715 $ hg pull --rebase ../b
715 $ hg pull --rebase ../b
716 pulling from ../b
716 pulling from ../b
717 searching for changes
717 searching for changes
718 adding changesets
718 adding changesets
719 adding manifests
719 adding manifests
720 adding file changes
720 adding file changes
721 added 1 changesets with 2 changes to 2 files (+1 heads)
721 added 1 changesets with 2 changes to 2 files (+1 heads)
722 Invoking status precommit hook
722 Invoking status precommit hook
723 M sub/normal4
723 M sub/normal4
724 M sub2/large6
724 M sub2/large6
725 saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
725 saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
726 nothing to rebase
726 nothing to rebase
727 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
727 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
728 9:598410d3eb9a modify normal file largefile in repo d
728 9:598410d3eb9a modify normal file largefile in repo d
729 8:a381d2c8c80e modify normal file and largefile in repo b
729 8:a381d2c8c80e modify normal file and largefile in repo b
730 7:daea875e9014 add/edit more largefiles
730 7:daea875e9014 add/edit more largefiles
731 6:4355d653f84f edit files yet again
731 6:4355d653f84f edit files yet again
732 5:9d5af5072dbd edit files again
732 5:9d5af5072dbd edit files again
733 4:74c02385b94c move files
733 4:74c02385b94c move files
734 3:9e8fbc4bce62 copy files
734 3:9e8fbc4bce62 copy files
735 2:51a0ae4d5864 remove files
735 2:51a0ae4d5864 remove files
736 1:ce8896473775 edit files
736 1:ce8896473775 edit files
737 0:30d30fe6a5be add files
737 0:30d30fe6a5be add files
738 $ cat normal3
738 $ cat normal3
739 normal3-modified
739 normal3-modified
740 $ cat sub/normal4
740 $ cat sub/normal4
741 normal4-modified
741 normal4-modified
742 $ cat sub/large4
742 $ cat sub/large4
743 large4-modified
743 large4-modified
744 $ cat sub2/large6
744 $ cat sub2/large6
745 large6-modified
745 large6-modified
746 $ cat sub2/large7
746 $ cat sub2/large7
747 large7
747 large7
748 $ cd ../e
748 $ cd ../e
749 $ hg pull ../b
749 $ hg pull ../b
750 pulling from ../b
750 pulling from ../b
751 searching for changes
751 searching for changes
752 adding changesets
752 adding changesets
753 adding manifests
753 adding manifests
754 adding file changes
754 adding file changes
755 added 1 changesets with 2 changes to 2 files (+1 heads)
755 added 1 changesets with 2 changes to 2 files (+1 heads)
756 (run 'hg heads' to see heads, 'hg merge' to merge)
756 (run 'hg heads' to see heads, 'hg merge' to merge)
757 caching new largefiles
757 caching new largefiles
758 0 largefiles cached
758 0 largefiles cached
759 $ hg rebase
759 $ hg rebase
760 Invoking status precommit hook
760 Invoking status precommit hook
761 M sub/normal4
761 M sub/normal4
762 M sub2/large6
762 M sub2/large6
763 saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
763 saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
764 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
764 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
765 9:598410d3eb9a modify normal file largefile in repo d
765 9:598410d3eb9a modify normal file largefile in repo d
766 8:a381d2c8c80e modify normal file and largefile in repo b
766 8:a381d2c8c80e modify normal file and largefile in repo b
767 7:daea875e9014 add/edit more largefiles
767 7:daea875e9014 add/edit more largefiles
768 6:4355d653f84f edit files yet again
768 6:4355d653f84f edit files yet again
769 5:9d5af5072dbd edit files again
769 5:9d5af5072dbd edit files again
770 4:74c02385b94c move files
770 4:74c02385b94c move files
771 3:9e8fbc4bce62 copy files
771 3:9e8fbc4bce62 copy files
772 2:51a0ae4d5864 remove files
772 2:51a0ae4d5864 remove files
773 1:ce8896473775 edit files
773 1:ce8896473775 edit files
774 0:30d30fe6a5be add files
774 0:30d30fe6a5be add files
775 $ cat normal3
775 $ cat normal3
776 normal3-modified
776 normal3-modified
777 $ cat sub/normal4
777 $ cat sub/normal4
778 normal4-modified
778 normal4-modified
779 $ cat sub/large4
779 $ cat sub/large4
780 large4-modified
780 large4-modified
781 $ cat sub2/large6
781 $ cat sub2/large6
782 large6-modified
782 large6-modified
783 $ cat sub2/large7
783 $ cat sub2/large7
784 large7
784 large7
785
785
786 Rollback on largefiles.
786 Rollback on largefiles.
787
787
788 $ echo large4-modified-again > sub/large4
788 $ echo large4-modified-again > sub/large4
789 $ hg commit -m "Modify large4 again"
789 $ hg commit -m "Modify large4 again"
790 Invoking status precommit hook
790 Invoking status precommit hook
791 M sub/large4
791 M sub/large4
792 $ hg rollback
792 $ hg rollback
793 repository tip rolled back to revision 9 (undo commit)
793 repository tip rolled back to revision 9 (undo commit)
794 working directory now based on revision 9
794 working directory now based on revision 9
795 $ hg st
795 $ hg st
796 M sub/large4
796 M sub/large4
797 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
797 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
798 9:598410d3eb9a modify normal file largefile in repo d
798 9:598410d3eb9a modify normal file largefile in repo d
799 8:a381d2c8c80e modify normal file and largefile in repo b
799 8:a381d2c8c80e modify normal file and largefile in repo b
800 7:daea875e9014 add/edit more largefiles
800 7:daea875e9014 add/edit more largefiles
801 6:4355d653f84f edit files yet again
801 6:4355d653f84f edit files yet again
802 5:9d5af5072dbd edit files again
802 5:9d5af5072dbd edit files again
803 4:74c02385b94c move files
803 4:74c02385b94c move files
804 3:9e8fbc4bce62 copy files
804 3:9e8fbc4bce62 copy files
805 2:51a0ae4d5864 remove files
805 2:51a0ae4d5864 remove files
806 1:ce8896473775 edit files
806 1:ce8896473775 edit files
807 0:30d30fe6a5be add files
807 0:30d30fe6a5be add files
808 $ cat sub/large4
808 $ cat sub/large4
809 large4-modified-again
809 large4-modified-again
810
810
811 "update --check" refuses to update with uncommitted changes.
811 "update --check" refuses to update with uncommitted changes.
812 $ hg update --check 8
812 $ hg update --check 8
813 abort: uncommitted local changes
813 abort: uncommitted local changes
814 [255]
814 [255]
815
815
816 "update --clean" leaves correct largefiles in working copy.
816 "update --clean" leaves correct largefiles in working copy.
817
817
818 $ hg update --clean
818 $ hg update --clean
819 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
819 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
820 getting changed largefiles
820 getting changed largefiles
821 1 largefiles updated, 0 removed
821 1 largefiles updated, 0 removed
822 $ cat normal3
822 $ cat normal3
823 normal3-modified
823 normal3-modified
824 $ cat sub/normal4
824 $ cat sub/normal4
825 normal4-modified
825 normal4-modified
826 $ cat sub/large4
826 $ cat sub/large4
827 large4-modified
827 large4-modified
828 $ cat sub2/large6
828 $ cat sub2/large6
829 large6-modified
829 large6-modified
830 $ cat sub2/large7
830 $ cat sub2/large7
831 large7
831 large7
832
832
833 Now "update check" is happy.
833 Now "update check" is happy.
834 $ hg update --check 8
834 $ hg update --check 8
835 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
835 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
836 getting changed largefiles
836 getting changed largefiles
837 1 largefiles updated, 0 removed
837 1 largefiles updated, 0 removed
838 $ hg update --check
838 $ hg update --check
839 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
839 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
840 getting changed largefiles
840 getting changed largefiles
841 1 largefiles updated, 0 removed
841 1 largefiles updated, 0 removed
842
842
843 Test removing empty largefiles directories on update
843 Test removing empty largefiles directories on update
844 $ test -d sub2 && echo "sub2 exists"
844 $ test -d sub2 && echo "sub2 exists"
845 sub2 exists
845 sub2 exists
846 $ hg update -q null
846 $ hg update -q null
847 $ test -d sub2 && echo "error: sub2 should not exist anymore"
847 $ test -d sub2 && echo "error: sub2 should not exist anymore"
848 [1]
848 [1]
849 $ hg update -q
849 $ hg update -q
850
850
851 Test hg remove removes empty largefiles directories
851 Test hg remove removes empty largefiles directories
852 $ test -d sub2 && echo "sub2 exists"
852 $ test -d sub2 && echo "sub2 exists"
853 sub2 exists
853 sub2 exists
854 $ hg remove sub2/*
854 $ hg remove sub2/*
855 $ test -d sub2 && echo "error: sub2 should not exist anymore"
855 $ test -d sub2 && echo "error: sub2 should not exist anymore"
856 [1]
856 [1]
857 $ hg revert sub2/large6 sub2/large7
857 $ hg revert sub2/large6 sub2/large7
858
858
859 "revert" works on largefiles (and normal files too).
859 "revert" works on largefiles (and normal files too).
860 $ echo hack3 >> normal3
860 $ echo hack3 >> normal3
861 $ echo hack4 >> sub/normal4
861 $ echo hack4 >> sub/normal4
862 $ echo hack4 >> sub/large4
862 $ echo hack4 >> sub/large4
863 $ rm sub2/large6
863 $ rm sub2/large6
864 $ hg revert sub2/large6
864 $ hg revert sub2/large6
865 $ hg rm sub2/large6
865 $ hg rm sub2/large6
866 $ echo new >> sub2/large8
866 $ echo new >> sub2/large8
867 $ hg add --large sub2/large8
867 $ hg add --large sub2/large8
868 # XXX we don't really want to report that we're reverting the standin;
868 # XXX we don't really want to report that we're reverting the standin;
869 # that's just an implementation detail. But I don't see an obvious fix. ;-(
869 # that's just an implementation detail. But I don't see an obvious fix. ;-(
870 $ hg revert sub
870 $ hg revert sub
871 reverting .hglf/sub/large4 (glob)
871 reverting .hglf/sub/large4 (glob)
872 reverting sub/normal4 (glob)
872 reverting sub/normal4 (glob)
873 $ hg status
873 $ hg status
874 M normal3
874 M normal3
875 A sub2/large8
875 A sub2/large8
876 R sub2/large6
876 R sub2/large6
877 ? sub/large4.orig
877 ? sub/large4.orig
878 ? sub/normal4.orig
878 ? sub/normal4.orig
879 $ cat sub/normal4
879 $ cat sub/normal4
880 normal4-modified
880 normal4-modified
881 $ cat sub/large4
881 $ cat sub/large4
882 large4-modified
882 large4-modified
883 $ hg revert -a --no-backup
883 $ hg revert -a --no-backup
884 undeleting .hglf/sub2/large6 (glob)
884 undeleting .hglf/sub2/large6 (glob)
885 forgetting .hglf/sub2/large8 (glob)
885 forgetting .hglf/sub2/large8 (glob)
886 reverting normal3
886 reverting normal3
887 $ hg status
887 $ hg status
888 ? sub/large4.orig
888 ? sub/large4.orig
889 ? sub/normal4.orig
889 ? sub/normal4.orig
890 ? sub2/large8
890 ? sub2/large8
891 $ cat normal3
891 $ cat normal3
892 normal3-modified
892 normal3-modified
893 $ cat sub2/large6
893 $ cat sub2/large6
894 large6-modified
894 large6-modified
895 $ rm sub/*.orig sub2/large8
895 $ rm sub/*.orig sub2/large8
896
896
897 revert some files to an older revision
897 revert some files to an older revision
898 $ hg revert --no-backup -r 8 sub2
898 $ hg revert --no-backup -r 8 sub2
899 reverting .hglf/sub2/large6 (glob)
899 reverting .hglf/sub2/large6 (glob)
900 $ cat sub2/large6
900 $ cat sub2/large6
901 large6
901 large6
902 $ hg revert --no-backup -C -r '.^' sub2
902 $ hg revert --no-backup -C -r '.^' sub2
903 reverting .hglf/sub2/large6 (glob)
903 reverting .hglf/sub2/large6 (glob)
904 $ hg revert --no-backup sub2
904 $ hg revert --no-backup sub2
905 reverting .hglf/sub2/large6 (glob)
905 reverting .hglf/sub2/large6 (glob)
906 $ hg status
906 $ hg status
907
907
908 "verify --large" actually verifies largefiles
908 "verify --large" actually verifies largefiles
909
909
910 $ hg verify --large
910 $ hg verify --large
911 checking changesets
911 checking changesets
912 checking manifests
912 checking manifests
913 crosschecking files in changesets and manifests
913 crosschecking files in changesets and manifests
914 checking files
914 checking files
915 10 files, 10 changesets, 28 total revisions
915 10 files, 10 changesets, 28 total revisions
916 searching 1 changesets for largefiles
916 searching 1 changesets for largefiles
917 verified existence of 3 revisions of 3 largefiles
917 verified existence of 3 revisions of 3 largefiles
918
918
919 Merging does not revert to old versions of largefiles and also check
919 Merging does not revert to old versions of largefiles and also check
920 that merging after having pulled from a non-default remote works
920 that merging after having pulled from a non-default remote works
921 correctly.
921 correctly.
922
922
923 $ cd ..
923 $ cd ..
924 $ hg clone -r 7 e temp
924 $ hg clone -r 7 e temp
925 adding changesets
925 adding changesets
926 adding manifests
926 adding manifests
927 adding file changes
927 adding file changes
928 added 8 changesets with 24 changes to 10 files
928 added 8 changesets with 24 changes to 10 files
929 updating to branch default
929 updating to branch default
930 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
930 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
931 getting changed largefiles
931 getting changed largefiles
932 3 largefiles updated, 0 removed
932 3 largefiles updated, 0 removed
933 $ hg clone temp f
933 $ hg clone temp f
934 updating to branch default
934 updating to branch default
935 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
935 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
936 getting changed largefiles
936 getting changed largefiles
937 3 largefiles updated, 0 removed
937 3 largefiles updated, 0 removed
938 # Delete the largefiles in the largefiles system cache so that we have an
938 # Delete the largefiles in the largefiles system cache so that we have an
939 # opportunity to test that caching after a pull works.
939 # opportunity to test that caching after a pull works.
940 $ rm "${USERCACHE}"/*
940 $ rm "${USERCACHE}"/*
941 $ cd f
941 $ cd f
942 $ echo "large4-merge-test" > sub/large4
942 $ echo "large4-merge-test" > sub/large4
943 $ hg commit -m "Modify large4 to test merge"
943 $ hg commit -m "Modify large4 to test merge"
944 Invoking status precommit hook
944 Invoking status precommit hook
945 M sub/large4
945 M sub/large4
946 $ hg pull ../e
946 $ hg pull ../e
947 pulling from ../e
947 pulling from ../e
948 searching for changes
948 searching for changes
949 adding changesets
949 adding changesets
950 adding manifests
950 adding manifests
951 adding file changes
951 adding file changes
952 added 2 changesets with 4 changes to 4 files (+1 heads)
952 added 2 changesets with 4 changes to 4 files (+1 heads)
953 (run 'hg heads' to see heads, 'hg merge' to merge)
953 (run 'hg heads' to see heads, 'hg merge' to merge)
954 caching new largefiles
954 caching new largefiles
955 2 largefiles cached
955 2 largefiles cached
956 $ hg merge
956 $ hg merge
957 merging sub/large4
957 merging sub/large4
958 largefile sub/large4 has a merge conflict
958 largefile sub/large4 has a merge conflict
959 keep (l)ocal or take (o)ther? l
959 keep (l)ocal or take (o)ther? l
960 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
960 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
961 (branch merge, don't forget to commit)
961 (branch merge, don't forget to commit)
962 getting changed largefiles
962 getting changed largefiles
963 1 largefiles updated, 0 removed
963 1 largefiles updated, 0 removed
964 $ hg commit -m "Merge repos e and f"
964 $ hg commit -m "Merge repos e and f"
965 Invoking status precommit hook
965 Invoking status precommit hook
966 M normal3
966 M normal3
967 M sub/normal4
967 M sub/normal4
968 M sub2/large6
968 M sub2/large6
969 $ cat normal3
969 $ cat normal3
970 normal3-modified
970 normal3-modified
971 $ cat sub/normal4
971 $ cat sub/normal4
972 normal4-modified
972 normal4-modified
973 $ cat sub/large4
973 $ cat sub/large4
974 large4-merge-test
974 large4-merge-test
975 $ cat sub2/large6
975 $ cat sub2/large6
976 large6-modified
976 large6-modified
977 $ cat sub2/large7
977 $ cat sub2/large7
978 large7
978 large7
979
979
980 Test status after merging with a branch that introduces a new largefile:
980 Test status after merging with a branch that introduces a new largefile:
981
981
982 $ echo large > large
982 $ echo large > large
983 $ hg add --large large
983 $ hg add --large large
984 $ hg commit -m 'add largefile'
984 $ hg commit -m 'add largefile'
985 Invoking status precommit hook
985 Invoking status precommit hook
986 A large
986 A large
987 $ hg update -q ".^"
987 $ hg update -q ".^"
988 $ echo change >> normal3
988 $ echo change >> normal3
989 $ hg commit -m 'some change'
989 $ hg commit -m 'some change'
990 Invoking status precommit hook
990 Invoking status precommit hook
991 M normal3
991 M normal3
992 created new head
992 created new head
993 $ hg merge
993 $ hg merge
994 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
994 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
995 (branch merge, don't forget to commit)
995 (branch merge, don't forget to commit)
996 getting changed largefiles
996 getting changed largefiles
997 1 largefiles updated, 0 removed
997 1 largefiles updated, 0 removed
998 $ hg status
998 $ hg status
999 M large
999 M large
1000
1000
1001 Test that a normal file and a largefile with the same name and path cannot
1001 Test that a normal file and a largefile with the same name and path cannot
1002 coexist.
1002 coexist.
1003
1003
1004 $ rm sub2/large7
1004 $ rm sub2/large7
1005 $ echo "largeasnormal" > sub2/large7
1005 $ echo "largeasnormal" > sub2/large7
1006 $ hg add sub2/large7
1006 $ hg add sub2/large7
1007 sub2/large7 already a largefile
1007 sub2/large7 already a largefile
1008
1008
1009 Test that transplanting a largefile change works correctly.
1009 Test that transplanting a largefile change works correctly.
1010
1010
1011 $ cd ..
1011 $ cd ..
1012 $ hg clone -r 8 d g
1012 $ hg clone -r 8 d g
1013 adding changesets
1013 adding changesets
1014 adding manifests
1014 adding manifests
1015 adding file changes
1015 adding file changes
1016 added 9 changesets with 26 changes to 10 files
1016 added 9 changesets with 26 changes to 10 files
1017 updating to branch default
1017 updating to branch default
1018 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1018 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1019 getting changed largefiles
1019 getting changed largefiles
1020 3 largefiles updated, 0 removed
1020 3 largefiles updated, 0 removed
1021 $ cd g
1021 $ cd g
1022 $ hg transplant -s ../d 598410d3eb9a
1022 $ hg transplant -s ../d 598410d3eb9a
1023 searching for changes
1023 searching for changes
1024 searching for changes
1024 searching for changes
1025 adding changesets
1025 adding changesets
1026 adding manifests
1026 adding manifests
1027 adding file changes
1027 adding file changes
1028 added 1 changesets with 2 changes to 2 files
1028 added 1 changesets with 2 changes to 2 files
1029 getting changed largefiles
1029 getting changed largefiles
1030 1 largefiles updated, 0 removed
1030 1 largefiles updated, 0 removed
1031 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
1031 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
1032 9:598410d3eb9a modify normal file largefile in repo d
1032 9:598410d3eb9a modify normal file largefile in repo d
1033 8:a381d2c8c80e modify normal file and largefile in repo b
1033 8:a381d2c8c80e modify normal file and largefile in repo b
1034 7:daea875e9014 add/edit more largefiles
1034 7:daea875e9014 add/edit more largefiles
1035 6:4355d653f84f edit files yet again
1035 6:4355d653f84f edit files yet again
1036 5:9d5af5072dbd edit files again
1036 5:9d5af5072dbd edit files again
1037 4:74c02385b94c move files
1037 4:74c02385b94c move files
1038 3:9e8fbc4bce62 copy files
1038 3:9e8fbc4bce62 copy files
1039 2:51a0ae4d5864 remove files
1039 2:51a0ae4d5864 remove files
1040 1:ce8896473775 edit files
1040 1:ce8896473775 edit files
1041 0:30d30fe6a5be add files
1041 0:30d30fe6a5be add files
1042 $ cat normal3
1042 $ cat normal3
1043 normal3-modified
1043 normal3-modified
1044 $ cat sub/normal4
1044 $ cat sub/normal4
1045 normal4-modified
1045 normal4-modified
1046 $ cat sub/large4
1046 $ cat sub/large4
1047 large4-modified
1047 large4-modified
1048 $ cat sub2/large6
1048 $ cat sub2/large6
1049 large6-modified
1049 large6-modified
1050 $ cat sub2/large7
1050 $ cat sub2/large7
1051 large7
1051 large7
1052
1052
1053 Cat a largefile
1053 Cat a largefile
1054 $ hg cat normal3
1054 $ hg cat normal3
1055 normal3-modified
1055 normal3-modified
1056 $ hg cat sub/large4
1056 $ hg cat sub/large4
1057 large4-modified
1057 large4-modified
1058 $ rm "${USERCACHE}"/*
1058 $ rm "${USERCACHE}"/*
1059 $ hg cat -r a381d2c8c80e -o cat.out sub/large4
1059 $ hg cat -r a381d2c8c80e -o cat.out sub/large4
1060 $ cat cat.out
1060 $ cat cat.out
1061 large4-modified
1061 large4-modified
1062 $ rm cat.out
1062 $ rm cat.out
1063 $ hg cat -r a381d2c8c80e normal3
1063 $ hg cat -r a381d2c8c80e normal3
1064 normal3-modified
1064 normal3-modified
1065 $ hg cat -r '.^' normal3
1065 $ hg cat -r '.^' normal3
1066 normal3-modified
1066 normal3-modified
1067 $ hg cat -r '.^' sub/large4
1067 $ hg cat -r '.^' sub/large4
1068 large4-modified
1068 large4-modified
1069
1069
1070 Test that renaming a largefile results in correct output for status
1070 Test that renaming a largefile results in correct output for status
1071
1071
1072 $ hg rename sub/large4 large4-renamed
1072 $ hg rename sub/large4 large4-renamed
1073 $ hg commit -m "test rename output"
1073 $ hg commit -m "test rename output"
1074 Invoking status precommit hook
1074 Invoking status precommit hook
1075 A large4-renamed
1075 A large4-renamed
1076 R sub/large4
1076 R sub/large4
1077 $ cat large4-renamed
1077 $ cat large4-renamed
1078 large4-modified
1078 large4-modified
1079 $ cd sub2
1079 $ cd sub2
1080 $ hg rename large6 large6-renamed
1080 $ hg rename large6 large6-renamed
1081 $ hg st
1081 $ hg st
1082 A sub2/large6-renamed
1082 A sub2/large6-renamed
1083 R sub2/large6
1083 R sub2/large6
1084 $ cd ..
1084 $ cd ..
1085
1085
1086 Test --normal flag
1086 Test --normal flag
1087
1087
1088 $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null
1088 $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null
1089 $ hg add --normal --large new-largefile
1089 $ hg add --normal --large new-largefile
1090 abort: --normal cannot be used with --large
1090 abort: --normal cannot be used with --large
1091 [255]
1091 [255]
1092 $ hg add --normal new-largefile
1092 $ hg add --normal new-largefile
1093 new-largefile: up to 69 MB of RAM may be required to manage this file
1093 new-largefile: up to 69 MB of RAM may be required to manage this file
1094 (use 'hg revert new-largefile' to cancel the pending addition)
1094 (use 'hg revert new-largefile' to cancel the pending addition)
1095 $ cd ..
1095 $ cd ..
1096
1096
1097 #if serve
1097 #if serve
1098 vanilla clients not locked out from largefiles servers on vanilla repos
1098 vanilla clients not locked out from largefiles servers on vanilla repos
1099 $ mkdir r1
1099 $ mkdir r1
1100 $ cd r1
1100 $ cd r1
1101 $ hg init
1101 $ hg init
1102 $ echo c1 > f1
1102 $ echo c1 > f1
1103 $ hg add f1
1103 $ hg add f1
1104 $ hg commit -m "m1"
1104 $ hg commit -m "m1"
1105 Invoking status precommit hook
1105 Invoking status precommit hook
1106 A f1
1106 A f1
1107 $ cd ..
1107 $ cd ..
1108 $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
1108 $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
1109 $ cat hg.pid >> $DAEMON_PIDS
1109 $ cat hg.pid >> $DAEMON_PIDS
1110 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
1110 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
1111 requesting all changes
1111 requesting all changes
1112 adding changesets
1112 adding changesets
1113 adding manifests
1113 adding manifests
1114 adding file changes
1114 adding file changes
1115 added 1 changesets with 1 changes to 1 files
1115 added 1 changesets with 1 changes to 1 files
1116 updating to branch default
1116 updating to branch default
1117 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1117 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1118
1118
1119 largefiles clients still work with vanilla servers
1119 largefiles clients still work with vanilla servers
1120 $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid
1120 $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid
1121 $ cat hg.pid >> $DAEMON_PIDS
1121 $ cat hg.pid >> $DAEMON_PIDS
1122 $ hg clone http://localhost:$HGPORT1 r3
1122 $ hg clone http://localhost:$HGPORT1 r3
1123 requesting all changes
1123 requesting all changes
1124 adding changesets
1124 adding changesets
1125 adding manifests
1125 adding manifests
1126 adding file changes
1126 adding file changes
1127 added 1 changesets with 1 changes to 1 files
1127 added 1 changesets with 1 changes to 1 files
1128 updating to branch default
1128 updating to branch default
1129 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1129 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1130 #endif
1130 #endif
1131
1131
1132
1132
1133 vanilla clients locked out from largefiles http repos
1133 vanilla clients locked out from largefiles http repos
1134 $ mkdir r4
1134 $ mkdir r4
1135 $ cd r4
1135 $ cd r4
1136 $ hg init
1136 $ hg init
1137 $ echo c1 > f1
1137 $ echo c1 > f1
1138 $ hg add --large f1
1138 $ hg add --large f1
1139 $ hg commit -m "m1"
1139 $ hg commit -m "m1"
1140 Invoking status precommit hook
1140 Invoking status precommit hook
1141 A f1
1141 A f1
1142 $ cd ..
1142 $ cd ..
1143
1143
1144 largefiles can be pushed locally (issue3583)
1144 largefiles can be pushed locally (issue3583)
1145 $ hg init dest
1145 $ hg init dest
1146 $ cd r4
1146 $ cd r4
1147 $ hg push ../dest
1147 $ hg push ../dest
1148 pushing to ../dest
1148 pushing to ../dest
1149 searching for changes
1149 searching for changes
1150 searching for changes
1150 searching for changes
1151 adding changesets
1151 adding changesets
1152 adding manifests
1152 adding manifests
1153 adding file changes
1153 adding file changes
1154 added 1 changesets with 1 changes to 1 files
1154 added 1 changesets with 1 changes to 1 files
1155 $ cd ..
1155 $ cd ..
1156
1156
1157 #if serve
1157 #if serve
1158 $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
1158 $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
1159 $ cat hg.pid >> $DAEMON_PIDS
1159 $ cat hg.pid >> $DAEMON_PIDS
1160 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
1160 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
1161 abort: remote error:
1161 abort: remote error:
1162
1162
1163 This repository uses the largefiles extension.
1163 This repository uses the largefiles extension.
1164
1164
1165 Please enable it in your Mercurial config file.
1165 Please enable it in your Mercurial config file.
1166 [255]
1166 [255]
1167
1167
1168 used all HGPORTs, kill all daemons
1168 used all HGPORTs, kill all daemons
1169 $ "$TESTDIR/killdaemons.py"
1169 $ "$TESTDIR/killdaemons.py"
1170 #endif
1170 #endif
1171
1171
1172 vanilla clients locked out from largefiles ssh repos
1172 vanilla clients locked out from largefiles ssh repos
1173 $ hg --config extensions.largefiles=! clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5
1173 $ hg --config extensions.largefiles=! clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5
1174 abort: remote error:
1174 abort: remote error:
1175
1175
1176 This repository uses the largefiles extension.
1176 This repository uses the largefiles extension.
1177
1177
1178 Please enable it in your Mercurial config file.
1178 Please enable it in your Mercurial config file.
1179 [255]
1179 [255]
1180
1180
1181 #if serve
1181 #if serve
1182
1182
1183 largefiles clients refuse to push largefiles repos to vanilla servers
1183 largefiles clients refuse to push largefiles repos to vanilla servers
1184 $ mkdir r6
1184 $ mkdir r6
1185 $ cd r6
1185 $ cd r6
1186 $ hg init
1186 $ hg init
1187 $ echo c1 > f1
1187 $ echo c1 > f1
1188 $ hg add f1
1188 $ hg add f1
1189 $ hg commit -m "m1"
1189 $ hg commit -m "m1"
1190 Invoking status precommit hook
1190 Invoking status precommit hook
1191 A f1
1191 A f1
1192 $ cat >> .hg/hgrc <<!
1192 $ cat >> .hg/hgrc <<!
1193 > [web]
1193 > [web]
1194 > push_ssl = false
1194 > push_ssl = false
1195 > allow_push = *
1195 > allow_push = *
1196 > !
1196 > !
1197 $ cd ..
1197 $ cd ..
1198 $ hg clone r6 r7
1198 $ hg clone r6 r7
1199 updating to branch default
1199 updating to branch default
1200 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1200 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1201 $ cd r7
1201 $ cd r7
1202 $ echo c2 > f2
1202 $ echo c2 > f2
1203 $ hg add --large f2
1203 $ hg add --large f2
1204 $ hg commit -m "m2"
1204 $ hg commit -m "m2"
1205 Invoking status precommit hook
1205 Invoking status precommit hook
1206 A f2
1206 A f2
1207 $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid
1207 $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid
1208 $ cat ../hg.pid >> $DAEMON_PIDS
1208 $ cat ../hg.pid >> $DAEMON_PIDS
1209 $ hg push http://localhost:$HGPORT
1209 $ hg push http://localhost:$HGPORT
1210 pushing to http://localhost:$HGPORT/
1210 pushing to http://localhost:$HGPORT/
1211 searching for changes
1211 searching for changes
1212 abort: http://localhost:$HGPORT/ does not appear to be a largefile store
1212 abort: http://localhost:$HGPORT/ does not appear to be a largefile store
1213 [255]
1213 [255]
1214 $ cd ..
1214 $ cd ..
1215
1215
1216 putlfile errors are shown (issue3123)
1216 putlfile errors are shown (issue3123)
1217 Corrupt the cached largefile in r7 and in the usercache (required for testing on vfat)
1217 Corrupt the cached largefile in r7 and in the usercache (required for testing on vfat)
1218 $ echo corruption > "$TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8"
1218 $ echo corruption > "$TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8"
1219 $ echo corruption > "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8"
1219 $ echo corruption > "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8"
1220 $ hg init empty
1220 $ hg init empty
1221 $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \
1221 $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \
1222 > --config 'web.allow_push=*' --config web.push_ssl=False
1222 > --config 'web.allow_push=*' --config web.push_ssl=False
1223 $ cat hg.pid >> $DAEMON_PIDS
1223 $ cat hg.pid >> $DAEMON_PIDS
1224 $ hg push -R r7 http://localhost:$HGPORT1
1224 $ hg push -R r7 http://localhost:$HGPORT1
1225 pushing to http://localhost:$HGPORT1/
1225 pushing to http://localhost:$HGPORT1/
1226 searching for changes
1226 searching for changes
1227 remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash
1227 remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash
1228 abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob)
1228 abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob)
1229 [255]
1229 [255]
1230 $ rm -rf empty
1230 $ rm -rf empty
1231
1231
1232 Push a largefiles repository to a served empty repository
1232 Push a largefiles repository to a served empty repository
1233 $ hg init r8
1233 $ hg init r8
1234 $ echo c3 > r8/f1
1234 $ echo c3 > r8/f1
1235 $ hg add --large r8/f1 -R r8
1235 $ hg add --large r8/f1 -R r8
1236 $ hg commit -m "m1" -R r8
1236 $ hg commit -m "m1" -R r8
1237 Invoking status precommit hook
1237 Invoking status precommit hook
1238 A f1
1238 A f1
1239 $ hg init empty
1239 $ hg init empty
1240 $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \
1240 $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \
1241 > --config 'web.allow_push=*' --config web.push_ssl=False
1241 > --config 'web.allow_push=*' --config web.push_ssl=False
1242 $ cat hg.pid >> $DAEMON_PIDS
1242 $ cat hg.pid >> $DAEMON_PIDS
1243 $ rm "${USERCACHE}"/*
1243 $ rm "${USERCACHE}"/*
1244 $ hg push -R r8 http://localhost:$HGPORT2
1244 $ hg push -R r8 http://localhost:$HGPORT2
1245 pushing to http://localhost:$HGPORT2/
1245 pushing to http://localhost:$HGPORT2/
1246 searching for changes
1246 searching for changes
1247 searching for changes
1247 searching for changes
1248 remote: adding changesets
1248 remote: adding changesets
1249 remote: adding manifests
1249 remote: adding manifests
1250 remote: adding file changes
1250 remote: adding file changes
1251 remote: added 1 changesets with 1 changes to 1 files
1251 remote: added 1 changesets with 1 changes to 1 files
1252 $ rm -rf empty
1252 $ rm -rf empty
1253
1253
1254 used all HGPORTs, kill all daemons
1254 used all HGPORTs, kill all daemons
1255 $ "$TESTDIR/killdaemons.py"
1255 $ "$TESTDIR/killdaemons.py"
1256
1256
1257 #endif
1257 #endif
1258
1258
1259
1259
1260 #if unix-permissions
1260 #if unix-permissions
1261
1261
1262 Clone a local repository owned by another user
1262 Clone a local repository owned by another user
1263 We have to simulate that here by setting $HOME and removing write permissions
1263 We have to simulate that here by setting $HOME and removing write permissions
1264 $ ORIGHOME="$HOME"
1264 $ ORIGHOME="$HOME"
1265 $ mkdir alice
1265 $ mkdir alice
1266 $ HOME="`pwd`/alice"
1266 $ HOME="`pwd`/alice"
1267 $ cd alice
1267 $ cd alice
1268 $ hg init pubrepo
1268 $ hg init pubrepo
1269 $ cd pubrepo
1269 $ cd pubrepo
1270 $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null
1270 $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null
1271 $ hg add --large a-large-file
1271 $ hg add --large a-large-file
1272 $ hg commit -m "Add a large file"
1272 $ hg commit -m "Add a large file"
1273 Invoking status precommit hook
1273 Invoking status precommit hook
1274 A a-large-file
1274 A a-large-file
1275 $ cd ..
1275 $ cd ..
1276 $ chmod -R a-w pubrepo
1276 $ chmod -R a-w pubrepo
1277 $ cd ..
1277 $ cd ..
1278 $ mkdir bob
1278 $ mkdir bob
1279 $ HOME="`pwd`/bob"
1279 $ HOME="`pwd`/bob"
1280 $ cd bob
1280 $ cd bob
1281 $ hg clone --pull ../alice/pubrepo pubrepo
1281 $ hg clone --pull ../alice/pubrepo pubrepo
1282 requesting all changes
1282 requesting all changes
1283 adding changesets
1283 adding changesets
1284 adding manifests
1284 adding manifests
1285 adding file changes
1285 adding file changes
1286 added 1 changesets with 1 changes to 1 files
1286 added 1 changesets with 1 changes to 1 files
1287 updating to branch default
1287 updating to branch default
1288 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1288 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1289 getting changed largefiles
1289 getting changed largefiles
1290 1 largefiles updated, 0 removed
1290 1 largefiles updated, 0 removed
1291 $ cd ..
1291 $ cd ..
1292 $ chmod -R u+w alice/pubrepo
1292 $ chmod -R u+w alice/pubrepo
1293 $ HOME="$ORIGHOME"
1293 $ HOME="$ORIGHOME"
1294
1294
1295 #endif
1295 #endif
1296
1296
1297 #if symlink
1297 #if symlink
1298
1298
1299 Symlink to a large largefile should behave the same as a symlink to a normal file
1299 Symlink to a large largefile should behave the same as a symlink to a normal file
1300 $ hg init largesymlink
1300 $ hg init largesymlink
1301 $ cd largesymlink
1301 $ cd largesymlink
1302 $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null
1302 $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null
1303 $ hg add --large largefile
1303 $ hg add --large largefile
1304 $ hg commit -m "commit a large file"
1304 $ hg commit -m "commit a large file"
1305 Invoking status precommit hook
1305 Invoking status precommit hook
1306 A largefile
1306 A largefile
1307 $ ln -s largefile largelink
1307 $ ln -s largefile largelink
1308 $ hg add largelink
1308 $ hg add largelink
1309 $ hg commit -m "commit a large symlink"
1309 $ hg commit -m "commit a large symlink"
1310 Invoking status precommit hook
1310 Invoking status precommit hook
1311 A largelink
1311 A largelink
1312 $ rm -f largelink
1312 $ rm -f largelink
1313 $ hg up >/dev/null
1313 $ hg up >/dev/null
1314 $ test -f largelink
1314 $ test -f largelink
1315 [1]
1315 [1]
1316 $ test -L largelink
1316 $ test -L largelink
1317 [1]
1317 [1]
1318 $ rm -f largelink # make next part of the test independent of the previous
1318 $ rm -f largelink # make next part of the test independent of the previous
1319 $ hg up -C >/dev/null
1319 $ hg up -C >/dev/null
1320 $ test -f largelink
1320 $ test -f largelink
1321 $ test -L largelink
1321 $ test -L largelink
1322 $ cd ..
1322 $ cd ..
1323
1323
1324 #endif
1324 #endif
1325
1325
1326 test for pattern matching on 'hg status':
1326 test for pattern matching on 'hg status':
1327 to boost performance, largefiles checks whether specified patterns are
1327 to boost performance, largefiles checks whether specified patterns are
1328 related to largefiles in working directory (NOT to STANDIN) or not.
1328 related to largefiles in working directory (NOT to STANDIN) or not.
1329
1329
1330 $ hg init statusmatch
1330 $ hg init statusmatch
1331 $ cd statusmatch
1331 $ cd statusmatch
1332
1332
1333 $ mkdir -p a/b/c/d
1333 $ mkdir -p a/b/c/d
1334 $ echo normal > a/b/c/d/e.normal.txt
1334 $ echo normal > a/b/c/d/e.normal.txt
1335 $ hg add a/b/c/d/e.normal.txt
1335 $ hg add a/b/c/d/e.normal.txt
1336 $ echo large > a/b/c/d/e.large.txt
1336 $ echo large > a/b/c/d/e.large.txt
1337 $ hg add --large a/b/c/d/e.large.txt
1337 $ hg add --large a/b/c/d/e.large.txt
1338 $ mkdir -p a/b/c/x
1338 $ mkdir -p a/b/c/x
1339 $ echo normal > a/b/c/x/y.normal.txt
1339 $ echo normal > a/b/c/x/y.normal.txt
1340 $ hg add a/b/c/x/y.normal.txt
1340 $ hg add a/b/c/x/y.normal.txt
1341 $ hg commit -m 'add files'
1341 $ hg commit -m 'add files'
1342 Invoking status precommit hook
1342 Invoking status precommit hook
1343 A a/b/c/d/e.large.txt
1343 A a/b/c/d/e.large.txt
1344 A a/b/c/d/e.normal.txt
1344 A a/b/c/d/e.normal.txt
1345 A a/b/c/x/y.normal.txt
1345 A a/b/c/x/y.normal.txt
1346
1346
1347 (1) no pattern: no performance boost
1347 (1) no pattern: no performance boost
1348 $ hg status -A
1348 $ hg status -A
1349 C a/b/c/d/e.large.txt
1349 C a/b/c/d/e.large.txt
1350 C a/b/c/d/e.normal.txt
1350 C a/b/c/d/e.normal.txt
1351 C a/b/c/x/y.normal.txt
1351 C a/b/c/x/y.normal.txt
1352
1352
1353 (2) pattern not related to largefiles: performance boost
1353 (2) pattern not related to largefiles: performance boost
1354 $ hg status -A a/b/c/x
1354 $ hg status -A a/b/c/x
1355 C a/b/c/x/y.normal.txt
1355 C a/b/c/x/y.normal.txt
1356
1356
1357 (3) pattern related to largefiles: no performance boost
1357 (3) pattern related to largefiles: no performance boost
1358 $ hg status -A a/b/c/d
1358 $ hg status -A a/b/c/d
1359 C a/b/c/d/e.large.txt
1359 C a/b/c/d/e.large.txt
1360 C a/b/c/d/e.normal.txt
1360 C a/b/c/d/e.normal.txt
1361
1361
1362 (4) pattern related to STANDIN (not to largefiles): performance boost
1362 (4) pattern related to STANDIN (not to largefiles): performance boost
1363 $ hg status -A .hglf/a
1363 $ hg status -A .hglf/a
1364 C .hglf/a/b/c/d/e.large.txt
1364 C .hglf/a/b/c/d/e.large.txt
1365
1365
1366 (5) mixed case: no performance boost
1366 (5) mixed case: no performance boost
1367 $ hg status -A a/b/c/x a/b/c/d
1367 $ hg status -A a/b/c/x a/b/c/d
1368 C a/b/c/d/e.large.txt
1368 C a/b/c/d/e.large.txt
1369 C a/b/c/d/e.normal.txt
1369 C a/b/c/d/e.normal.txt
1370 C a/b/c/x/y.normal.txt
1370 C a/b/c/x/y.normal.txt
1371
1371
1372 verify that largefiles doesn't break filesets
1372 verify that largefiles doesn't break filesets
1373
1373
1374 $ hg log --rev . --exclude "set:binary()"
1374 $ hg log --rev . --exclude "set:binary()"
1375 changeset: 0:41bd42f10efa
1375 changeset: 0:41bd42f10efa
1376 tag: tip
1376 tag: tip
1377 user: test
1377 user: test
1378 date: Thu Jan 01 00:00:00 1970 +0000
1378 date: Thu Jan 01 00:00:00 1970 +0000
1379 summary: add files
1379 summary: add files
1380
1380
1381 verify that large files in subrepos handled properly
1381 verify that large files in subrepos handled properly
1382 $ hg init subrepo
1382 $ hg init subrepo
1383 $ echo "subrepo = subrepo" > .hgsub
1383 $ echo "subrepo = subrepo" > .hgsub
1384 $ hg add .hgsub
1384 $ hg add .hgsub
1385 $ hg ci -m "add subrepo"
1385 $ hg ci -m "add subrepo"
1386 Invoking status precommit hook
1386 Invoking status precommit hook
1387 A .hgsub
1387 A .hgsub
1388 ? .hgsubstate
1388 ? .hgsubstate
1389 $ echo "rev 1" > subrepo/large.txt
1389 $ echo "rev 1" > subrepo/large.txt
1390 $ hg -R subrepo add --large subrepo/large.txt
1390 $ hg -R subrepo add --large subrepo/large.txt
1391 $ hg sum
1391 $ hg sum
1392 parent: 1:8ee150ea2e9c tip
1392 parent: 1:8ee150ea2e9c tip
1393 add subrepo
1393 add subrepo
1394 branch: default
1394 branch: default
1395 commit: 1 subrepos
1395 commit: 1 subrepos
1396 update: (current)
1396 update: (current)
1397 $ hg st
1397 $ hg st
1398 $ hg st -S
1398 $ hg st -S
1399 A subrepo/large.txt
1399 A subrepo/large.txt
1400 $ hg ci -S -m "commit top repo"
1400 $ hg ci -S -m "commit top repo"
1401 committing subrepository subrepo
1401 committing subrepository subrepo
1402 Invoking status precommit hook
1402 Invoking status precommit hook
1403 A large.txt
1403 A large.txt
1404 Invoking status precommit hook
1404 Invoking status precommit hook
1405 M .hgsubstate
1405 M .hgsubstate
1406 # No differences
1406 # No differences
1407 $ hg st -S
1407 $ hg st -S
1408 $ hg sum
1408 $ hg sum
1409 parent: 2:ce4cd0c527a6 tip
1409 parent: 2:ce4cd0c527a6 tip
1410 commit top repo
1410 commit top repo
1411 branch: default
1411 branch: default
1412 commit: (clean)
1412 commit: (clean)
1413 update: (current)
1413 update: (current)
1414 $ echo "rev 2" > subrepo/large.txt
1414 $ echo "rev 2" > subrepo/large.txt
1415 $ hg st -S
1415 $ hg st -S
1416 M subrepo/large.txt
1416 M subrepo/large.txt
1417 $ hg sum
1417 $ hg sum
1418 parent: 2:ce4cd0c527a6 tip
1418 parent: 2:ce4cd0c527a6 tip
1419 commit top repo
1419 commit top repo
1420 branch: default
1420 branch: default
1421 commit: 1 subrepos
1421 commit: 1 subrepos
1422 update: (current)
1422 update: (current)
1423 $ hg ci -m "this commit should fail without -S"
1423 $ hg ci -m "this commit should fail without -S"
1424 abort: uncommitted changes in subrepo subrepo
1424 abort: uncommitted changes in subrepo subrepo
1425 (use --subrepos for recursive commit)
1425 (use --subrepos for recursive commit)
1426 [255]
1426 [255]
1427
1427
1428 Add a normal file to the subrepo, then test archiving
1428 Add a normal file to the subrepo, then test archiving
1429
1429
1430 $ echo 'normal file' > subrepo/normal.txt
1430 $ echo 'normal file' > subrepo/normal.txt
1431 $ hg -R subrepo add subrepo/normal.txt
1431 $ hg -R subrepo add subrepo/normal.txt
1432
1432
1433 Lock in subrepo, otherwise the change isn't archived
1433 Lock in subrepo, otherwise the change isn't archived
1434
1434
1435 $ hg ci -S -m "add normal file to top level"
1435 $ hg ci -S -m "add normal file to top level"
1436 committing subrepository subrepo
1436 committing subrepository subrepo
1437 Invoking status precommit hook
1437 Invoking status precommit hook
1438 M large.txt
1438 M large.txt
1439 A normal.txt
1439 A normal.txt
1440 Invoking status precommit hook
1440 Invoking status precommit hook
1441 M .hgsubstate
1441 M .hgsubstate
1442 $ hg archive -S lf_subrepo_archive
1442 $ hg archive -S lf_subrepo_archive
1443 $ find lf_subrepo_archive | sort
1443 $ find lf_subrepo_archive | sort
1444 lf_subrepo_archive
1444 lf_subrepo_archive
1445 lf_subrepo_archive/.hg_archival.txt
1445 lf_subrepo_archive/.hg_archival.txt
1446 lf_subrepo_archive/.hgsub
1446 lf_subrepo_archive/.hgsub
1447 lf_subrepo_archive/.hgsubstate
1447 lf_subrepo_archive/.hgsubstate
1448 lf_subrepo_archive/a
1448 lf_subrepo_archive/a
1449 lf_subrepo_archive/a/b
1449 lf_subrepo_archive/a/b
1450 lf_subrepo_archive/a/b/c
1450 lf_subrepo_archive/a/b/c
1451 lf_subrepo_archive/a/b/c/d
1451 lf_subrepo_archive/a/b/c/d
1452 lf_subrepo_archive/a/b/c/d/e.large.txt
1452 lf_subrepo_archive/a/b/c/d/e.large.txt
1453 lf_subrepo_archive/a/b/c/d/e.normal.txt
1453 lf_subrepo_archive/a/b/c/d/e.normal.txt
1454 lf_subrepo_archive/a/b/c/x
1454 lf_subrepo_archive/a/b/c/x
1455 lf_subrepo_archive/a/b/c/x/y.normal.txt
1455 lf_subrepo_archive/a/b/c/x/y.normal.txt
1456 lf_subrepo_archive/subrepo
1456 lf_subrepo_archive/subrepo
1457 lf_subrepo_archive/subrepo/large.txt
1457 lf_subrepo_archive/subrepo/large.txt
1458 lf_subrepo_archive/subrepo/normal.txt
1458 lf_subrepo_archive/subrepo/normal.txt
1459
1459
1460 $ cd ..
1460 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now