Show More
@@ -1,1074 +1,1080 b'' | |||
|
1 | 1 | This file contains testcases that tend to be related to special cases or less |
|
2 | 2 | common commands affecting largefile. |
|
3 | 3 | |
|
4 | 4 | Each sections should be independent of each others. |
|
5 | 5 | |
|
6 | 6 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE |
|
7 | 7 | $ mkdir "${USERCACHE}" |
|
8 | 8 | $ cat >> $HGRCPATH <<EOF |
|
9 | 9 | > [extensions] |
|
10 | 10 | > largefiles= |
|
11 | 11 | > purge= |
|
12 | 12 | > rebase= |
|
13 | 13 | > transplant= |
|
14 | 14 | > [phases] |
|
15 | 15 | > publish=False |
|
16 | 16 | > [largefiles] |
|
17 | 17 | > minsize=2 |
|
18 | 18 | > patterns=glob:**.dat |
|
19 | 19 | > usercache=${USERCACHE} |
|
20 | 20 | > [hooks] |
|
21 | 21 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" |
|
22 | 22 | > EOF |
|
23 | 23 | |
|
24 | 24 | |
|
25 | 25 | |
|
26 | 26 | Test copies and moves from a directory other than root (issue3516) |
|
27 | 27 | ========================================================================= |
|
28 | 28 | |
|
29 | 29 | $ hg init lf_cpmv |
|
30 | 30 | $ cd lf_cpmv |
|
31 | 31 | $ mkdir dira |
|
32 | 32 | $ mkdir dira/dirb |
|
33 | 33 | $ touch dira/dirb/largefile |
|
34 | 34 | $ hg add --large dira/dirb/largefile |
|
35 | 35 | $ hg commit -m "added" |
|
36 | 36 | Invoking status precommit hook |
|
37 | 37 | A dira/dirb/largefile |
|
38 | 38 | $ cd dira |
|
39 | 39 | $ hg cp dirb/largefile foo/largefile |
|
40 | 40 | $ hg ci -m "deep copy" |
|
41 | 41 | Invoking status precommit hook |
|
42 | 42 | A dira/foo/largefile |
|
43 | 43 | $ find . | sort |
|
44 | 44 | . |
|
45 | 45 | ./dirb |
|
46 | 46 | ./dirb/largefile |
|
47 | 47 | ./foo |
|
48 | 48 | ./foo/largefile |
|
49 | 49 | $ hg mv foo/largefile baz/largefile |
|
50 | 50 | $ hg ci -m "moved" |
|
51 | 51 | Invoking status precommit hook |
|
52 | 52 | A dira/baz/largefile |
|
53 | 53 | R dira/foo/largefile |
|
54 | 54 | $ find . | sort |
|
55 | 55 | . |
|
56 | 56 | ./baz |
|
57 | 57 | ./baz/largefile |
|
58 | 58 | ./dirb |
|
59 | 59 | ./dirb/largefile |
|
60 | 60 | $ cd .. |
|
61 | 61 | $ hg mv dira dirc |
|
62 | 62 | moving .hglf/dira/baz/largefile to .hglf/dirc/baz/largefile (glob) |
|
63 | 63 | moving .hglf/dira/dirb/largefile to .hglf/dirc/dirb/largefile (glob) |
|
64 | 64 | $ find * | sort |
|
65 | 65 | dirc |
|
66 | 66 | dirc/baz |
|
67 | 67 | dirc/baz/largefile |
|
68 | 68 | dirc/dirb |
|
69 | 69 | dirc/dirb/largefile |
|
70 | 70 | |
|
71 | 71 | $ hg clone -q . ../fetch |
|
72 | 72 | $ hg --config extensions.fetch= fetch ../fetch |
|
73 | 73 | abort: uncommitted changes |
|
74 | 74 | [255] |
|
75 | 75 | $ hg up -qC |
|
76 | 76 | $ cd .. |
|
77 | 77 | |
|
78 | 78 | Clone a local repository owned by another user |
|
79 | 79 | =================================================== |
|
80 | 80 | |
|
81 | 81 | #if unix-permissions |
|
82 | 82 | |
|
83 | 83 | We have to simulate that here by setting $HOME and removing write permissions |
|
84 | 84 | $ ORIGHOME="$HOME" |
|
85 | 85 | $ mkdir alice |
|
86 | 86 | $ HOME="`pwd`/alice" |
|
87 | 87 | $ cd alice |
|
88 | 88 | $ hg init pubrepo |
|
89 | 89 | $ cd pubrepo |
|
90 | 90 | $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null |
|
91 | 91 | $ hg add --large a-large-file |
|
92 | 92 | $ hg commit -m "Add a large file" |
|
93 | 93 | Invoking status precommit hook |
|
94 | 94 | A a-large-file |
|
95 | 95 | $ cd .. |
|
96 | 96 | $ chmod -R a-w pubrepo |
|
97 | 97 | $ cd .. |
|
98 | 98 | $ mkdir bob |
|
99 | 99 | $ HOME="`pwd`/bob" |
|
100 | 100 | $ cd bob |
|
101 | 101 | $ hg clone --pull ../alice/pubrepo pubrepo |
|
102 | 102 | requesting all changes |
|
103 | 103 | adding changesets |
|
104 | 104 | adding manifests |
|
105 | 105 | adding file changes |
|
106 | 106 | added 1 changesets with 1 changes to 1 files |
|
107 | 107 | updating to branch default |
|
108 | 108 | getting changed largefiles |
|
109 | 109 | 1 largefiles updated, 0 removed |
|
110 | 110 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
111 | 111 | $ cd .. |
|
112 | 112 | $ chmod -R u+w alice/pubrepo |
|
113 | 113 | $ HOME="$ORIGHOME" |
|
114 | 114 | |
|
115 | 115 | #endif |
|
116 | 116 | |
|
117 | 117 | |
|
118 | 118 | Symlink to a large largefile should behave the same as a symlink to a normal file |
|
119 | 119 | ===================================================================================== |
|
120 | 120 | |
|
121 | 121 | #if symlink |
|
122 | 122 | |
|
123 | 123 | $ hg init largesymlink |
|
124 | 124 | $ cd largesymlink |
|
125 | 125 | $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null |
|
126 | 126 | $ hg add --large largefile |
|
127 | 127 | $ hg commit -m "commit a large file" |
|
128 | 128 | Invoking status precommit hook |
|
129 | 129 | A largefile |
|
130 | 130 | $ ln -s largefile largelink |
|
131 | 131 | $ hg add largelink |
|
132 | 132 | $ hg commit -m "commit a large symlink" |
|
133 | 133 | Invoking status precommit hook |
|
134 | 134 | A largelink |
|
135 | 135 | $ rm -f largelink |
|
136 | 136 | $ hg up >/dev/null |
|
137 | 137 | $ test -f largelink |
|
138 | 138 | [1] |
|
139 | 139 | $ test -L largelink |
|
140 | 140 | [1] |
|
141 | 141 | $ rm -f largelink # make next part of the test independent of the previous |
|
142 | 142 | $ hg up -C >/dev/null |
|
143 | 143 | $ test -f largelink |
|
144 | 144 | $ test -L largelink |
|
145 | 145 | $ cd .. |
|
146 | 146 | |
|
147 | 147 | #endif |
|
148 | 148 | |
|
149 | 149 | |
|
150 | 150 | test for pattern matching on 'hg status': |
|
151 | 151 | ============================================== |
|
152 | 152 | |
|
153 | 153 | |
|
154 | 154 | to boost performance, largefiles checks whether specified patterns are |
|
155 | 155 | related to largefiles in working directory (NOT to STANDIN) or not. |
|
156 | 156 | |
|
157 | 157 | $ hg init statusmatch |
|
158 | 158 | $ cd statusmatch |
|
159 | 159 | |
|
160 | 160 | $ mkdir -p a/b/c/d |
|
161 | 161 | $ echo normal > a/b/c/d/e.normal.txt |
|
162 | 162 | $ hg add a/b/c/d/e.normal.txt |
|
163 | 163 | $ echo large > a/b/c/d/e.large.txt |
|
164 | 164 | $ hg add --large a/b/c/d/e.large.txt |
|
165 | 165 | $ mkdir -p a/b/c/x |
|
166 | 166 | $ echo normal > a/b/c/x/y.normal.txt |
|
167 | 167 | $ hg add a/b/c/x/y.normal.txt |
|
168 | 168 | $ hg commit -m 'add files' |
|
169 | 169 | Invoking status precommit hook |
|
170 | 170 | A a/b/c/d/e.large.txt |
|
171 | 171 | A a/b/c/d/e.normal.txt |
|
172 | 172 | A a/b/c/x/y.normal.txt |
|
173 | 173 | |
|
174 | 174 | (1) no pattern: no performance boost |
|
175 | 175 | $ hg status -A |
|
176 | 176 | C a/b/c/d/e.large.txt |
|
177 | 177 | C a/b/c/d/e.normal.txt |
|
178 | 178 | C a/b/c/x/y.normal.txt |
|
179 | 179 | |
|
180 | 180 | (2) pattern not related to largefiles: performance boost |
|
181 | 181 | $ hg status -A a/b/c/x |
|
182 | 182 | C a/b/c/x/y.normal.txt |
|
183 | 183 | |
|
184 | 184 | (3) pattern related to largefiles: no performance boost |
|
185 | 185 | $ hg status -A a/b/c/d |
|
186 | 186 | C a/b/c/d/e.large.txt |
|
187 | 187 | C a/b/c/d/e.normal.txt |
|
188 | 188 | |
|
189 | 189 | (4) pattern related to STANDIN (not to largefiles): performance boost |
|
190 | 190 | $ hg status -A .hglf/a |
|
191 | 191 | C .hglf/a/b/c/d/e.large.txt |
|
192 | 192 | |
|
193 | 193 | (5) mixed case: no performance boost |
|
194 | 194 | $ hg status -A a/b/c/x a/b/c/d |
|
195 | 195 | C a/b/c/d/e.large.txt |
|
196 | 196 | C a/b/c/d/e.normal.txt |
|
197 | 197 | C a/b/c/x/y.normal.txt |
|
198 | 198 | |
|
199 | 199 | verify that largefiles doesn't break filesets |
|
200 | 200 | |
|
201 | 201 | $ hg log --rev . --exclude "set:binary()" |
|
202 | 202 | changeset: 0:41bd42f10efa |
|
203 | 203 | tag: tip |
|
204 | 204 | user: test |
|
205 | 205 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
206 | 206 | summary: add files |
|
207 | 207 | |
|
208 | 208 | verify that large files in subrepos handled properly |
|
209 | 209 | $ hg init subrepo |
|
210 | 210 | $ echo "subrepo = subrepo" > .hgsub |
|
211 | 211 | $ hg add .hgsub |
|
212 | 212 | $ hg ci -m "add subrepo" |
|
213 | 213 | Invoking status precommit hook |
|
214 | 214 | A .hgsub |
|
215 | 215 | ? .hgsubstate |
|
216 | 216 | $ echo "rev 1" > subrepo/large.txt |
|
217 | 217 | $ hg add --large subrepo/large.txt |
|
218 | 218 | $ hg sum |
|
219 | 219 | parent: 1:8ee150ea2e9c tip |
|
220 | 220 | add subrepo |
|
221 | 221 | branch: default |
|
222 | 222 | commit: 1 subrepos |
|
223 | 223 | update: (current) |
|
224 | 224 | $ hg st |
|
225 | 225 | $ hg st -S |
|
226 | 226 | A subrepo/large.txt |
|
227 | 227 | $ hg ci -S -m "commit top repo" |
|
228 | 228 | committing subrepository subrepo |
|
229 | 229 | Invoking status precommit hook |
|
230 | 230 | A large.txt |
|
231 | 231 | Invoking status precommit hook |
|
232 | 232 | M .hgsubstate |
|
233 | 233 | # No differences |
|
234 | 234 | $ hg st -S |
|
235 | 235 | $ hg sum |
|
236 | 236 | parent: 2:ce4cd0c527a6 tip |
|
237 | 237 | commit top repo |
|
238 | 238 | branch: default |
|
239 | 239 | commit: (clean) |
|
240 | 240 | update: (current) |
|
241 | 241 | $ echo "rev 2" > subrepo/large.txt |
|
242 | 242 | $ hg st -S |
|
243 | 243 | M subrepo/large.txt |
|
244 | 244 | $ hg sum |
|
245 | 245 | parent: 2:ce4cd0c527a6 tip |
|
246 | 246 | commit top repo |
|
247 | 247 | branch: default |
|
248 | 248 | commit: 1 subrepos |
|
249 | 249 | update: (current) |
|
250 | 250 | $ hg ci -m "this commit should fail without -S" |
|
251 | 251 | abort: uncommitted changes in subrepository 'subrepo' |
|
252 | 252 | (use --subrepos for recursive commit) |
|
253 | 253 | [255] |
|
254 | 254 | |
|
255 | 255 | Add a normal file to the subrepo, then test archiving |
|
256 | 256 | |
|
257 | 257 | $ echo 'normal file' > subrepo/normal.txt |
|
258 | 258 | $ touch large.dat |
|
259 | 259 | $ mv subrepo/large.txt subrepo/renamed-large.txt |
|
260 | 260 | $ hg addremove -S --dry-run |
|
261 | 261 | adding large.dat as a largefile |
|
262 | 262 | removing subrepo/large.txt |
|
263 | 263 | adding subrepo/normal.txt |
|
264 | 264 | adding subrepo/renamed-large.txt |
|
265 | 265 | $ hg status -S |
|
266 | 266 | ! subrepo/large.txt |
|
267 | 267 | ? large.dat |
|
268 | 268 | ? subrepo/normal.txt |
|
269 | 269 | ? subrepo/renamed-large.txt |
|
270 | 270 | |
|
271 | 271 | $ hg addremove --dry-run subrepo |
|
272 | 272 | removing subrepo/large.txt (glob) |
|
273 | 273 | adding subrepo/normal.txt (glob) |
|
274 | 274 | adding subrepo/renamed-large.txt (glob) |
|
275 | 275 | $ hg status -S |
|
276 | 276 | ! subrepo/large.txt |
|
277 | 277 | ? large.dat |
|
278 | 278 | ? subrepo/normal.txt |
|
279 | 279 | ? subrepo/renamed-large.txt |
|
280 | 280 | $ cd .. |
|
281 | 281 | |
|
282 | 282 | $ hg -R statusmatch addremove --dry-run statusmatch/subrepo |
|
283 | 283 | removing statusmatch/subrepo/large.txt (glob) |
|
284 | 284 | adding statusmatch/subrepo/normal.txt (glob) |
|
285 | 285 | adding statusmatch/subrepo/renamed-large.txt (glob) |
|
286 | 286 | $ hg -R statusmatch status -S |
|
287 | 287 | ! subrepo/large.txt |
|
288 | 288 | ? large.dat |
|
289 | 289 | ? subrepo/normal.txt |
|
290 | 290 | ? subrepo/renamed-large.txt |
|
291 | 291 | |
|
292 | 292 | $ hg -R statusmatch addremove --dry-run -S |
|
293 | 293 | adding large.dat as a largefile |
|
294 | 294 | removing subrepo/large.txt |
|
295 | 295 | adding subrepo/normal.txt |
|
296 | 296 | adding subrepo/renamed-large.txt |
|
297 | 297 | $ cd statusmatch |
|
298 | 298 | |
|
299 | 299 | $ mv subrepo/renamed-large.txt subrepo/large.txt |
|
300 | 300 | $ hg addremove subrepo |
|
301 | 301 | adding subrepo/normal.txt (glob) |
|
302 | 302 | $ hg forget subrepo/normal.txt |
|
303 | 303 | |
|
304 | 304 | $ hg addremove -S |
|
305 | 305 | adding large.dat as a largefile |
|
306 | 306 | adding subrepo/normal.txt |
|
307 | 307 | $ rm large.dat |
|
308 | 308 | |
|
309 | 309 | $ hg addremove subrepo |
|
310 | 310 | $ hg addremove -S |
|
311 | 311 | removing large.dat |
|
312 | 312 | |
|
313 | 313 | Lock in subrepo, otherwise the change isn't archived |
|
314 | 314 | |
|
315 | 315 | $ hg ci -S -m "add normal file to top level" |
|
316 | 316 | committing subrepository subrepo |
|
317 | 317 | Invoking status precommit hook |
|
318 | 318 | M large.txt |
|
319 | 319 | A normal.txt |
|
320 | 320 | Invoking status precommit hook |
|
321 | 321 | M .hgsubstate |
|
322 | 322 | $ hg archive -S ../lf_subrepo_archive |
|
323 | 323 | $ find ../lf_subrepo_archive | sort |
|
324 | 324 | ../lf_subrepo_archive |
|
325 | 325 | ../lf_subrepo_archive/.hg_archival.txt |
|
326 | 326 | ../lf_subrepo_archive/.hgsub |
|
327 | 327 | ../lf_subrepo_archive/.hgsubstate |
|
328 | 328 | ../lf_subrepo_archive/a |
|
329 | 329 | ../lf_subrepo_archive/a/b |
|
330 | 330 | ../lf_subrepo_archive/a/b/c |
|
331 | 331 | ../lf_subrepo_archive/a/b/c/d |
|
332 | 332 | ../lf_subrepo_archive/a/b/c/d/e.large.txt |
|
333 | 333 | ../lf_subrepo_archive/a/b/c/d/e.normal.txt |
|
334 | 334 | ../lf_subrepo_archive/a/b/c/x |
|
335 | 335 | ../lf_subrepo_archive/a/b/c/x/y.normal.txt |
|
336 | 336 | ../lf_subrepo_archive/subrepo |
|
337 | 337 | ../lf_subrepo_archive/subrepo/large.txt |
|
338 | 338 | ../lf_subrepo_archive/subrepo/normal.txt |
|
339 | $ cat ../lf_subrepo_archive/.hg_archival.txt | |
|
340 | repo: 41bd42f10efa43698cc02052ea0977771cba506d | |
|
341 | node: d56a95e6522858bc08a724c4fe2bdee066d1c30b | |
|
342 | branch: default | |
|
343 | latesttag: null | |
|
344 | latesttagdistance: 4 | |
|
339 | 345 | |
|
340 | 346 | Test update with subrepos. |
|
341 | 347 | |
|
342 | 348 | $ hg update 0 |
|
343 | 349 | getting changed largefiles |
|
344 | 350 | 0 largefiles updated, 1 removed |
|
345 | 351 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
346 | 352 | $ hg status -S |
|
347 | 353 | $ hg update tip |
|
348 | 354 | getting changed largefiles |
|
349 | 355 | 1 largefiles updated, 0 removed |
|
350 | 356 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
351 | 357 | $ hg status -S |
|
352 | 358 | # modify a large file |
|
353 | 359 | $ echo "modified" > subrepo/large.txt |
|
354 | 360 | $ hg st -S |
|
355 | 361 | M subrepo/large.txt |
|
356 | 362 | # update -C should revert the change. |
|
357 | 363 | $ hg update -C |
|
358 | 364 | getting changed largefiles |
|
359 | 365 | 1 largefiles updated, 0 removed |
|
360 | 366 | getting changed largefiles |
|
361 | 367 | 0 largefiles updated, 0 removed |
|
362 | 368 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
363 | 369 | $ hg status -S |
|
364 | 370 | |
|
365 | 371 | $ hg forget -v subrepo/large.txt |
|
366 | 372 | removing subrepo/large.txt (glob) |
|
367 | 373 | |
|
368 | 374 | Test reverting a forgotten file |
|
369 | 375 | $ hg revert -R subrepo subrepo/large.txt |
|
370 | 376 | $ hg status -SA subrepo/large.txt |
|
371 | 377 | C subrepo/large.txt |
|
372 | 378 | |
|
373 | 379 | $ hg rm -v subrepo/large.txt |
|
374 | 380 | removing subrepo/large.txt (glob) |
|
375 | 381 | $ hg revert -R subrepo subrepo/large.txt |
|
376 | 382 | $ rm subrepo/large.txt |
|
377 | 383 | $ hg addremove -S |
|
378 | 384 | removing subrepo/large.txt |
|
379 | 385 | $ hg st -S |
|
380 | 386 | R subrepo/large.txt |
|
381 | 387 | |
|
382 | 388 | Test archiving a revision that references a subrepo that is not yet |
|
383 | 389 | cloned (see test-subrepo-recursion.t): |
|
384 | 390 | |
|
385 | 391 | $ hg clone -U . ../empty |
|
386 | 392 | $ cd ../empty |
|
387 | 393 | $ hg archive --subrepos -r tip ../archive.tar.gz |
|
388 | 394 | cloning subrepo subrepo from $TESTTMP/statusmatch/subrepo |
|
389 | 395 | $ cd .. |
|
390 | 396 | |
|
391 | 397 | |
|
392 | 398 | |
|
393 | 399 | |
|
394 | 400 | |
|
395 | 401 | |
|
396 | 402 | Test addremove, forget and others |
|
397 | 403 | ============================================== |
|
398 | 404 | |
|
399 | 405 | Test that addremove picks up largefiles prior to the initial commit (issue3541) |
|
400 | 406 | |
|
401 | 407 | $ hg init addrm2 |
|
402 | 408 | $ cd addrm2 |
|
403 | 409 | $ touch large.dat |
|
404 | 410 | $ touch large2.dat |
|
405 | 411 | $ touch normal |
|
406 | 412 | $ hg add --large large.dat |
|
407 | 413 | $ hg addremove -v |
|
408 | 414 | adding large2.dat as a largefile |
|
409 | 415 | adding normal |
|
410 | 416 | |
|
411 | 417 | Test that forgetting all largefiles reverts to islfilesrepo() == False |
|
412 | 418 | (addremove will add *.dat as normal files now) |
|
413 | 419 | $ hg forget large.dat |
|
414 | 420 | $ hg forget large2.dat |
|
415 | 421 | $ hg addremove -v |
|
416 | 422 | adding large.dat |
|
417 | 423 | adding large2.dat |
|
418 | 424 | |
|
419 | 425 | Test commit's addremove option prior to the first commit |
|
420 | 426 | $ hg forget large.dat |
|
421 | 427 | $ hg forget large2.dat |
|
422 | 428 | $ hg add --large large.dat |
|
423 | 429 | $ hg ci -Am "commit" |
|
424 | 430 | adding large2.dat as a largefile |
|
425 | 431 | Invoking status precommit hook |
|
426 | 432 | A large.dat |
|
427 | 433 | A large2.dat |
|
428 | 434 | A normal |
|
429 | 435 | $ find .hglf | sort |
|
430 | 436 | .hglf |
|
431 | 437 | .hglf/large.dat |
|
432 | 438 | .hglf/large2.dat |
|
433 | 439 | |
|
434 | 440 | Test actions on largefiles using relative paths from subdir |
|
435 | 441 | |
|
436 | 442 | $ mkdir sub |
|
437 | 443 | $ cd sub |
|
438 | 444 | $ echo anotherlarge > anotherlarge |
|
439 | 445 | $ hg add --large anotherlarge |
|
440 | 446 | $ hg st |
|
441 | 447 | A sub/anotherlarge |
|
442 | 448 | $ hg st anotherlarge |
|
443 | 449 | A anotherlarge |
|
444 | 450 | $ hg commit -m anotherlarge anotherlarge |
|
445 | 451 | Invoking status precommit hook |
|
446 | 452 | A sub/anotherlarge |
|
447 | 453 | $ hg log anotherlarge |
|
448 | 454 | changeset: 1:9627a577c5e9 |
|
449 | 455 | tag: tip |
|
450 | 456 | user: test |
|
451 | 457 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
452 | 458 | summary: anotherlarge |
|
453 | 459 | |
|
454 | 460 | $ hg --debug log -T '{rev}: {desc}\n' ../sub/anotherlarge |
|
455 | 461 | updated patterns: ['../.hglf/sub/../sub/anotherlarge', '../sub/anotherlarge'] |
|
456 | 462 | 1: anotherlarge |
|
457 | 463 | |
|
458 | 464 | $ hg log -G anotherlarge |
|
459 | 465 | @ changeset: 1:9627a577c5e9 |
|
460 | 466 | | tag: tip |
|
461 | 467 | | user: test |
|
462 | 468 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
463 | 469 | | summary: anotherlarge |
|
464 | 470 | | |
|
465 | 471 | |
|
466 | 472 | $ hg log glob:another* |
|
467 | 473 | changeset: 1:9627a577c5e9 |
|
468 | 474 | tag: tip |
|
469 | 475 | user: test |
|
470 | 476 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
471 | 477 | summary: anotherlarge |
|
472 | 478 | |
|
473 | 479 | $ hg --debug log -T '{rev}: {desc}\n' -G glob:another* |
|
474 | 480 | updated patterns: ['glob:../.hglf/sub/another*', 'glob:another*'] |
|
475 | 481 | @ 1: anotherlarge |
|
476 | 482 | | |
|
477 | 483 | |
|
478 | 484 | #if no-msys |
|
479 | 485 | $ hg --debug log -T '{rev}: {desc}\n' 'glob:../.hglf/sub/another*' # no-msys |
|
480 | 486 | updated patterns: ['glob:../.hglf/sub/another*'] |
|
481 | 487 | 1: anotherlarge |
|
482 | 488 | |
|
483 | 489 | $ hg --debug log -G -T '{rev}: {desc}\n' 'glob:../.hglf/sub/another*' # no-msys |
|
484 | 490 | updated patterns: ['glob:../.hglf/sub/another*'] |
|
485 | 491 | @ 1: anotherlarge |
|
486 | 492 | | |
|
487 | 493 | #endif |
|
488 | 494 | |
|
489 | 495 | $ echo more >> anotherlarge |
|
490 | 496 | $ hg st . |
|
491 | 497 | M anotherlarge |
|
492 | 498 | $ hg cat anotherlarge |
|
493 | 499 | anotherlarge |
|
494 | 500 | $ hg revert anotherlarge |
|
495 | 501 | $ hg st |
|
496 | 502 | ? sub/anotherlarge.orig |
|
497 | 503 | $ cd .. |
|
498 | 504 | |
|
499 | 505 | Test glob logging from the root dir |
|
500 | 506 | $ hg log glob:**another* |
|
501 | 507 | changeset: 1:9627a577c5e9 |
|
502 | 508 | tag: tip |
|
503 | 509 | user: test |
|
504 | 510 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
505 | 511 | summary: anotherlarge |
|
506 | 512 | |
|
507 | 513 | $ hg log -G glob:**another* |
|
508 | 514 | @ changeset: 1:9627a577c5e9 |
|
509 | 515 | | tag: tip |
|
510 | 516 | | user: test |
|
511 | 517 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
512 | 518 | | summary: anotherlarge |
|
513 | 519 | | |
|
514 | 520 | |
|
515 | 521 | $ cd .. |
|
516 | 522 | |
|
517 | 523 | Log from outer space |
|
518 | 524 | $ hg --debug log -R addrm2 -T '{rev}: {desc}\n' 'addrm2/sub/anotherlarge' |
|
519 | 525 | updated patterns: ['addrm2/.hglf/sub/anotherlarge', 'addrm2/sub/anotherlarge'] |
|
520 | 526 | 1: anotherlarge |
|
521 | 527 | $ hg --debug log -R addrm2 -T '{rev}: {desc}\n' 'addrm2/.hglf/sub/anotherlarge' |
|
522 | 528 | updated patterns: ['addrm2/.hglf/sub/anotherlarge'] |
|
523 | 529 | 1: anotherlarge |
|
524 | 530 | |
|
525 | 531 | |
|
526 | 532 | Check error message while exchange |
|
527 | 533 | ========================================================= |
|
528 | 534 | |
|
529 | 535 | issue3651: summary/outgoing with largefiles shows "no remote repo" |
|
530 | 536 | unexpectedly |
|
531 | 537 | |
|
532 | 538 | $ mkdir issue3651 |
|
533 | 539 | $ cd issue3651 |
|
534 | 540 | |
|
535 | 541 | $ hg init src |
|
536 | 542 | $ echo a > src/a |
|
537 | 543 | $ hg -R src add --large src/a |
|
538 | 544 | $ hg -R src commit -m '#0' |
|
539 | 545 | Invoking status precommit hook |
|
540 | 546 | A a |
|
541 | 547 | |
|
542 | 548 | check messages when no remote repository is specified: |
|
543 | 549 | "no remote repo" route for "hg outgoing --large" is not tested here, |
|
544 | 550 | because it can't be reproduced easily. |
|
545 | 551 | |
|
546 | 552 | $ hg init clone1 |
|
547 | 553 | $ hg -R clone1 -q pull src |
|
548 | 554 | $ hg -R clone1 -q update |
|
549 | 555 | $ hg -R clone1 paths | grep default |
|
550 | 556 | [1] |
|
551 | 557 | |
|
552 | 558 | $ hg -R clone1 summary --large |
|
553 | 559 | parent: 0:fc0bd45326d3 tip |
|
554 | 560 | #0 |
|
555 | 561 | branch: default |
|
556 | 562 | commit: (clean) |
|
557 | 563 | update: (current) |
|
558 | 564 | largefiles: (no remote repo) |
|
559 | 565 | |
|
560 | 566 | check messages when there is no files to upload: |
|
561 | 567 | |
|
562 | 568 | $ hg -q clone src clone2 |
|
563 | 569 | $ hg -R clone2 paths | grep default |
|
564 | 570 | default = $TESTTMP/issue3651/src (glob) |
|
565 | 571 | |
|
566 | 572 | $ hg -R clone2 summary --large |
|
567 | 573 | parent: 0:fc0bd45326d3 tip |
|
568 | 574 | #0 |
|
569 | 575 | branch: default |
|
570 | 576 | commit: (clean) |
|
571 | 577 | update: (current) |
|
572 | 578 | largefiles: (no files to upload) |
|
573 | 579 | $ hg -R clone2 outgoing --large |
|
574 | 580 | comparing with $TESTTMP/issue3651/src (glob) |
|
575 | 581 | searching for changes |
|
576 | 582 | no changes found |
|
577 | 583 | largefiles: no files to upload |
|
578 | 584 | [1] |
|
579 | 585 | |
|
580 | 586 | $ hg -R clone2 outgoing --large --graph --template "{rev}" |
|
581 | 587 | comparing with $TESTTMP/issue3651/src (glob) |
|
582 | 588 | searching for changes |
|
583 | 589 | no changes found |
|
584 | 590 | largefiles: no files to upload |
|
585 | 591 | |
|
586 | 592 | check messages when there are files to upload: |
|
587 | 593 | |
|
588 | 594 | $ echo b > clone2/b |
|
589 | 595 | $ hg -R clone2 add --large clone2/b |
|
590 | 596 | $ hg -R clone2 commit -m '#1' |
|
591 | 597 | Invoking status precommit hook |
|
592 | 598 | A b |
|
593 | 599 | $ hg -R clone2 summary --large |
|
594 | 600 | parent: 1:1acbe71ce432 tip |
|
595 | 601 | #1 |
|
596 | 602 | branch: default |
|
597 | 603 | commit: (clean) |
|
598 | 604 | update: (current) |
|
599 | 605 | largefiles: 1 entities for 1 files to upload |
|
600 | 606 | $ hg -R clone2 outgoing --large |
|
601 | 607 | comparing with $TESTTMP/issue3651/src (glob) |
|
602 | 608 | searching for changes |
|
603 | 609 | changeset: 1:1acbe71ce432 |
|
604 | 610 | tag: tip |
|
605 | 611 | user: test |
|
606 | 612 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
607 | 613 | summary: #1 |
|
608 | 614 | |
|
609 | 615 | largefiles to upload (1 entities): |
|
610 | 616 | b |
|
611 | 617 | |
|
612 | 618 | $ hg -R clone2 outgoing --large --graph --template "{rev}" |
|
613 | 619 | comparing with $TESTTMP/issue3651/src (glob) |
|
614 | 620 | searching for changes |
|
615 | 621 | @ 1 |
|
616 | 622 | |
|
617 | 623 | largefiles to upload (1 entities): |
|
618 | 624 | b |
|
619 | 625 | |
|
620 | 626 | |
|
621 | 627 | $ cp clone2/b clone2/b1 |
|
622 | 628 | $ cp clone2/b clone2/b2 |
|
623 | 629 | $ hg -R clone2 add --large clone2/b1 clone2/b2 |
|
624 | 630 | $ hg -R clone2 commit -m '#2: add largefiles referring same entity' |
|
625 | 631 | Invoking status precommit hook |
|
626 | 632 | A b1 |
|
627 | 633 | A b2 |
|
628 | 634 | $ hg -R clone2 summary --large |
|
629 | 635 | parent: 2:6095d0695d70 tip |
|
630 | 636 | #2: add largefiles referring same entity |
|
631 | 637 | branch: default |
|
632 | 638 | commit: (clean) |
|
633 | 639 | update: (current) |
|
634 | 640 | largefiles: 1 entities for 3 files to upload |
|
635 | 641 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" |
|
636 | 642 | comparing with $TESTTMP/issue3651/src (glob) |
|
637 | 643 | searching for changes |
|
638 | 644 | 1:1acbe71ce432 |
|
639 | 645 | 2:6095d0695d70 |
|
640 | 646 | largefiles to upload (1 entities): |
|
641 | 647 | b |
|
642 | 648 | b1 |
|
643 | 649 | b2 |
|
644 | 650 | |
|
645 | 651 | $ hg -R clone2 cat -r 1 clone2/.hglf/b |
|
646 | 652 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
647 | 653 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug |
|
648 | 654 | comparing with $TESTTMP/issue3651/src (glob) |
|
649 | 655 | query 1; heads |
|
650 | 656 | searching for changes |
|
651 | 657 | all remote heads known locally |
|
652 | 658 | 1:1acbe71ce432 |
|
653 | 659 | 2:6095d0695d70 |
|
654 | 660 | finding outgoing largefiles: 0/2 revision (0.00%) |
|
655 | 661 | finding outgoing largefiles: 1/2 revision (50.00%) |
|
656 | 662 | largefiles to upload (1 entities): |
|
657 | 663 | b |
|
658 | 664 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
659 | 665 | b1 |
|
660 | 666 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
661 | 667 | b2 |
|
662 | 668 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
663 | 669 | |
|
664 | 670 | |
|
665 | 671 | $ echo bbb > clone2/b |
|
666 | 672 | $ hg -R clone2 commit -m '#3: add new largefile entity as existing file' |
|
667 | 673 | Invoking status precommit hook |
|
668 | 674 | M b |
|
669 | 675 | $ echo bbbb > clone2/b |
|
670 | 676 | $ hg -R clone2 commit -m '#4: add new largefile entity as existing file' |
|
671 | 677 | Invoking status precommit hook |
|
672 | 678 | M b |
|
673 | 679 | $ cp clone2/b1 clone2/b |
|
674 | 680 | $ hg -R clone2 commit -m '#5: refer existing largefile entity again' |
|
675 | 681 | Invoking status precommit hook |
|
676 | 682 | M b |
|
677 | 683 | $ hg -R clone2 summary --large |
|
678 | 684 | parent: 5:036794ea641c tip |
|
679 | 685 | #5: refer existing largefile entity again |
|
680 | 686 | branch: default |
|
681 | 687 | commit: (clean) |
|
682 | 688 | update: (current) |
|
683 | 689 | largefiles: 3 entities for 3 files to upload |
|
684 | 690 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" |
|
685 | 691 | comparing with $TESTTMP/issue3651/src (glob) |
|
686 | 692 | searching for changes |
|
687 | 693 | 1:1acbe71ce432 |
|
688 | 694 | 2:6095d0695d70 |
|
689 | 695 | 3:7983dce246cc |
|
690 | 696 | 4:233f12ada4ae |
|
691 | 697 | 5:036794ea641c |
|
692 | 698 | largefiles to upload (3 entities): |
|
693 | 699 | b |
|
694 | 700 | b1 |
|
695 | 701 | b2 |
|
696 | 702 | |
|
697 | 703 | $ hg -R clone2 cat -r 3 clone2/.hglf/b |
|
698 | 704 | c801c9cfe94400963fcb683246217d5db77f9a9a |
|
699 | 705 | $ hg -R clone2 cat -r 4 clone2/.hglf/b |
|
700 | 706 | 13f9ed0898e315bf59dc2973fec52037b6f441a2 |
|
701 | 707 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug |
|
702 | 708 | comparing with $TESTTMP/issue3651/src (glob) |
|
703 | 709 | query 1; heads |
|
704 | 710 | searching for changes |
|
705 | 711 | all remote heads known locally |
|
706 | 712 | 1:1acbe71ce432 |
|
707 | 713 | 2:6095d0695d70 |
|
708 | 714 | 3:7983dce246cc |
|
709 | 715 | 4:233f12ada4ae |
|
710 | 716 | 5:036794ea641c |
|
711 | 717 | finding outgoing largefiles: 0/5 revision (0.00%) |
|
712 | 718 | finding outgoing largefiles: 1/5 revision (20.00%) |
|
713 | 719 | finding outgoing largefiles: 2/5 revision (40.00%) |
|
714 | 720 | finding outgoing largefiles: 3/5 revision (60.00%) |
|
715 | 721 | finding outgoing largefiles: 4/5 revision (80.00%) |
|
716 | 722 | largefiles to upload (3 entities): |
|
717 | 723 | b |
|
718 | 724 | 13f9ed0898e315bf59dc2973fec52037b6f441a2 |
|
719 | 725 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
720 | 726 | c801c9cfe94400963fcb683246217d5db77f9a9a |
|
721 | 727 | b1 |
|
722 | 728 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
723 | 729 | b2 |
|
724 | 730 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
725 | 731 | |
|
726 | 732 | |
|
727 | 733 | Pushing revision #1 causes uploading entity 89e6c98d9288, which is |
|
728 | 734 | shared also by largefiles b1, b2 in revision #2 and b in revision #5. |
|
729 | 735 | |
|
730 | 736 | Then, entity 89e6c98d9288 is not treated as "outgoing entity" at "hg |
|
731 | 737 | summary" and "hg outgoing", even though files in outgoing revision #2 |
|
732 | 738 | and #5 refer it. |
|
733 | 739 | |
|
734 | 740 | $ hg -R clone2 push -r 1 -q |
|
735 | 741 | $ hg -R clone2 summary --large |
|
736 | 742 | parent: 5:036794ea641c tip |
|
737 | 743 | #5: refer existing largefile entity again |
|
738 | 744 | branch: default |
|
739 | 745 | commit: (clean) |
|
740 | 746 | update: (current) |
|
741 | 747 | largefiles: 2 entities for 1 files to upload |
|
742 | 748 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" |
|
743 | 749 | comparing with $TESTTMP/issue3651/src (glob) |
|
744 | 750 | searching for changes |
|
745 | 751 | 2:6095d0695d70 |
|
746 | 752 | 3:7983dce246cc |
|
747 | 753 | 4:233f12ada4ae |
|
748 | 754 | 5:036794ea641c |
|
749 | 755 | largefiles to upload (2 entities): |
|
750 | 756 | b |
|
751 | 757 | |
|
752 | 758 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug |
|
753 | 759 | comparing with $TESTTMP/issue3651/src (glob) |
|
754 | 760 | query 1; heads |
|
755 | 761 | searching for changes |
|
756 | 762 | all remote heads known locally |
|
757 | 763 | 2:6095d0695d70 |
|
758 | 764 | 3:7983dce246cc |
|
759 | 765 | 4:233f12ada4ae |
|
760 | 766 | 5:036794ea641c |
|
761 | 767 | finding outgoing largefiles: 0/4 revision (0.00%) |
|
762 | 768 | finding outgoing largefiles: 1/4 revision (25.00%) |
|
763 | 769 | finding outgoing largefiles: 2/4 revision (50.00%) |
|
764 | 770 | finding outgoing largefiles: 3/4 revision (75.00%) |
|
765 | 771 | largefiles to upload (2 entities): |
|
766 | 772 | b |
|
767 | 773 | 13f9ed0898e315bf59dc2973fec52037b6f441a2 |
|
768 | 774 | c801c9cfe94400963fcb683246217d5db77f9a9a |
|
769 | 775 | |
|
770 | 776 | |
|
771 | 777 | $ cd .. |
|
772 | 778 | |
|
773 | 779 | merge action 'd' for 'local renamed directory to d2/g' which has no filename |
|
774 | 780 | ================================================================================== |
|
775 | 781 | |
|
776 | 782 | $ hg init merge-action |
|
777 | 783 | $ cd merge-action |
|
778 | 784 | $ touch l |
|
779 | 785 | $ hg add --large l |
|
780 | 786 | $ mkdir d1 |
|
781 | 787 | $ touch d1/f |
|
782 | 788 | $ hg ci -Aqm0 |
|
783 | 789 | Invoking status precommit hook |
|
784 | 790 | A d1/f |
|
785 | 791 | A l |
|
786 | 792 | $ echo > d1/f |
|
787 | 793 | $ touch d1/g |
|
788 | 794 | $ hg ci -Aqm1 |
|
789 | 795 | Invoking status precommit hook |
|
790 | 796 | M d1/f |
|
791 | 797 | A d1/g |
|
792 | 798 | $ hg up -qr0 |
|
793 | 799 | $ hg mv d1 d2 |
|
794 | 800 | moving d1/f to d2/f (glob) |
|
795 | 801 | $ hg ci -qm2 |
|
796 | 802 | Invoking status precommit hook |
|
797 | 803 | A d2/f |
|
798 | 804 | R d1/f |
|
799 | 805 | $ hg merge |
|
800 | 806 | merging d2/f and d1/f to d2/f |
|
801 | 807 | getting changed largefiles |
|
802 | 808 | 0 largefiles updated, 0 removed |
|
803 | 809 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
804 | 810 | (branch merge, don't forget to commit) |
|
805 | 811 | $ cd .. |
|
806 | 812 | |
|
807 | 813 | |
|
808 | 814 | Merge conflicts: |
|
809 | 815 | ===================== |
|
810 | 816 | |
|
811 | 817 | $ hg init merge |
|
812 | 818 | $ cd merge |
|
813 | 819 | $ echo 0 > f-different |
|
814 | 820 | $ echo 0 > f-same |
|
815 | 821 | $ echo 0 > f-unchanged-1 |
|
816 | 822 | $ echo 0 > f-unchanged-2 |
|
817 | 823 | $ hg add --large * |
|
818 | 824 | $ hg ci -m0 |
|
819 | 825 | Invoking status precommit hook |
|
820 | 826 | A f-different |
|
821 | 827 | A f-same |
|
822 | 828 | A f-unchanged-1 |
|
823 | 829 | A f-unchanged-2 |
|
824 | 830 | $ echo tmp1 > f-unchanged-1 |
|
825 | 831 | $ echo tmp1 > f-unchanged-2 |
|
826 | 832 | $ echo tmp1 > f-same |
|
827 | 833 | $ hg ci -m1 |
|
828 | 834 | Invoking status precommit hook |
|
829 | 835 | M f-same |
|
830 | 836 | M f-unchanged-1 |
|
831 | 837 | M f-unchanged-2 |
|
832 | 838 | $ echo 2 > f-different |
|
833 | 839 | $ echo 0 > f-unchanged-1 |
|
834 | 840 | $ echo 1 > f-unchanged-2 |
|
835 | 841 | $ echo 1 > f-same |
|
836 | 842 | $ hg ci -m2 |
|
837 | 843 | Invoking status precommit hook |
|
838 | 844 | M f-different |
|
839 | 845 | M f-same |
|
840 | 846 | M f-unchanged-1 |
|
841 | 847 | M f-unchanged-2 |
|
842 | 848 | $ hg up -qr0 |
|
843 | 849 | $ echo tmp2 > f-unchanged-1 |
|
844 | 850 | $ echo tmp2 > f-unchanged-2 |
|
845 | 851 | $ echo tmp2 > f-same |
|
846 | 852 | $ hg ci -m3 |
|
847 | 853 | Invoking status precommit hook |
|
848 | 854 | M f-same |
|
849 | 855 | M f-unchanged-1 |
|
850 | 856 | M f-unchanged-2 |
|
851 | 857 | created new head |
|
852 | 858 | $ echo 1 > f-different |
|
853 | 859 | $ echo 1 > f-unchanged-1 |
|
854 | 860 | $ echo 0 > f-unchanged-2 |
|
855 | 861 | $ echo 1 > f-same |
|
856 | 862 | $ hg ci -m4 |
|
857 | 863 | Invoking status precommit hook |
|
858 | 864 | M f-different |
|
859 | 865 | M f-same |
|
860 | 866 | M f-unchanged-1 |
|
861 | 867 | M f-unchanged-2 |
|
862 | 868 | $ hg merge |
|
863 | 869 | largefile f-different has a merge conflict |
|
864 | 870 | ancestor was 09d2af8dd22201dd8d48e5dcfcaed281ff9422c7 |
|
865 | 871 | keep (l)ocal e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e or |
|
866 | 872 | take (o)ther 7448d8798a4380162d4b56f9b452e2f6f9e24e7a? l |
|
867 | 873 | getting changed largefiles |
|
868 | 874 | 1 largefiles updated, 0 removed |
|
869 | 875 | 0 files updated, 4 files merged, 0 files removed, 0 files unresolved |
|
870 | 876 | (branch merge, don't forget to commit) |
|
871 | 877 | $ cat f-different |
|
872 | 878 | 1 |
|
873 | 879 | $ cat f-same |
|
874 | 880 | 1 |
|
875 | 881 | $ cat f-unchanged-1 |
|
876 | 882 | 1 |
|
877 | 883 | $ cat f-unchanged-2 |
|
878 | 884 | 1 |
|
879 | 885 | $ cd .. |
|
880 | 886 | |
|
881 | 887 | Test largefile insulation (do not enabled a side effect |
|
882 | 888 | ======================================================== |
|
883 | 889 | |
|
884 | 890 | Check whether "largefiles" feature is supported only in repositories |
|
885 | 891 | enabling largefiles extension. |
|
886 | 892 | |
|
887 | 893 | $ mkdir individualenabling |
|
888 | 894 | $ cd individualenabling |
|
889 | 895 | |
|
890 | 896 | $ hg init enabledlocally |
|
891 | 897 | $ echo large > enabledlocally/large |
|
892 | 898 | $ hg -R enabledlocally add --large enabledlocally/large |
|
893 | 899 | $ hg -R enabledlocally commit -m '#0' |
|
894 | 900 | Invoking status precommit hook |
|
895 | 901 | A large |
|
896 | 902 | |
|
897 | 903 | $ hg init notenabledlocally |
|
898 | 904 | $ echo large > notenabledlocally/large |
|
899 | 905 | $ hg -R notenabledlocally add --large notenabledlocally/large |
|
900 | 906 | $ hg -R notenabledlocally commit -m '#0' |
|
901 | 907 | Invoking status precommit hook |
|
902 | 908 | A large |
|
903 | 909 | |
|
904 | 910 | $ cat >> $HGRCPATH <<EOF |
|
905 | 911 | > [extensions] |
|
906 | 912 | > # disable globally |
|
907 | 913 | > largefiles=! |
|
908 | 914 | > EOF |
|
909 | 915 | $ cat >> enabledlocally/.hg/hgrc <<EOF |
|
910 | 916 | > [extensions] |
|
911 | 917 | > # enable locally |
|
912 | 918 | > largefiles= |
|
913 | 919 | > EOF |
|
914 | 920 | $ hg -R enabledlocally root |
|
915 | 921 | $TESTTMP/individualenabling/enabledlocally (glob) |
|
916 | 922 | $ hg -R notenabledlocally root |
|
917 | 923 | abort: repository requires features unknown to this Mercurial: largefiles! |
|
918 | 924 | (see http://mercurial.selenic.com/wiki/MissingRequirement for more information) |
|
919 | 925 | [255] |
|
920 | 926 | |
|
921 | 927 | $ hg init push-dst |
|
922 | 928 | $ hg -R enabledlocally push push-dst |
|
923 | 929 | pushing to push-dst |
|
924 | 930 | abort: required features are not supported in the destination: largefiles |
|
925 | 931 | [255] |
|
926 | 932 | |
|
927 | 933 | $ hg init pull-src |
|
928 | 934 | $ hg -R pull-src pull enabledlocally |
|
929 | 935 | pulling from enabledlocally |
|
930 | 936 | abort: required features are not supported in the destination: largefiles |
|
931 | 937 | [255] |
|
932 | 938 | |
|
933 | 939 | $ hg clone enabledlocally clone-dst |
|
934 | 940 | abort: repository requires features unknown to this Mercurial: largefiles! |
|
935 | 941 | (see http://mercurial.selenic.com/wiki/MissingRequirement for more information) |
|
936 | 942 | [255] |
|
937 | 943 | $ test -d clone-dst |
|
938 | 944 | [1] |
|
939 | 945 | $ hg clone --pull enabledlocally clone-pull-dst |
|
940 | 946 | abort: required features are not supported in the destination: largefiles |
|
941 | 947 | [255] |
|
942 | 948 | $ test -d clone-pull-dst |
|
943 | 949 | [1] |
|
944 | 950 | |
|
945 | 951 | #if serve |
|
946 | 952 | |
|
947 | 953 | Test largefiles specific peer setup, when largefiles is enabled |
|
948 | 954 | locally (issue4109) |
|
949 | 955 | |
|
950 | 956 | $ hg showconfig extensions | grep largefiles |
|
951 | 957 | extensions.largefiles=! |
|
952 | 958 | $ mkdir -p $TESTTMP/individualenabling/usercache |
|
953 | 959 | |
|
954 | 960 | $ hg serve -R enabledlocally -d -p $HGPORT --pid-file hg.pid |
|
955 | 961 | $ cat hg.pid >> $DAEMON_PIDS |
|
956 | 962 | |
|
957 | 963 | $ hg init pull-dst |
|
958 | 964 | $ cat > pull-dst/.hg/hgrc <<EOF |
|
959 | 965 | > [extensions] |
|
960 | 966 | > # enable locally |
|
961 | 967 | > largefiles= |
|
962 | 968 | > [largefiles] |
|
963 | 969 | > # ignore system cache to force largefiles specific wire proto access |
|
964 | 970 | > usercache=$TESTTMP/individualenabling/usercache |
|
965 | 971 | > EOF |
|
966 | 972 | $ hg -R pull-dst -q pull -u http://localhost:$HGPORT |
|
967 | 973 | |
|
968 | 974 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
969 | 975 | #endif |
|
970 | 976 | |
|
971 | 977 | Test overridden functions work correctly even for repos disabling |
|
972 | 978 | largefiles (issue4547) |
|
973 | 979 | |
|
974 | 980 | $ hg showconfig extensions | grep largefiles |
|
975 | 981 | extensions.largefiles=! |
|
976 | 982 | |
|
977 | 983 | (test updating implied by clone) |
|
978 | 984 | |
|
979 | 985 | $ hg init enabled-but-no-largefiles |
|
980 | 986 | $ echo normal1 > enabled-but-no-largefiles/normal1 |
|
981 | 987 | $ hg -R enabled-but-no-largefiles add enabled-but-no-largefiles/normal1 |
|
982 | 988 | $ hg -R enabled-but-no-largefiles commit -m '#0@enabled-but-no-largefiles' |
|
983 | 989 | Invoking status precommit hook |
|
984 | 990 | A normal1 |
|
985 | 991 | $ cat >> enabled-but-no-largefiles/.hg/hgrc <<EOF |
|
986 | 992 | > [extensions] |
|
987 | 993 | > # enable locally |
|
988 | 994 | > largefiles= |
|
989 | 995 | > EOF |
|
990 | 996 | $ hg clone -q enabled-but-no-largefiles no-largefiles |
|
991 | 997 | |
|
992 | 998 | (test rebasing implied by pull: precommit while rebasing unexpectedly |
|
993 | 999 | shows "normal3" as "?", because lfdirstate isn't yet written out at |
|
994 | 1000 | that time) |
|
995 | 1001 | |
|
996 | 1002 | $ echo normal2 > enabled-but-no-largefiles/normal2 |
|
997 | 1003 | $ hg -R enabled-but-no-largefiles add enabled-but-no-largefiles/normal2 |
|
998 | 1004 | $ hg -R enabled-but-no-largefiles commit -m '#1@enabled-but-no-largefiles' |
|
999 | 1005 | Invoking status precommit hook |
|
1000 | 1006 | A normal2 |
|
1001 | 1007 | |
|
1002 | 1008 | $ echo normal3 > no-largefiles/normal3 |
|
1003 | 1009 | $ hg -R no-largefiles add no-largefiles/normal3 |
|
1004 | 1010 | $ hg -R no-largefiles commit -m '#1@no-largefiles' |
|
1005 | 1011 | Invoking status precommit hook |
|
1006 | 1012 | A normal3 |
|
1007 | 1013 | |
|
1008 | 1014 | $ hg -R no-largefiles -q pull --rebase |
|
1009 | 1015 | Invoking status precommit hook |
|
1010 | 1016 | ? normal3 |
|
1011 | 1017 | |
|
1012 | 1018 | (test reverting) |
|
1013 | 1019 | |
|
1014 | 1020 | $ hg init subrepo-root |
|
1015 | 1021 | $ cat >> subrepo-root/.hg/hgrc <<EOF |
|
1016 | 1022 | > [extensions] |
|
1017 | 1023 | > # enable locally |
|
1018 | 1024 | > largefiles= |
|
1019 | 1025 | > EOF |
|
1020 | 1026 | $ echo large > subrepo-root/large |
|
1021 | 1027 | $ hg -R subrepo-root add --large subrepo-root/large |
|
1022 | 1028 | $ hg clone -q no-largefiles subrepo-root/no-largefiles |
|
1023 | 1029 | $ cat > subrepo-root/.hgsub <<EOF |
|
1024 | 1030 | > no-largefiles = no-largefiles |
|
1025 | 1031 | > EOF |
|
1026 | 1032 | $ hg -R subrepo-root add subrepo-root/.hgsub |
|
1027 | 1033 | $ hg -R subrepo-root commit -m '#0' |
|
1028 | 1034 | Invoking status precommit hook |
|
1029 | 1035 | A .hgsub |
|
1030 | 1036 | A large |
|
1031 | 1037 | ? .hgsubstate |
|
1032 | 1038 | $ echo dirty >> subrepo-root/large |
|
1033 | 1039 | $ echo dirty >> subrepo-root/no-largefiles/normal1 |
|
1034 | 1040 | $ hg -R subrepo-root status -S |
|
1035 | 1041 | M large |
|
1036 | 1042 | M no-largefiles/normal1 |
|
1037 | 1043 | $ hg -R subrepo-root revert --all |
|
1038 | 1044 | reverting subrepo-root/.hglf/large (glob) |
|
1039 | 1045 | reverting subrepo no-largefiles |
|
1040 | 1046 | reverting subrepo-root/no-largefiles/normal1 (glob) |
|
1041 | 1047 | |
|
1042 | 1048 | $ cd .. |
|
1043 | 1049 | |
|
1044 | 1050 | |
|
1045 | 1051 | Test "pull --rebase" when rebase is enabled before largefiles (issue3861) |
|
1046 | 1052 | ========================================================================= |
|
1047 | 1053 | |
|
1048 | 1054 | $ hg showconfig extensions | grep largefiles |
|
1049 | 1055 | extensions.largefiles=! |
|
1050 | 1056 | |
|
1051 | 1057 | $ mkdir issue3861 |
|
1052 | 1058 | $ cd issue3861 |
|
1053 | 1059 | $ hg init src |
|
1054 | 1060 | $ hg clone -q src dst |
|
1055 | 1061 | $ echo a > src/a |
|
1056 | 1062 | $ hg -R src commit -Aqm "#0" |
|
1057 | 1063 | Invoking status precommit hook |
|
1058 | 1064 | A a |
|
1059 | 1065 | |
|
1060 | 1066 | $ cat >> dst/.hg/hgrc <<EOF |
|
1061 | 1067 | > [extensions] |
|
1062 | 1068 | > largefiles= |
|
1063 | 1069 | > EOF |
|
1064 | 1070 | $ hg -R dst pull --rebase |
|
1065 | 1071 | pulling from $TESTTMP/issue3861/src (glob) |
|
1066 | 1072 | requesting all changes |
|
1067 | 1073 | adding changesets |
|
1068 | 1074 | adding manifests |
|
1069 | 1075 | adding file changes |
|
1070 | 1076 | added 1 changesets with 1 changes to 1 files |
|
1071 | 1077 | nothing to rebase - working directory parent is already an ancestor of destination bf5e395ced2c |
|
1072 | 1078 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1073 | 1079 | |
|
1074 | 1080 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now