| 1 |
This file used to contains all largefile tests. |
| 2 |
Do not add any new tests in this file as it his already far too long to run. |
| 3 |
|
| 4 |
It contains all the testing of the basic concepts of large file in a single block. |
| 5 |
|
| 6 |
$ USERCACHE="$TESTTMP/cache"; export USERCACHE |
| 7 |
$ mkdir "${USERCACHE}" |
| 8 |
$ cat >> $HGRCPATH <<EOF |
| 9 |
> [extensions] |
| 10 |
> largefiles= |
| 11 |
> purge= |
| 12 |
> rebase= |
| 13 |
> transplant= |
| 14 |
> [phases] |
| 15 |
> publish=False |
| 16 |
> [largefiles] |
| 17 |
> minsize=2 |
| 18 |
> patterns=glob:**.dat |
| 19 |
> usercache=${USERCACHE} |
| 20 |
> [hooks] |
| 21 |
> precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" |
| 22 |
> EOF |
| 23 |
|
| 24 |
Create the repo with a couple of revisions of both large and normal |
| 25 |
files. |
| 26 |
Test status and dirstate of largefiles and that summary output is correct. |
| 27 |
|
| 28 |
$ hg init a |
| 29 |
$ cd a |
| 30 |
$ mkdir sub |
| 31 |
$ echo normal1 > normal1 |
| 32 |
$ echo normal2 > sub/normal2 |
| 33 |
$ echo large1 > large1 |
| 34 |
$ echo large2 > sub/large2 |
| 35 |
$ hg add normal1 sub/normal2 |
| 36 |
$ hg add --large large1 sub/large2 |
| 37 |
$ hg commit -m "add files" |
| 38 |
Invoking status precommit hook |
| 39 |
A large1 |
| 40 |
A normal1 |
| 41 |
A sub/large2 |
| 42 |
A sub/normal2 |
| 43 |
$ touch large1 sub/large2 |
| 44 |
$ sleep 1 |
| 45 |
$ hg st |
| 46 |
$ hg debugstate --no-dates |
| 47 |
n 644 41 set .hglf/large1 |
| 48 |
n 644 41 set .hglf/sub/large2 |
| 49 |
n 644 8 set normal1 |
| 50 |
n 644 8 set sub/normal2 |
| 51 |
$ hg debugstate --large --no-dates |
| 52 |
n 644 7 set large1 |
| 53 |
n 644 7 set sub/large2 |
| 54 |
$ echo normal11 > normal1 |
| 55 |
$ echo normal22 > sub/normal2 |
| 56 |
$ echo large11 > large1 |
| 57 |
$ echo large22 > sub/large2 |
| 58 |
$ hg commit -m "edit files" |
| 59 |
Invoking status precommit hook |
| 60 |
M large1 |
| 61 |
M normal1 |
| 62 |
M sub/large2 |
| 63 |
M sub/normal2 |
| 64 |
$ hg sum --large |
| 65 |
parent: 1:ce8896473775 tip |
| 66 |
edit files |
| 67 |
branch: default |
| 68 |
commit: (clean) |
| 69 |
update: (current) |
| 70 |
phases: 2 draft |
| 71 |
largefiles: (no remote repo) |
| 72 |
|
| 73 |
Commit preserved largefile contents. |
| 74 |
|
| 75 |
$ cat normal1 |
| 76 |
normal11 |
| 77 |
$ cat large1 |
| 78 |
large11 |
| 79 |
$ cat sub/normal2 |
| 80 |
normal22 |
| 81 |
$ cat sub/large2 |
| 82 |
large22 |
| 83 |
|
| 84 |
Test status, subdir and unknown files |
| 85 |
|
| 86 |
$ echo unknown > sub/unknown |
| 87 |
$ hg st --all |
| 88 |
? sub/unknown |
| 89 |
C large1 |
| 90 |
C normal1 |
| 91 |
C sub/large2 |
| 92 |
C sub/normal2 |
| 93 |
$ hg st --all sub |
| 94 |
? sub/unknown |
| 95 |
C sub/large2 |
| 96 |
C sub/normal2 |
| 97 |
$ rm sub/unknown |
| 98 |
|
| 99 |
Test messages and exit codes for remove warning cases |
| 100 |
|
| 101 |
$ hg remove -A large1 |
| 102 |
not removing large1: file still exists |
| 103 |
[1] |
| 104 |
$ echo 'modified' > large1 |
| 105 |
$ hg remove large1 |
| 106 |
not removing large1: file is modified (use -f to force removal) |
| 107 |
[1] |
| 108 |
$ echo 'new' > normalnew |
| 109 |
$ hg add normalnew |
| 110 |
$ echo 'new' > largenew |
| 111 |
$ hg add --large normalnew |
| 112 |
normalnew already tracked! |
| 113 |
$ hg remove normalnew largenew |
| 114 |
not removing largenew: file is untracked |
| 115 |
not removing normalnew: file has been marked for add (use 'hg forget' to undo add) |
| 116 |
[1] |
| 117 |
$ rm normalnew largenew |
| 118 |
$ hg up -Cq |
| 119 |
|
| 120 |
Remove both largefiles and normal files. |
| 121 |
|
| 122 |
$ hg remove normal1 large1 |
| 123 |
$ hg status large1 |
| 124 |
R large1 |
| 125 |
$ hg commit -m "remove files" |
| 126 |
Invoking status precommit hook |
| 127 |
R large1 |
| 128 |
R normal1 |
| 129 |
$ ls -A |
| 130 |
.hg |
| 131 |
.hglf |
| 132 |
sub |
| 133 |
$ echo "testlargefile" > large1-test |
| 134 |
$ hg add --large large1-test |
| 135 |
$ hg st |
| 136 |
A large1-test |
| 137 |
$ hg rm large1-test |
| 138 |
not removing large1-test: file has been marked for add (use forget to undo) |
| 139 |
[1] |
| 140 |
$ hg st |
| 141 |
A large1-test |
| 142 |
$ hg forget large1-test |
| 143 |
$ hg st |
| 144 |
? large1-test |
| 145 |
$ hg remove large1-test |
| 146 |
not removing large1-test: file is untracked |
| 147 |
[1] |
| 148 |
$ hg forget large1-test |
| 149 |
not removing large1-test: file is already untracked |
| 150 |
[1] |
| 151 |
$ rm large1-test |
| 152 |
|
| 153 |
Copy both largefiles and normal files (testing that status output is correct). |
| 154 |
|
| 155 |
$ hg cp sub/normal2 normal1 |
| 156 |
$ hg cp sub/large2 large1 |
| 157 |
$ hg commit -m "copy files" |
| 158 |
Invoking status precommit hook |
| 159 |
A large1 |
| 160 |
A normal1 |
| 161 |
$ cat normal1 |
| 162 |
normal22 |
| 163 |
$ cat large1 |
| 164 |
large22 |
| 165 |
|
| 166 |
Test moving largefiles and verify that normal files are also unaffected. |
| 167 |
|
| 168 |
$ hg mv normal1 normal3 |
| 169 |
$ hg mv large1 large3 |
| 170 |
$ hg mv sub/normal2 sub/normal4 |
| 171 |
$ hg mv sub/large2 sub/large4 |
| 172 |
$ hg commit -m "move files" |
| 173 |
Invoking status precommit hook |
| 174 |
A large3 |
| 175 |
A normal3 |
| 176 |
A sub/large4 |
| 177 |
A sub/normal4 |
| 178 |
R large1 |
| 179 |
R normal1 |
| 180 |
R sub/large2 |
| 181 |
R sub/normal2 |
| 182 |
$ cat normal3 |
| 183 |
normal22 |
| 184 |
$ cat large3 |
| 185 |
large22 |
| 186 |
$ cat sub/normal4 |
| 187 |
normal22 |
| 188 |
$ cat sub/large4 |
| 189 |
large22 |
| 190 |
|
| 191 |
|
| 192 |
#if serve |
| 193 |
Test display of largefiles in hgweb |
| 194 |
|
| 195 |
$ hg serve -d -p $HGPORT --pid-file ../hg.pid |
| 196 |
$ cat ../hg.pid >> $DAEMON_PIDS |
| 197 |
$ get-with-headers.py $LOCALIP:$HGPORT 'file/tip/?style=raw' |
| 198 |
200 Script output follows |
| 199 |
|
| 200 |
|
| 201 |
drwxr-xr-x sub |
| 202 |
-rw-r--r-- 41 large3 |
| 203 |
-rw-r--r-- 9 normal3 |
| 204 |
|
| 205 |
|
| 206 |
$ get-with-headers.py $LOCALIP:$HGPORT 'file/tip/sub/?style=raw' |
| 207 |
200 Script output follows |
| 208 |
|
| 209 |
|
| 210 |
-rw-r--r-- 41 large4 |
| 211 |
-rw-r--r-- 9 normal4 |
| 212 |
|
| 213 |
|
| 214 |
$ killdaemons.py |
| 215 |
#endif |
| 216 |
|
| 217 |
Test largefiles can be loaded in hgweb (wrapcommand() shouldn't fail) |
| 218 |
|
| 219 |
$ cat <<EOF > "$TESTTMP/hgweb.cgi" |
| 220 |
> #!$PYTHON |
| 221 |
> from mercurial import demandimport; demandimport.enable() |
| 222 |
> from mercurial.hgweb import hgweb |
| 223 |
> from mercurial.hgweb import wsgicgi |
| 224 |
> from mercurial.commands import __doc__ |
| 225 |
> application = hgweb(b'.', b'test repo') |
| 226 |
> wsgicgi.launch(application) |
| 227 |
> EOF |
| 228 |
$ . "$TESTDIR/cgienv" |
| 229 |
|
| 230 |
$ SCRIPT_NAME='' \ |
| 231 |
> "$PYTHON" "$TESTTMP/hgweb.cgi" > /dev/null |
| 232 |
|
| 233 |
Test archiving the various revisions. These hit corner cases known with |
| 234 |
archiving. |
| 235 |
|
| 236 |
$ hg archive -r 0 ../archive0 |
| 237 |
$ hg archive -r 1 ../archive1 |
| 238 |
$ hg archive -r 2 ../archive2 |
| 239 |
$ hg archive -r 3 ../archive3 |
| 240 |
$ hg archive -r 4 ../archive4 |
| 241 |
$ cd ../archive0 |
| 242 |
$ cat normal1 |
| 243 |
normal1 |
| 244 |
$ cat large1 |
| 245 |
large1 |
| 246 |
$ cat sub/normal2 |
| 247 |
normal2 |
| 248 |
$ cat sub/large2 |
| 249 |
large2 |
| 250 |
$ cd ../archive1 |
| 251 |
$ cat normal1 |
| 252 |
normal11 |
| 253 |
$ cat large1 |
| 254 |
large11 |
| 255 |
$ cat sub/normal2 |
| 256 |
normal22 |
| 257 |
$ cat sub/large2 |
| 258 |
large22 |
| 259 |
$ cd ../archive2 |
| 260 |
$ ls -A |
| 261 |
.hg_archival.txt |
| 262 |
sub |
| 263 |
$ cat sub/normal2 |
| 264 |
normal22 |
| 265 |
$ cat sub/large2 |
| 266 |
large22 |
| 267 |
$ cd ../archive3 |
| 268 |
$ cat normal1 |
| 269 |
normal22 |
| 270 |
$ cat large1 |
| 271 |
large22 |
| 272 |
$ cat sub/normal2 |
| 273 |
normal22 |
| 274 |
$ cat sub/large2 |
| 275 |
large22 |
| 276 |
$ cd ../archive4 |
| 277 |
$ cat normal3 |
| 278 |
normal22 |
| 279 |
$ cat large3 |
| 280 |
large22 |
| 281 |
$ cat sub/normal4 |
| 282 |
normal22 |
| 283 |
$ cat sub/large4 |
| 284 |
large22 |
| 285 |
|
| 286 |
Commit corner case: specify files to commit. |
| 287 |
|
| 288 |
$ cd ../a |
| 289 |
$ echo normal3 > normal3 |
| 290 |
$ echo large3 > large3 |
| 291 |
$ echo normal4 > sub/normal4 |
| 292 |
$ echo large4 > sub/large4 |
| 293 |
$ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again" |
| 294 |
Invoking status precommit hook |
| 295 |
M large3 |
| 296 |
M normal3 |
| 297 |
M sub/large4 |
| 298 |
M sub/normal4 |
| 299 |
$ cat normal3 |
| 300 |
normal3 |
| 301 |
$ cat large3 |
| 302 |
large3 |
| 303 |
$ cat sub/normal4 |
| 304 |
normal4 |
| 305 |
$ cat sub/large4 |
| 306 |
large4 |
| 307 |
|
| 308 |
One more commit corner case: commit from a subdirectory. |
| 309 |
|
| 310 |
$ cd ../a |
| 311 |
$ echo normal33 > normal3 |
| 312 |
$ echo large33 > large3 |
| 313 |
$ echo normal44 > sub/normal4 |
| 314 |
$ echo large44 > sub/large4 |
| 315 |
$ cd sub |
| 316 |
$ hg commit -m "edit files yet again" |
| 317 |
Invoking status precommit hook |
| 318 |
M large3 |
| 319 |
M normal3 |
| 320 |
M sub/large4 |
| 321 |
M sub/normal4 |
| 322 |
$ cat ../normal3 |
| 323 |
normal33 |
| 324 |
$ cat ../large3 |
| 325 |
large33 |
| 326 |
$ cat normal4 |
| 327 |
normal44 |
| 328 |
$ cat large4 |
| 329 |
large44 |
| 330 |
|
| 331 |
Committing standins is not allowed. |
| 332 |
|
| 333 |
$ cd .. |
| 334 |
$ echo large3 > large3 |
| 335 |
$ hg commit .hglf/large3 -m "try to commit standin" |
| 336 |
abort: file ".hglf/large3" is a largefile standin |
| 337 |
(commit the largefile itself instead) |
| 338 |
[255] |
| 339 |
|
| 340 |
Corner cases for adding largefiles. |
| 341 |
|
| 342 |
$ echo large5 > large5 |
| 343 |
$ hg add --large large5 |
| 344 |
$ hg add --large large5 |
| 345 |
large5 already a largefile |
| 346 |
$ mkdir sub2 |
| 347 |
$ echo large6 > sub2/large6 |
| 348 |
$ echo large7 > sub2/large7 |
| 349 |
$ hg add --large sub2 |
| 350 |
adding sub2/large6 as a largefile |
| 351 |
adding sub2/large7 as a largefile |
| 352 |
$ hg st |
| 353 |
M large3 |
| 354 |
A large5 |
| 355 |
A sub2/large6 |
| 356 |
A sub2/large7 |
| 357 |
|
| 358 |
Committing directories containing only largefiles. |
| 359 |
|
| 360 |
$ mkdir -p z/y/x/m |
| 361 |
$ touch z/y/x/m/large1 |
| 362 |
$ touch z/y/x/large2 |
| 363 |
$ hg add --large z/y/x/m/large1 z/y/x/large2 |
| 364 |
$ hg commit -m "Subdir with directory only containing largefiles" z |
| 365 |
Invoking status precommit hook |
| 366 |
M large3 |
| 367 |
A large5 |
| 368 |
A sub2/large6 |
| 369 |
A sub2/large7 |
| 370 |
A z/y/x/large2 |
| 371 |
A z/y/x/m/large1 |
| 372 |
|
| 373 |
(and a bit of log testing) |
| 374 |
|
| 375 |
$ hg log -T '{rev}\n' z/y/x/m/large1 |
| 376 |
7 |
| 377 |
$ hg log -T '{rev}\n' z/y/x/m # with only a largefile |
| 378 |
7 |
| 379 |
|
| 380 |
$ hg rollback --quiet |
| 381 |
$ touch z/y/x/m/normal |
| 382 |
$ hg add z/y/x/m/normal |
| 383 |
$ hg commit -m "Subdir with mixed contents" z |
| 384 |
Invoking status precommit hook |
| 385 |
M large3 |
| 386 |
A large5 |
| 387 |
A sub2/large6 |
| 388 |
A sub2/large7 |
| 389 |
A z/y/x/large2 |
| 390 |
A z/y/x/m/large1 |
| 391 |
A z/y/x/m/normal |
| 392 |
$ hg st |
| 393 |
M large3 |
| 394 |
A large5 |
| 395 |
A sub2/large6 |
| 396 |
A sub2/large7 |
| 397 |
$ hg rollback --quiet |
| 398 |
$ hg revert z/y/x/large2 z/y/x/m/large1 |
| 399 |
$ rm z/y/x/large2 z/y/x/m/large1 |
| 400 |
$ hg commit -m "Subdir with normal contents" z |
| 401 |
Invoking status precommit hook |
| 402 |
M large3 |
| 403 |
A large5 |
| 404 |
A sub2/large6 |
| 405 |
A sub2/large7 |
| 406 |
A z/y/x/m/normal |
| 407 |
$ hg st |
| 408 |
M large3 |
| 409 |
A large5 |
| 410 |
A sub2/large6 |
| 411 |
A sub2/large7 |
| 412 |
$ hg rollback --quiet |
| 413 |
$ hg revert --quiet z |
| 414 |
$ hg commit -m "Empty subdir" z |
| 415 |
abort: z: no match under directory! |
| 416 |
[10] |
| 417 |
$ rm -rf z |
| 418 |
$ hg ci -m "standin" .hglf |
| 419 |
abort: file ".hglf" is a largefile standin |
| 420 |
(commit the largefile itself instead) |
| 421 |
[255] |
| 422 |
|
| 423 |
Test "hg status" with combination of 'file pattern' and 'directory |
| 424 |
pattern' for largefiles: |
| 425 |
|
| 426 |
$ hg status sub2/large6 sub2 |
| 427 |
A sub2/large6 |
| 428 |
A sub2/large7 |
| 429 |
|
| 430 |
Config settings (pattern **.dat, minsize 2 MB) are respected. |
| 431 |
|
| 432 |
$ echo testdata > test.dat |
| 433 |
$ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null |
| 434 |
$ hg add |
| 435 |
adding reallylarge as a largefile |
| 436 |
adding test.dat as a largefile |
| 437 |
|
| 438 |
Test that minsize and --lfsize handle float values; |
| 439 |
also tests that --lfsize overrides largefiles.minsize. |
| 440 |
(0.250 MB = 256 kB = 262144 B) |
| 441 |
|
| 442 |
$ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null |
| 443 |
$ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null |
| 444 |
$ hg --config largefiles.minsize=.25 add |
| 445 |
adding ratherlarge as a largefile |
| 446 |
adding medium |
| 447 |
$ hg forget medium |
| 448 |
$ hg --config largefiles.minsize=.25 add --lfsize=.125 |
| 449 |
adding medium as a largefile |
| 450 |
$ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null |
| 451 |
$ hg --config largefiles.minsize=.25 add --lfsize=.125 |
| 452 |
adding notlarge |
| 453 |
$ hg forget notlarge |
| 454 |
|
| 455 |
Test forget on largefiles. |
| 456 |
|
| 457 |
$ hg forget large3 large5 test.dat reallylarge ratherlarge medium |
| 458 |
$ hg commit -m "add/edit more largefiles" |
| 459 |
Invoking status precommit hook |
| 460 |
A sub2/large6 |
| 461 |
A sub2/large7 |
| 462 |
R large3 |
| 463 |
? large5 |
| 464 |
? medium |
| 465 |
? notlarge |
| 466 |
? ratherlarge |
| 467 |
? reallylarge |
| 468 |
? test.dat |
| 469 |
$ hg st |
| 470 |
? large3 |
| 471 |
? large5 |
| 472 |
? medium |
| 473 |
? notlarge |
| 474 |
? ratherlarge |
| 475 |
? reallylarge |
| 476 |
? test.dat |
| 477 |
|
| 478 |
Purge with largefiles: verify that largefiles are still in the working |
| 479 |
dir after a purge. |
| 480 |
|
| 481 |
$ hg purge --all |
| 482 |
$ cat sub/large4 |
| 483 |
large44 |
| 484 |
$ cat sub2/large6 |
| 485 |
large6 |
| 486 |
$ cat sub2/large7 |
| 487 |
large7 |
| 488 |
|
| 489 |
Test addremove: verify that files that should be added as largefiles are added as |
| 490 |
such and that already-existing largefiles are not added as normal files by |
| 491 |
accident. |
| 492 |
|
| 493 |
$ rm normal3 |
| 494 |
$ rm sub/large4 |
| 495 |
$ echo "testing addremove with patterns" > testaddremove.dat |
| 496 |
$ echo "normaladdremove" > normaladdremove |
| 497 |
$ hg addremove |
| 498 |
removing sub/large4 |
| 499 |
adding testaddremove.dat as a largefile |
| 500 |
removing normal3 |
| 501 |
adding normaladdremove |
| 502 |
|
| 503 |
Test addremove with -R |
| 504 |
|
| 505 |
$ hg up -C |
| 506 |
getting changed largefiles |
| 507 |
1 largefiles updated, 0 removed |
| 508 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 509 |
$ rm normal3 |
| 510 |
$ rm sub/large4 |
| 511 |
$ echo "testing addremove with patterns" > testaddremove.dat |
| 512 |
$ echo "normaladdremove" > normaladdremove |
| 513 |
$ cd .. |
| 514 |
$ hg -R a -v addremove |
| 515 |
removing sub/large4 |
| 516 |
adding testaddremove.dat as a largefile |
| 517 |
removing normal3 |
| 518 |
adding normaladdremove |
| 519 |
$ cd a |
| 520 |
|
| 521 |
Test 3364 |
| 522 |
$ hg clone . ../addrm |
| 523 |
updating to branch default |
| 524 |
getting changed largefiles |
| 525 |
3 largefiles updated, 0 removed |
| 526 |
5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 527 |
$ cd ../addrm |
| 528 |
$ cat >> .hg/hgrc <<EOF |
| 529 |
> [hooks] |
| 530 |
> post-commit.stat=sh -c "echo \\"Invoking status postcommit hook\\"; hg status -A" |
| 531 |
> EOF |
| 532 |
$ touch foo |
| 533 |
$ hg add --large foo |
| 534 |
$ hg ci -m "add foo" |
| 535 |
Invoking status precommit hook |
| 536 |
A foo |
| 537 |
Invoking status postcommit hook |
| 538 |
C foo |
| 539 |
C normal3 |
| 540 |
C sub/large4 |
| 541 |
C sub/normal4 |
| 542 |
C sub2/large6 |
| 543 |
C sub2/large7 |
| 544 |
$ rm foo |
| 545 |
$ hg st |
| 546 |
! foo |
| 547 |
hmm.. no precommit invoked, but there is a postcommit?? |
| 548 |
$ hg ci -m "will not checkin" |
| 549 |
nothing changed (1 missing files, see 'hg status') |
| 550 |
Invoking status postcommit hook |
| 551 |
! foo |
| 552 |
C normal3 |
| 553 |
C sub/large4 |
| 554 |
C sub/normal4 |
| 555 |
C sub2/large6 |
| 556 |
C sub2/large7 |
| 557 |
[1] |
| 558 |
$ hg addremove |
| 559 |
removing foo |
| 560 |
$ hg st |
| 561 |
R foo |
| 562 |
$ hg ci -m "used to say nothing changed" |
| 563 |
Invoking status precommit hook |
| 564 |
R foo |
| 565 |
Invoking status postcommit hook |
| 566 |
C normal3 |
| 567 |
C sub/large4 |
| 568 |
C sub/normal4 |
| 569 |
C sub2/large6 |
| 570 |
C sub2/large7 |
| 571 |
$ hg st |
| 572 |
|
| 573 |
Test 3507 (both normal files and largefiles were a problem) |
| 574 |
|
| 575 |
$ touch normal |
| 576 |
$ touch large |
| 577 |
$ hg add normal |
| 578 |
$ hg add --large large |
| 579 |
$ hg ci -m "added" |
| 580 |
Invoking status precommit hook |
| 581 |
A large |
| 582 |
A normal |
| 583 |
Invoking status postcommit hook |
| 584 |
C large |
| 585 |
C normal |
| 586 |
C normal3 |
| 587 |
C sub/large4 |
| 588 |
C sub/normal4 |
| 589 |
C sub2/large6 |
| 590 |
C sub2/large7 |
| 591 |
$ hg remove normal |
| 592 |
$ hg addremove --traceback |
| 593 |
$ hg ci -m "addremoved normal" |
| 594 |
Invoking status precommit hook |
| 595 |
R normal |
| 596 |
Invoking status postcommit hook |
| 597 |
C large |
| 598 |
C normal3 |
| 599 |
C sub/large4 |
| 600 |
C sub/normal4 |
| 601 |
C sub2/large6 |
| 602 |
C sub2/large7 |
| 603 |
$ hg up -C '.^' |
| 604 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 605 |
$ hg remove large |
| 606 |
$ hg addremove --traceback |
| 607 |
$ hg ci -m "removed large" |
| 608 |
Invoking status precommit hook |
| 609 |
R large |
| 610 |
created new head |
| 611 |
Invoking status postcommit hook |
| 612 |
C normal |
| 613 |
C normal3 |
| 614 |
C sub/large4 |
| 615 |
C sub/normal4 |
| 616 |
C sub2/large6 |
| 617 |
C sub2/large7 |
| 618 |
|
| 619 |
Test commit -A (issue3542) |
| 620 |
$ echo large8 > large8 |
| 621 |
$ hg add --large large8 |
| 622 |
$ hg ci -Am 'this used to add large8 as normal and commit both' |
| 623 |
Invoking status precommit hook |
| 624 |
A large8 |
| 625 |
Invoking status postcommit hook |
| 626 |
C large8 |
| 627 |
C normal |
| 628 |
C normal3 |
| 629 |
C sub/large4 |
| 630 |
C sub/normal4 |
| 631 |
C sub2/large6 |
| 632 |
C sub2/large7 |
| 633 |
$ rm large8 |
| 634 |
$ hg ci -Am 'this used to not notice the rm' |
| 635 |
removing large8 |
| 636 |
Invoking status precommit hook |
| 637 |
R large8 |
| 638 |
Invoking status postcommit hook |
| 639 |
C normal |
| 640 |
C normal3 |
| 641 |
C sub/large4 |
| 642 |
C sub/normal4 |
| 643 |
C sub2/large6 |
| 644 |
C sub2/large7 |
| 645 |
|
| 646 |
Test that a standin can't be added as a large file |
| 647 |
|
| 648 |
$ touch large |
| 649 |
$ hg add --large large |
| 650 |
$ hg ci -m "add" |
| 651 |
Invoking status precommit hook |
| 652 |
A large |
| 653 |
Invoking status postcommit hook |
| 654 |
C large |
| 655 |
C normal |
| 656 |
C normal3 |
| 657 |
C sub/large4 |
| 658 |
C sub/normal4 |
| 659 |
C sub2/large6 |
| 660 |
C sub2/large7 |
| 661 |
$ hg remove large |
| 662 |
$ touch large |
| 663 |
$ hg addremove --config largefiles.patterns=**large --traceback |
| 664 |
adding large as a largefile |
| 665 |
|
| 666 |
Test that outgoing --large works (with revsets too) |
| 667 |
$ hg outgoing --rev '.^' --large |
| 668 |
comparing with $TESTTMP/a |
| 669 |
searching for changes |
| 670 |
changeset: 8:c02fd3b77ec4 |
| 671 |
user: test |
| 672 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 673 |
summary: add foo |
| 674 |
|
| 675 |
changeset: 9:289dd08c9bbb |
| 676 |
user: test |
| 677 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 678 |
summary: used to say nothing changed |
| 679 |
|
| 680 |
changeset: 10:34f23ac6ac12 |
| 681 |
user: test |
| 682 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 683 |
summary: added |
| 684 |
|
| 685 |
changeset: 12:710c1b2f523c |
| 686 |
parent: 10:34f23ac6ac12 |
| 687 |
user: test |
| 688 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 689 |
summary: removed large |
| 690 |
|
| 691 |
changeset: 13:0a3e75774479 |
| 692 |
user: test |
| 693 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 694 |
summary: this used to add large8 as normal and commit both |
| 695 |
|
| 696 |
changeset: 14:84f3d378175c |
| 697 |
user: test |
| 698 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 699 |
summary: this used to not notice the rm |
| 700 |
|
| 701 |
largefiles to upload (1 entities): |
| 702 |
large8 |
| 703 |
|
| 704 |
$ cd ../a |
| 705 |
|
| 706 |
Clone a largefiles repo. |
| 707 |
|
| 708 |
$ hg clone . ../b |
| 709 |
updating to branch default |
| 710 |
getting changed largefiles |
| 711 |
3 largefiles updated, 0 removed |
| 712 |
5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 713 |
$ cd ../b |
| 714 |
$ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
| 715 |
7:daea875e9014 add/edit more largefiles |
| 716 |
6:4355d653f84f edit files yet again |
| 717 |
5:9d5af5072dbd edit files again |
| 718 |
4:74c02385b94c move files |
| 719 |
3:9e8fbc4bce62 copy files |
| 720 |
2:51a0ae4d5864 remove files |
| 721 |
1:ce8896473775 edit files |
| 722 |
0:30d30fe6a5be add files |
| 723 |
$ cat normal3 |
| 724 |
normal33 |
| 725 |
|
| 726 |
Test graph log |
| 727 |
|
| 728 |
$ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' |
| 729 |
@ 7:daea875e9014 add/edit more largefiles |
| 730 |
| |
| 731 |
o 6:4355d653f84f edit files yet again |
| 732 |
| |
| 733 |
o 5:9d5af5072dbd edit files again |
| 734 |
| |
| 735 |
o 4:74c02385b94c move files |
| 736 |
| |
| 737 |
o 3:9e8fbc4bce62 copy files |
| 738 |
| |
| 739 |
o 2:51a0ae4d5864 remove files |
| 740 |
| |
| 741 |
o 1:ce8896473775 edit files |
| 742 |
| |
| 743 |
o 0:30d30fe6a5be add files |
| 744 |
|
| 745 |
|
| 746 |
Test log with --patch |
| 747 |
|
| 748 |
$ hg log --patch -r 6::7 |
| 749 |
changeset: 6:4355d653f84f |
| 750 |
user: test |
| 751 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 752 |
summary: edit files yet again |
| 753 |
|
| 754 |
diff -r 9d5af5072dbd -r 4355d653f84f .hglf/large3 |
| 755 |
--- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
| 756 |
+++ b/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
| 757 |
@@ -1,1 +1,1 @@ |
| 758 |
-baaf12afde9d8d67f25dab6dced0d2bf77dba47c |
| 759 |
+7838695e10da2bb75ac1156565f40a2595fa2fa0 |
| 760 |
diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 |
| 761 |
--- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
| 762 |
+++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
| 763 |
@@ -1,1 +1,1 @@ |
| 764 |
-aeb2210d19f02886dde00dac279729a48471e2f9 |
| 765 |
+971fb41e78fea4f8e0ba5244784239371cb00591 |
| 766 |
diff -r 9d5af5072dbd -r 4355d653f84f normal3 |
| 767 |
--- a/normal3 Thu Jan 01 00:00:00 1970 +0000 |
| 768 |
+++ b/normal3 Thu Jan 01 00:00:00 1970 +0000 |
| 769 |
@@ -1,1 +1,1 @@ |
| 770 |
-normal3 |
| 771 |
+normal33 |
| 772 |
diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4 |
| 773 |
--- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
| 774 |
+++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
| 775 |
@@ -1,1 +1,1 @@ |
| 776 |
-normal4 |
| 777 |
+normal44 |
| 778 |
|
| 779 |
changeset: 7:daea875e9014 |
| 780 |
tag: tip |
| 781 |
user: test |
| 782 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 783 |
summary: add/edit more largefiles |
| 784 |
|
| 785 |
diff -r 4355d653f84f -r daea875e9014 .hglf/large3 |
| 786 |
--- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
| 787 |
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
| 788 |
@@ -1,1 +0,0 @@ |
| 789 |
-7838695e10da2bb75ac1156565f40a2595fa2fa0 |
| 790 |
diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large6 |
| 791 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
| 792 |
+++ b/.hglf/sub2/large6 Thu Jan 01 00:00:00 1970 +0000 |
| 793 |
@@ -0,0 +1,1 @@ |
| 794 |
+0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30 |
| 795 |
diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large7 |
| 796 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
| 797 |
+++ b/.hglf/sub2/large7 Thu Jan 01 00:00:00 1970 +0000 |
| 798 |
@@ -0,0 +1,1 @@ |
| 799 |
+bb3151689acb10f0c3125c560d5e63df914bc1af |
| 800 |
|
| 801 |
|
| 802 |
$ hg log --patch -r 6::7 sub/ |
| 803 |
changeset: 6:4355d653f84f |
| 804 |
user: test |
| 805 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 806 |
summary: edit files yet again |
| 807 |
|
| 808 |
diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 |
| 809 |
--- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
| 810 |
+++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
| 811 |
@@ -1,1 +1,1 @@ |
| 812 |
-aeb2210d19f02886dde00dac279729a48471e2f9 |
| 813 |
+971fb41e78fea4f8e0ba5244784239371cb00591 |
| 814 |
diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4 |
| 815 |
--- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
| 816 |
+++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
| 817 |
@@ -1,1 +1,1 @@ |
| 818 |
-normal4 |
| 819 |
+normal44 |
| 820 |
|
| 821 |
|
| 822 |
log with both --follow and --patch |
| 823 |
|
| 824 |
$ hg log --follow --patch --limit 2 |
| 825 |
changeset: 7:daea875e9014 |
| 826 |
tag: tip |
| 827 |
user: test |
| 828 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 829 |
summary: add/edit more largefiles |
| 830 |
|
| 831 |
diff -r 4355d653f84f -r daea875e9014 .hglf/large3 |
| 832 |
--- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
| 833 |
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
| 834 |
@@ -1,1 +0,0 @@ |
| 835 |
-7838695e10da2bb75ac1156565f40a2595fa2fa0 |
| 836 |
diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large6 |
| 837 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
| 838 |
+++ b/.hglf/sub2/large6 Thu Jan 01 00:00:00 1970 +0000 |
| 839 |
@@ -0,0 +1,1 @@ |
| 840 |
+0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30 |
| 841 |
diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large7 |
| 842 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
| 843 |
+++ b/.hglf/sub2/large7 Thu Jan 01 00:00:00 1970 +0000 |
| 844 |
@@ -0,0 +1,1 @@ |
| 845 |
+bb3151689acb10f0c3125c560d5e63df914bc1af |
| 846 |
|
| 847 |
changeset: 6:4355d653f84f |
| 848 |
user: test |
| 849 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 850 |
summary: edit files yet again |
| 851 |
|
| 852 |
diff -r 9d5af5072dbd -r 4355d653f84f .hglf/large3 |
| 853 |
--- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
| 854 |
+++ b/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
| 855 |
@@ -1,1 +1,1 @@ |
| 856 |
-baaf12afde9d8d67f25dab6dced0d2bf77dba47c |
| 857 |
+7838695e10da2bb75ac1156565f40a2595fa2fa0 |
| 858 |
diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 |
| 859 |
--- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
| 860 |
+++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
| 861 |
@@ -1,1 +1,1 @@ |
| 862 |
-aeb2210d19f02886dde00dac279729a48471e2f9 |
| 863 |
+971fb41e78fea4f8e0ba5244784239371cb00591 |
| 864 |
diff -r 9d5af5072dbd -r 4355d653f84f normal3 |
| 865 |
--- a/normal3 Thu Jan 01 00:00:00 1970 +0000 |
| 866 |
+++ b/normal3 Thu Jan 01 00:00:00 1970 +0000 |
| 867 |
@@ -1,1 +1,1 @@ |
| 868 |
-normal3 |
| 869 |
+normal33 |
| 870 |
diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4 |
| 871 |
--- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
| 872 |
+++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
| 873 |
@@ -1,1 +1,1 @@ |
| 874 |
-normal4 |
| 875 |
+normal44 |
| 876 |
|
| 877 |
$ hg log --follow --patch sub/large4 |
| 878 |
changeset: 6:4355d653f84f |
| 879 |
user: test |
| 880 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 881 |
summary: edit files yet again |
| 882 |
|
| 883 |
diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 |
| 884 |
--- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
| 885 |
+++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
| 886 |
@@ -1,1 +1,1 @@ |
| 887 |
-aeb2210d19f02886dde00dac279729a48471e2f9 |
| 888 |
+971fb41e78fea4f8e0ba5244784239371cb00591 |
| 889 |
|
| 890 |
changeset: 5:9d5af5072dbd |
| 891 |
user: test |
| 892 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 893 |
summary: edit files again |
| 894 |
|
| 895 |
diff -r 74c02385b94c -r 9d5af5072dbd .hglf/sub/large4 |
| 896 |
--- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
| 897 |
+++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
| 898 |
@@ -1,1 +1,1 @@ |
| 899 |
-eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
| 900 |
+aeb2210d19f02886dde00dac279729a48471e2f9 |
| 901 |
|
| 902 |
changeset: 4:74c02385b94c |
| 903 |
user: test |
| 904 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 905 |
summary: move files |
| 906 |
|
| 907 |
diff -r 9e8fbc4bce62 -r 74c02385b94c .hglf/sub/large4 |
| 908 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
| 909 |
+++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
| 910 |
@@ -0,0 +1,1 @@ |
| 911 |
+eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
| 912 |
|
| 913 |
changeset: 1:ce8896473775 |
| 914 |
user: test |
| 915 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 916 |
summary: edit files |
| 917 |
|
| 918 |
diff -r 30d30fe6a5be -r ce8896473775 .hglf/sub/large2 |
| 919 |
--- a/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000 |
| 920 |
+++ b/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000 |
| 921 |
@@ -1,1 +1,1 @@ |
| 922 |
-1deebade43c8c498a3c8daddac0244dc55d1331d |
| 923 |
+eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
| 924 |
|
| 925 |
changeset: 0:30d30fe6a5be |
| 926 |
user: test |
| 927 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 928 |
summary: add files |
| 929 |
|
| 930 |
diff -r 000000000000 -r 30d30fe6a5be .hglf/sub/large2 |
| 931 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
| 932 |
+++ b/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000 |
| 933 |
@@ -0,0 +1,1 @@ |
| 934 |
+1deebade43c8c498a3c8daddac0244dc55d1331d |
| 935 |
|
| 936 |
$ cat sub/normal4 |
| 937 |
normal44 |
| 938 |
$ cat sub/large4 |
| 939 |
large44 |
| 940 |
$ cat sub2/large6 |
| 941 |
large6 |
| 942 |
$ cat sub2/large7 |
| 943 |
large7 |
| 944 |
$ hg log -qf sub2/large7 |
| 945 |
7:daea875e9014 |
| 946 |
$ hg log -Gqf sub2/large7 |
| 947 |
@ 7:daea875e9014 |
| 948 |
| |
| 949 |
~ |
| 950 |
$ cd .. |
| 951 |
|
| 952 |
Test log from outside repo |
| 953 |
|
| 954 |
$ hg log b/sub -T '{rev}:{node|short} {desc|firstline}\n' |
| 955 |
6:4355d653f84f edit files yet again |
| 956 |
5:9d5af5072dbd edit files again |
| 957 |
4:74c02385b94c move files |
| 958 |
1:ce8896473775 edit files |
| 959 |
0:30d30fe6a5be add files |
| 960 |
|
| 961 |
Test clone at revision |
| 962 |
|
| 963 |
$ hg clone a -r 3 c |
| 964 |
adding changesets |
| 965 |
adding manifests |
| 966 |
adding file changes |
| 967 |
added 4 changesets with 10 changes to 4 files |
| 968 |
new changesets 30d30fe6a5be:9e8fbc4bce62 (4 drafts) |
| 969 |
updating to branch default |
| 970 |
getting changed largefiles |
| 971 |
2 largefiles updated, 0 removed |
| 972 |
4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 973 |
$ cd c |
| 974 |
$ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
| 975 |
3:9e8fbc4bce62 copy files |
| 976 |
2:51a0ae4d5864 remove files |
| 977 |
1:ce8896473775 edit files |
| 978 |
0:30d30fe6a5be add files |
| 979 |
$ cat normal1 |
| 980 |
normal22 |
| 981 |
$ cat large1 |
| 982 |
large22 |
| 983 |
$ cat sub/normal2 |
| 984 |
normal22 |
| 985 |
$ cat sub/large2 |
| 986 |
large22 |
| 987 |
|
| 988 |
Old revisions of a clone have correct largefiles content (this also |
| 989 |
tests update). |
| 990 |
|
| 991 |
$ hg update -r 1 |
| 992 |
getting changed largefiles |
| 993 |
1 largefiles updated, 0 removed |
| 994 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 995 |
$ cat large1 |
| 996 |
large11 |
| 997 |
$ cat sub/large2 |
| 998 |
large22 |
| 999 |
$ cd .. |
| 1000 |
|
| 1001 |
Test cloning with --all-largefiles flag |
| 1002 |
|
| 1003 |
$ rm "${USERCACHE}"/* |
| 1004 |
$ hg clone --all-largefiles a a-backup |
| 1005 |
updating to branch default |
| 1006 |
getting changed largefiles |
| 1007 |
3 largefiles updated, 0 removed |
| 1008 |
5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1009 |
7 additional largefiles cached |
| 1010 |
|
| 1011 |
$ rm "${USERCACHE}"/* |
| 1012 |
$ hg clone --all-largefiles -u 0 a a-clone0 |
| 1013 |
updating to branch default |
| 1014 |
getting changed largefiles |
| 1015 |
2 largefiles updated, 0 removed |
| 1016 |
4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1017 |
8 additional largefiles cached |
| 1018 |
$ hg -R a-clone0 sum |
| 1019 |
parent: 0:30d30fe6a5be |
| 1020 |
add files |
| 1021 |
branch: default |
| 1022 |
commit: (clean) |
| 1023 |
update: 7 new changesets (update) |
| 1024 |
phases: 8 draft |
| 1025 |
|
| 1026 |
$ rm "${USERCACHE}"/* |
| 1027 |
$ hg clone --all-largefiles -u 1 a a-clone1 |
| 1028 |
updating to branch default |
| 1029 |
getting changed largefiles |
| 1030 |
2 largefiles updated, 0 removed |
| 1031 |
4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1032 |
8 additional largefiles cached |
| 1033 |
$ hg -R a-clone1 verify --large --lfa --lfc -q |
| 1034 |
$ hg -R a-clone1 sum |
| 1035 |
parent: 1:ce8896473775 |
| 1036 |
edit files |
| 1037 |
branch: default |
| 1038 |
commit: (clean) |
| 1039 |
update: 6 new changesets (update) |
| 1040 |
phases: 8 draft |
| 1041 |
|
| 1042 |
$ rm "${USERCACHE}"/* |
| 1043 |
$ hg clone --all-largefiles -U a a-clone-u |
| 1044 |
10 additional largefiles cached |
| 1045 |
$ hg -R a-clone-u sum |
| 1046 |
parent: -1:000000000000 (no revision checked out) |
| 1047 |
branch: default |
| 1048 |
commit: (clean) |
| 1049 |
update: 8 new changesets (update) |
| 1050 |
phases: 8 draft |
| 1051 |
|
| 1052 |
Show computed destination directory: |
| 1053 |
|
| 1054 |
$ mkdir xyz |
| 1055 |
$ cd xyz |
| 1056 |
$ hg clone ../a |
| 1057 |
destination directory: a |
| 1058 |
updating to branch default |
| 1059 |
getting changed largefiles |
| 1060 |
3 largefiles updated, 0 removed |
| 1061 |
5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1062 |
$ cd .. |
| 1063 |
|
| 1064 |
Clone URL without path: |
| 1065 |
|
| 1066 |
$ hg clone file:// |
| 1067 |
abort: repository / not found |
| 1068 |
[255] |
| 1069 |
|
| 1070 |
Ensure base clone command argument validation |
| 1071 |
|
| 1072 |
$ hg clone -U -u 0 a a-clone-failure |
| 1073 |
abort: cannot specify both --noupdate and --updaterev |
| 1074 |
[10] |
| 1075 |
|
| 1076 |
$ hg clone --all-largefiles a ssh://localhost/a |
| 1077 |
abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a |
| 1078 |
[255] |
| 1079 |
|
| 1080 |
$ touch existing_destination |
| 1081 |
$ hg clone --all-largefiles a existing_destination |
| 1082 |
abort: destination 'existing_destination' already exists |
| 1083 |
[10] |
| 1084 |
|
| 1085 |
Test pulling with --all-largefiles flag. Also test that the largefiles are |
| 1086 |
downloaded from 'default' instead of 'default-push' when no source is specified |
| 1087 |
(issue3584) |
| 1088 |
|
| 1089 |
$ rm -Rf a-backup |
| 1090 |
$ hg clone -r 1 a a-backup |
| 1091 |
adding changesets |
| 1092 |
adding manifests |
| 1093 |
adding file changes |
| 1094 |
added 2 changesets with 8 changes to 4 files |
| 1095 |
new changesets 30d30fe6a5be:ce8896473775 (2 drafts) |
| 1096 |
updating to branch default |
| 1097 |
getting changed largefiles |
| 1098 |
2 largefiles updated, 0 removed |
| 1099 |
4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1100 |
$ rm "${USERCACHE}"/* |
| 1101 |
$ cd a-backup |
| 1102 |
$ hg pull --all-largefiles --config paths.default-push=bogus/path |
| 1103 |
pulling from $TESTTMP/a |
| 1104 |
searching for changes |
| 1105 |
adding changesets |
| 1106 |
adding manifests |
| 1107 |
adding file changes |
| 1108 |
added 6 changesets with 16 changes to 8 files |
| 1109 |
new changesets 51a0ae4d5864:daea875e9014 (6 drafts) |
| 1110 |
(run 'hg update' to get a working copy) |
| 1111 |
6 largefiles cached |
| 1112 |
|
| 1113 |
redo pull with --lfrev and check it pulls largefiles for the right revs |
| 1114 |
|
| 1115 |
$ hg rollback |
| 1116 |
repository tip rolled back to revision 1 (undo pull) |
| 1117 |
$ hg pull -v --lfrev 'heads(pulled())+min(pulled())' |
| 1118 |
pulling from $TESTTMP/a |
| 1119 |
searching for changes |
| 1120 |
all local changesets known remotely |
| 1121 |
6 changesets found |
| 1122 |
uncompressed size of bundle content: |
| 1123 |
1401 (changelog) |
| 1124 |
1710 (manifests) |
| 1125 |
256 .hglf/large1 |
| 1126 |
570 .hglf/large3 |
| 1127 |
578 .hglf/sub/large4 |
| 1128 |
184 .hglf/sub2/large6 |
| 1129 |
184 .hglf/sub2/large7 |
| 1130 |
214 normal1 |
| 1131 |
463 normal3 |
| 1132 |
471 sub/normal4 |
| 1133 |
adding changesets |
| 1134 |
adding manifests |
| 1135 |
adding file changes |
| 1136 |
added 6 changesets with 16 changes to 8 files |
| 1137 |
new changesets 51a0ae4d5864:daea875e9014 (6 drafts) |
| 1138 |
calling hook changegroup.lfiles: hgext.largefiles.reposetup.checkrequireslfiles |
| 1139 |
(run 'hg update' to get a working copy) |
| 1140 |
pulling largefiles for revision 7 |
| 1141 |
found 971fb41e78fea4f8e0ba5244784239371cb00591 in store |
| 1142 |
found 0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30 in store |
| 1143 |
found bb3151689acb10f0c3125c560d5e63df914bc1af in store |
| 1144 |
pulling largefiles for revision 2 |
| 1145 |
found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store |
| 1146 |
0 largefiles cached |
| 1147 |
|
| 1148 |
lfpull |
| 1149 |
|
| 1150 |
$ hg lfpull -r : --config largefiles.usercache=usercache-lfpull |
| 1151 |
2 largefiles cached |
| 1152 |
$ hg lfpull -v -r 4+2 --config largefiles.usercache=usercache-lfpull |
| 1153 |
pulling largefiles for revision 4 |
| 1154 |
found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store |
| 1155 |
found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store |
| 1156 |
pulling largefiles for revision 2 |
| 1157 |
found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store |
| 1158 |
0 largefiles cached |
| 1159 |
|
| 1160 |
$ ls usercache-lfpull/* | sort |
| 1161 |
usercache-lfpull/1deebade43c8c498a3c8daddac0244dc55d1331d |
| 1162 |
usercache-lfpull/4669e532d5b2c093a78eca010077e708a071bb64 |
| 1163 |
|
| 1164 |
$ cd .. |
| 1165 |
|
| 1166 |
Rebasing between two repositories does not revert largefiles to old |
| 1167 |
revisions (this was a very bad bug that took a lot of work to fix). |
| 1168 |
|
| 1169 |
$ hg clone a d |
| 1170 |
updating to branch default |
| 1171 |
getting changed largefiles |
| 1172 |
3 largefiles updated, 0 removed |
| 1173 |
5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1174 |
$ cd b |
| 1175 |
$ echo large4-modified > sub/large4 |
| 1176 |
$ echo normal3-modified > normal3 |
| 1177 |
$ hg commit -m "modify normal file and largefile in repo b" |
| 1178 |
Invoking status precommit hook |
| 1179 |
M normal3 |
| 1180 |
M sub/large4 |
| 1181 |
$ cd ../d |
| 1182 |
$ echo large6-modified > sub2/large6 |
| 1183 |
$ echo normal4-modified > sub/normal4 |
| 1184 |
$ hg commit -m "modify normal file largefile in repo d" |
| 1185 |
Invoking status precommit hook |
| 1186 |
M sub/normal4 |
| 1187 |
M sub2/large6 |
| 1188 |
$ cd .. |
| 1189 |
$ hg clone d e |
| 1190 |
updating to branch default |
| 1191 |
getting changed largefiles |
| 1192 |
3 largefiles updated, 0 removed |
| 1193 |
5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1194 |
$ cd d |
| 1195 |
|
| 1196 |
More rebase testing, but also test that the largefiles are downloaded from |
| 1197 |
'default-push' when no source is specified (issue3584). (The largefile from the |
| 1198 |
pulled revision is however not downloaded but found in the local cache.) |
| 1199 |
Largefiles are fetched for the new pulled revision, not for existing revisions, |
| 1200 |
rebased or not. |
| 1201 |
|
| 1202 |
$ [ ! -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ] |
| 1203 |
$ hg pull --rebase --all-largefiles --config paths.default-push=bogus/path --config paths.default=../b |
| 1204 |
pulling from $TESTTMP/b |
| 1205 |
searching for changes |
| 1206 |
adding changesets |
| 1207 |
adding manifests |
| 1208 |
adding file changes |
| 1209 |
added 1 changesets with 2 changes to 2 files (+1 heads) |
| 1210 |
new changesets a381d2c8c80e (1 drafts) |
| 1211 |
0 largefiles cached |
| 1212 |
rebasing 8:f574fb32bb45 "modify normal file largefile in repo d" |
| 1213 |
Invoking status precommit hook |
| 1214 |
M sub/normal4 |
| 1215 |
M sub2/large6 |
| 1216 |
saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-dd1d9f80-rebase.hg |
| 1217 |
$ [ -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ] |
| 1218 |
$ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
| 1219 |
9:598410d3eb9a modify normal file largefile in repo d |
| 1220 |
8:a381d2c8c80e modify normal file and largefile in repo b |
| 1221 |
7:daea875e9014 add/edit more largefiles |
| 1222 |
6:4355d653f84f edit files yet again |
| 1223 |
5:9d5af5072dbd edit files again |
| 1224 |
4:74c02385b94c move files |
| 1225 |
3:9e8fbc4bce62 copy files |
| 1226 |
2:51a0ae4d5864 remove files |
| 1227 |
1:ce8896473775 edit files |
| 1228 |
0:30d30fe6a5be add files |
| 1229 |
$ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' |
| 1230 |
@ 9:598410d3eb9a modify normal file largefile in repo d |
| 1231 |
| |
| 1232 |
o 8:a381d2c8c80e modify normal file and largefile in repo b |
| 1233 |
| |
| 1234 |
o 7:daea875e9014 add/edit more largefiles |
| 1235 |
| |
| 1236 |
o 6:4355d653f84f edit files yet again |
| 1237 |
| |
| 1238 |
o 5:9d5af5072dbd edit files again |
| 1239 |
| |
| 1240 |
o 4:74c02385b94c move files |
| 1241 |
| |
| 1242 |
o 3:9e8fbc4bce62 copy files |
| 1243 |
| |
| 1244 |
o 2:51a0ae4d5864 remove files |
| 1245 |
| |
| 1246 |
o 1:ce8896473775 edit files |
| 1247 |
| |
| 1248 |
o 0:30d30fe6a5be add files |
| 1249 |
|
| 1250 |
$ cat normal3 |
| 1251 |
normal3-modified |
| 1252 |
$ cat sub/normal4 |
| 1253 |
normal4-modified |
| 1254 |
$ cat sub/large4 |
| 1255 |
large4-modified |
| 1256 |
$ cat sub2/large6 |
| 1257 |
large6-modified |
| 1258 |
$ cat sub2/large7 |
| 1259 |
large7 |
| 1260 |
$ cd ../e |
| 1261 |
$ hg pull ../b |
| 1262 |
pulling from ../b |
| 1263 |
searching for changes |
| 1264 |
adding changesets |
| 1265 |
adding manifests |
| 1266 |
adding file changes |
| 1267 |
added 1 changesets with 2 changes to 2 files (+1 heads) |
| 1268 |
new changesets a381d2c8c80e (1 drafts) |
| 1269 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 1270 |
$ hg rebase |
| 1271 |
rebasing 8:f574fb32bb45 "modify normal file largefile in repo d" |
| 1272 |
Invoking status precommit hook |
| 1273 |
M sub/normal4 |
| 1274 |
M sub2/large6 |
| 1275 |
saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-dd1d9f80-rebase.hg |
| 1276 |
$ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
| 1277 |
9:598410d3eb9a modify normal file largefile in repo d |
| 1278 |
8:a381d2c8c80e modify normal file and largefile in repo b |
| 1279 |
7:daea875e9014 add/edit more largefiles |
| 1280 |
6:4355d653f84f edit files yet again |
| 1281 |
5:9d5af5072dbd edit files again |
| 1282 |
4:74c02385b94c move files |
| 1283 |
3:9e8fbc4bce62 copy files |
| 1284 |
2:51a0ae4d5864 remove files |
| 1285 |
1:ce8896473775 edit files |
| 1286 |
0:30d30fe6a5be add files |
| 1287 |
$ cat normal3 |
| 1288 |
normal3-modified |
| 1289 |
$ cat sub/normal4 |
| 1290 |
normal4-modified |
| 1291 |
$ cat sub/large4 |
| 1292 |
large4-modified |
| 1293 |
$ cat sub2/large6 |
| 1294 |
large6-modified |
| 1295 |
$ cat sub2/large7 |
| 1296 |
large7 |
| 1297 |
|
| 1298 |
Log on largefiles |
| 1299 |
|
| 1300 |
- same output |
| 1301 |
$ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 |
| 1302 |
8:a381d2c8c80e modify normal file and largefile in repo b |
| 1303 |
6:4355d653f84f edit files yet again |
| 1304 |
5:9d5af5072dbd edit files again |
| 1305 |
4:74c02385b94c move files |
| 1306 |
$ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 |
| 1307 |
o 8:a381d2c8c80e modify normal file and largefile in repo b |
| 1308 |
: |
| 1309 |
o 6:4355d653f84f edit files yet again |
| 1310 |
| |
| 1311 |
o 5:9d5af5072dbd edit files again |
| 1312 |
| |
| 1313 |
o 4:74c02385b94c move files |
| 1314 |
| |
| 1315 |
~ |
| 1316 |
$ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub/large4 |
| 1317 |
8:a381d2c8c80e modify normal file and largefile in repo b |
| 1318 |
6:4355d653f84f edit files yet again |
| 1319 |
5:9d5af5072dbd edit files again |
| 1320 |
4:74c02385b94c move files |
| 1321 |
$ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 |
| 1322 |
o 8:a381d2c8c80e modify normal file and largefile in repo b |
| 1323 |
: |
| 1324 |
o 6:4355d653f84f edit files yet again |
| 1325 |
| |
| 1326 |
o 5:9d5af5072dbd edit files again |
| 1327 |
| |
| 1328 |
o 4:74c02385b94c move files |
| 1329 |
| |
| 1330 |
~ |
| 1331 |
|
| 1332 |
- .hglf only matches largefiles, without .hglf it matches 9 bco sub/normal |
| 1333 |
$ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub |
| 1334 |
8:a381d2c8c80e modify normal file and largefile in repo b |
| 1335 |
6:4355d653f84f edit files yet again |
| 1336 |
5:9d5af5072dbd edit files again |
| 1337 |
4:74c02385b94c move files |
| 1338 |
1:ce8896473775 edit files |
| 1339 |
0:30d30fe6a5be add files |
| 1340 |
$ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub |
| 1341 |
o 8:a381d2c8c80e modify normal file and largefile in repo b |
| 1342 |
: |
| 1343 |
o 6:4355d653f84f edit files yet again |
| 1344 |
| |
| 1345 |
o 5:9d5af5072dbd edit files again |
| 1346 |
| |
| 1347 |
o 4:74c02385b94c move files |
| 1348 |
: |
| 1349 |
o 1:ce8896473775 edit files |
| 1350 |
| |
| 1351 |
o 0:30d30fe6a5be add files |
| 1352 |
|
| 1353 |
$ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub |
| 1354 |
9:598410d3eb9a modify normal file largefile in repo d |
| 1355 |
8:a381d2c8c80e modify normal file and largefile in repo b |
| 1356 |
6:4355d653f84f edit files yet again |
| 1357 |
5:9d5af5072dbd edit files again |
| 1358 |
4:74c02385b94c move files |
| 1359 |
1:ce8896473775 edit files |
| 1360 |
0:30d30fe6a5be add files |
| 1361 |
$ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' sub |
| 1362 |
@ 9:598410d3eb9a modify normal file largefile in repo d |
| 1363 |
| |
| 1364 |
o 8:a381d2c8c80e modify normal file and largefile in repo b |
| 1365 |
: |
| 1366 |
o 6:4355d653f84f edit files yet again |
| 1367 |
| |
| 1368 |
o 5:9d5af5072dbd edit files again |
| 1369 |
| |
| 1370 |
o 4:74c02385b94c move files |
| 1371 |
: |
| 1372 |
o 1:ce8896473775 edit files |
| 1373 |
| |
| 1374 |
o 0:30d30fe6a5be add files |
| 1375 |
|
| 1376 |
- globbing gives same result |
| 1377 |
$ hg log --template '{rev}:{node|short} {desc|firstline}\n' 'glob:sub/*' |
| 1378 |
9:598410d3eb9a modify normal file largefile in repo d |
| 1379 |
8:a381d2c8c80e modify normal file and largefile in repo b |
| 1380 |
6:4355d653f84f edit files yet again |
| 1381 |
5:9d5af5072dbd edit files again |
| 1382 |
4:74c02385b94c move files |
| 1383 |
1:ce8896473775 edit files |
| 1384 |
0:30d30fe6a5be add files |
| 1385 |
$ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' 'glob:sub/*' |
| 1386 |
@ 9:598410d3eb9a modify normal file largefile in repo d |
| 1387 |
| |
| 1388 |
o 8:a381d2c8c80e modify normal file and largefile in repo b |
| 1389 |
: |
| 1390 |
o 6:4355d653f84f edit files yet again |
| 1391 |
| |
| 1392 |
o 5:9d5af5072dbd edit files again |
| 1393 |
| |
| 1394 |
o 4:74c02385b94c move files |
| 1395 |
: |
| 1396 |
o 1:ce8896473775 edit files |
| 1397 |
| |
| 1398 |
o 0:30d30fe6a5be add files |
| 1399 |
|
| 1400 |
Rollback on largefiles. |
| 1401 |
|
| 1402 |
$ echo large4-modified-again > sub/large4 |
| 1403 |
$ hg commit -m "Modify large4 again" |
| 1404 |
Invoking status precommit hook |
| 1405 |
M sub/large4 |
| 1406 |
$ hg rollback |
| 1407 |
repository tip rolled back to revision 9 (undo commit) |
| 1408 |
working directory now based on revision 9 |
| 1409 |
$ hg st |
| 1410 |
M sub/large4 |
| 1411 |
$ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
| 1412 |
9:598410d3eb9a modify normal file largefile in repo d |
| 1413 |
8:a381d2c8c80e modify normal file and largefile in repo b |
| 1414 |
7:daea875e9014 add/edit more largefiles |
| 1415 |
6:4355d653f84f edit files yet again |
| 1416 |
5:9d5af5072dbd edit files again |
| 1417 |
4:74c02385b94c move files |
| 1418 |
3:9e8fbc4bce62 copy files |
| 1419 |
2:51a0ae4d5864 remove files |
| 1420 |
1:ce8896473775 edit files |
| 1421 |
0:30d30fe6a5be add files |
| 1422 |
$ cat sub/large4 |
| 1423 |
large4-modified-again |
| 1424 |
|
| 1425 |
"update --check" refuses to update with uncommitted changes. |
| 1426 |
$ hg update --check 8 |
| 1427 |
abort: uncommitted changes |
| 1428 |
[255] |
| 1429 |
|
| 1430 |
"update --clean" leaves correct largefiles in working copy, even when there is |
| 1431 |
.orig files from revert in .hglf. |
| 1432 |
|
| 1433 |
$ echo mistake > sub2/large7 |
| 1434 |
$ hg revert sub2/large7 |
| 1435 |
$ cat sub2/large7 |
| 1436 |
large7 |
| 1437 |
$ cat sub2/large7.orig |
| 1438 |
mistake |
| 1439 |
$ test ! -f .hglf/sub2/large7.orig |
| 1440 |
|
| 1441 |
$ hg -q update --clean -r null |
| 1442 |
$ hg update --clean |
| 1443 |
getting changed largefiles |
| 1444 |
3 largefiles updated, 0 removed |
| 1445 |
5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1446 |
$ cat normal3 |
| 1447 |
normal3-modified |
| 1448 |
$ cat sub/normal4 |
| 1449 |
normal4-modified |
| 1450 |
$ cat sub/large4 |
| 1451 |
large4-modified |
| 1452 |
$ cat sub2/large6 |
| 1453 |
large6-modified |
| 1454 |
$ cat sub2/large7 |
| 1455 |
large7 |
| 1456 |
$ cat sub2/large7.orig |
| 1457 |
mistake |
| 1458 |
$ test ! -f .hglf/sub2/large7.orig |
| 1459 |
|
| 1460 |
verify that largefile .orig file no longer is overwritten on every update -C: |
| 1461 |
$ hg update --clean |
| 1462 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1463 |
$ cat sub2/large7.orig |
| 1464 |
mistake |
| 1465 |
$ rm sub2/large7.orig |
| 1466 |
|
| 1467 |
Now "update check" is happy. |
| 1468 |
$ hg update --check 8 |
| 1469 |
getting changed largefiles |
| 1470 |
1 largefiles updated, 0 removed |
| 1471 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1472 |
$ hg update --check |
| 1473 |
getting changed largefiles |
| 1474 |
1 largefiles updated, 0 removed |
| 1475 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1476 |
|
| 1477 |
Test removing empty largefiles directories on update |
| 1478 |
$ test -d sub2 && echo "sub2 exists" |
| 1479 |
sub2 exists |
| 1480 |
$ hg update -q null |
| 1481 |
$ test -d sub2 && echo "error: sub2 should not exist anymore" |
| 1482 |
[1] |
| 1483 |
$ hg update -q |
| 1484 |
|
| 1485 |
Test hg remove removes empty largefiles directories |
| 1486 |
$ test -d sub2 && echo "sub2 exists" |
| 1487 |
sub2 exists |
| 1488 |
$ hg remove sub2/* |
| 1489 |
$ test -d sub2 && echo "error: sub2 should not exist anymore" |
| 1490 |
[1] |
| 1491 |
$ hg revert sub2/large6 sub2/large7 |
| 1492 |
|
| 1493 |
"revert" works on largefiles (and normal files too). |
| 1494 |
$ echo hack3 >> normal3 |
| 1495 |
$ echo hack4 >> sub/normal4 |
| 1496 |
$ echo hack4 >> sub/large4 |
| 1497 |
$ rm sub2/large6 |
| 1498 |
$ hg revert sub2/large6 |
| 1499 |
$ hg rm sub2/large6 |
| 1500 |
$ echo new >> sub2/large8 |
| 1501 |
$ hg add --large sub2/large8 |
| 1502 |
# XXX we don't really want to report that we're reverting the standin; |
| 1503 |
# that's just an implementation detail. But I don't see an obvious fix. ;-( |
| 1504 |
$ hg revert sub |
| 1505 |
reverting .hglf/sub/large4 |
| 1506 |
reverting sub/normal4 |
| 1507 |
$ hg status |
| 1508 |
M normal3 |
| 1509 |
A sub2/large8 |
| 1510 |
R sub2/large6 |
| 1511 |
? sub/large4.orig |
| 1512 |
? sub/normal4.orig |
| 1513 |
$ cat sub/normal4 |
| 1514 |
normal4-modified |
| 1515 |
$ cat sub/large4 |
| 1516 |
large4-modified |
| 1517 |
$ hg revert -a --no-backup |
| 1518 |
forgetting .hglf/sub2/large8 |
| 1519 |
reverting normal3 |
| 1520 |
undeleting .hglf/sub2/large6 |
| 1521 |
$ hg status |
| 1522 |
? sub/large4.orig |
| 1523 |
? sub/normal4.orig |
| 1524 |
? sub2/large8 |
| 1525 |
$ cat normal3 |
| 1526 |
normal3-modified |
| 1527 |
$ cat sub2/large6 |
| 1528 |
large6-modified |
| 1529 |
$ rm sub/*.orig sub2/large8 |
| 1530 |
|
| 1531 |
revert some files to an older revision |
| 1532 |
$ hg revert --no-backup -r 8 sub2 |
| 1533 |
reverting .hglf/sub2/large6 |
| 1534 |
$ cat sub2/large6 |
| 1535 |
large6 |
| 1536 |
$ hg revert --no-backup -C -r '.^' sub2 |
| 1537 |
$ hg revert --no-backup sub2 |
| 1538 |
reverting .hglf/sub2/large6 |
| 1539 |
$ hg status |
| 1540 |
|
| 1541 |
"verify --large" actually verifies largefiles |
| 1542 |
|
| 1543 |
- Where Do We Come From? What Are We? Where Are We Going? |
| 1544 |
$ pwd |
| 1545 |
$TESTTMP/e |
| 1546 |
$ hg paths |
| 1547 |
default = $TESTTMP/d |
| 1548 |
|
| 1549 |
$ hg verify --large |
| 1550 |
checking changesets |
| 1551 |
checking manifests |
| 1552 |
crosschecking files in changesets and manifests |
| 1553 |
checking files |
| 1554 |
checking dirstate |
| 1555 |
checked 10 changesets with 28 changes to 10 files |
| 1556 |
searching 1 changesets for largefiles |
| 1557 |
verified existence of 3 revisions of 3 largefiles |
| 1558 |
|
| 1559 |
- introduce missing blob in local store repo and remote store |
| 1560 |
and make sure that this is caught: |
| 1561 |
|
| 1562 |
$ mv $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 . |
| 1563 |
$ rm .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 |
| 1564 |
$ hg verify --large -q |
| 1565 |
changeset 9:598410d3eb9a: sub/large4 references missing $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 |
| 1566 |
[1] |
| 1567 |
|
| 1568 |
- introduce corruption and make sure that it is caught when checking content: |
| 1569 |
$ echo '5 cents' > $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 |
| 1570 |
$ hg verify -q --large --lfc |
| 1571 |
changeset 9:598410d3eb9a: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 |
| 1572 |
[1] |
| 1573 |
|
| 1574 |
- cleanup |
| 1575 |
$ cp e166e74c7303192238d60af5a9c4ce9bef0b7928 $TESTTMP/d/.hg/largefiles/ |
| 1576 |
$ mv e166e74c7303192238d60af5a9c4ce9bef0b7928 .hg/largefiles/ |
| 1577 |
|
| 1578 |
- verifying all revisions will fail because we didn't clone all largefiles to d: |
| 1579 |
$ echo 'T-shirt' > $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
| 1580 |
$ hg verify -q --lfa --lfc |
| 1581 |
changeset 0:30d30fe6a5be: large1 references missing $TESTTMP/d/.hg/largefiles/4669e532d5b2c093a78eca010077e708a071bb64 |
| 1582 |
changeset 0:30d30fe6a5be: sub/large2 references missing $TESTTMP/d/.hg/largefiles/1deebade43c8c498a3c8daddac0244dc55d1331d |
| 1583 |
changeset 1:ce8896473775: large1 references missing $TESTTMP/d/.hg/largefiles/5f78770c0e77ba4287ad6ef3071c9bf9c379742f |
| 1584 |
changeset 1:ce8896473775: sub/large2 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
| 1585 |
changeset 3:9e8fbc4bce62: large1 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
| 1586 |
changeset 4:74c02385b94c: large3 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
| 1587 |
changeset 4:74c02385b94c: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
| 1588 |
changeset 5:9d5af5072dbd: large3 references missing $TESTTMP/d/.hg/largefiles/baaf12afde9d8d67f25dab6dced0d2bf77dba47c |
| 1589 |
changeset 5:9d5af5072dbd: sub/large4 references missing $TESTTMP/d/.hg/largefiles/aeb2210d19f02886dde00dac279729a48471e2f9 |
| 1590 |
changeset 6:4355d653f84f: large3 references missing $TESTTMP/d/.hg/largefiles/7838695e10da2bb75ac1156565f40a2595fa2fa0 |
| 1591 |
[1] |
| 1592 |
|
| 1593 |
- cleanup |
| 1594 |
$ rm $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
| 1595 |
$ rm -f .hglf/sub/*.orig |
| 1596 |
|
| 1597 |
Update to revision with missing largefile - and make sure it really is missing |
| 1598 |
|
| 1599 |
$ rm ${USERCACHE}/7838695e10da2bb75ac1156565f40a2595fa2fa0 |
| 1600 |
$ hg up -r 6 |
| 1601 |
getting changed largefiles |
| 1602 |
large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob) |
| 1603 |
1 largefiles updated, 2 removed |
| 1604 |
4 files updated, 0 files merged, 2 files removed, 0 files unresolved |
| 1605 |
$ rm normal3 |
| 1606 |
$ echo >> sub/normal4 |
| 1607 |
$ hg ci -m 'commit with missing files' |
| 1608 |
Invoking status precommit hook |
| 1609 |
M sub/normal4 |
| 1610 |
! large3 |
| 1611 |
! normal3 |
| 1612 |
created new head |
| 1613 |
$ hg st |
| 1614 |
! large3 |
| 1615 |
! normal3 |
| 1616 |
$ hg up -r. |
| 1617 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1618 |
$ hg st |
| 1619 |
! large3 |
| 1620 |
! normal3 |
| 1621 |
$ hg up -Cr. |
| 1622 |
getting changed largefiles |
| 1623 |
large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob) |
| 1624 |
0 largefiles updated, 0 removed |
| 1625 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1626 |
$ hg st |
| 1627 |
! large3 |
| 1628 |
$ hg rollback |
| 1629 |
repository tip rolled back to revision 9 (undo commit) |
| 1630 |
working directory now based on revision 6 |
| 1631 |
|
| 1632 |
Merge with revision with missing largefile - and make sure it tries to fetch it. |
| 1633 |
|
| 1634 |
$ hg up -Cqr null |
| 1635 |
$ echo f > f |
| 1636 |
$ hg ci -Am branch |
| 1637 |
adding f |
| 1638 |
Invoking status precommit hook |
| 1639 |
A f |
| 1640 |
created new head |
| 1641 |
$ hg merge -r 6 |
| 1642 |
getting changed largefiles |
| 1643 |
large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob) |
| 1644 |
1 largefiles updated, 0 removed |
| 1645 |
4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1646 |
(branch merge, don't forget to commit) |
| 1647 |
|
| 1648 |
$ hg rollback -q |
| 1649 |
$ hg up -Cq |
| 1650 |
|
| 1651 |
Pulling 0 revisions with --all-largefiles should not fetch for all revisions |
| 1652 |
|
| 1653 |
$ hg pull --all-largefiles |
| 1654 |
pulling from $TESTTMP/d |
| 1655 |
searching for changes |
| 1656 |
no changes found |
| 1657 |
|
| 1658 |
Merging does not revert to old versions of largefiles and also check |
| 1659 |
that merging after having pulled from a non-default remote works |
| 1660 |
correctly. |
| 1661 |
|
| 1662 |
$ cd .. |
| 1663 |
$ hg clone -r 7 e temp |
| 1664 |
adding changesets |
| 1665 |
adding manifests |
| 1666 |
adding file changes |
| 1667 |
added 8 changesets with 24 changes to 10 files |
| 1668 |
new changesets 30d30fe6a5be:daea875e9014 (8 drafts) |
| 1669 |
updating to branch default |
| 1670 |
getting changed largefiles |
| 1671 |
3 largefiles updated, 0 removed |
| 1672 |
5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1673 |
$ hg clone temp f |
| 1674 |
updating to branch default |
| 1675 |
getting changed largefiles |
| 1676 |
3 largefiles updated, 0 removed |
| 1677 |
5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1678 |
# Delete the largefiles in the largefiles system cache so that we have an |
| 1679 |
# opportunity to test that caching after a pull works. |
| 1680 |
$ rm "${USERCACHE}"/* |
| 1681 |
$ cd f |
| 1682 |
$ echo "large4-merge-test" > sub/large4 |
| 1683 |
$ hg commit -m "Modify large4 to test merge" |
| 1684 |
Invoking status precommit hook |
| 1685 |
M sub/large4 |
| 1686 |
# Test --cache-largefiles flag |
| 1687 |
$ hg pull --lfrev 'heads(pulled())' ../e |
| 1688 |
pulling from ../e |
| 1689 |
searching for changes |
| 1690 |
adding changesets |
| 1691 |
adding manifests |
| 1692 |
adding file changes |
| 1693 |
added 2 changesets with 4 changes to 4 files (+1 heads) |
| 1694 |
new changesets a381d2c8c80e:598410d3eb9a (2 drafts) |
| 1695 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 1696 |
2 largefiles cached |
| 1697 |
$ hg merge |
| 1698 |
largefile sub/large4 has a merge conflict |
| 1699 |
ancestor was 971fb41e78fea4f8e0ba5244784239371cb00591 |
| 1700 |
you can keep (l)ocal d846f26643bfa8ec210be40cc93cc6b7ff1128ea or take (o)ther e166e74c7303192238d60af5a9c4ce9bef0b7928. |
| 1701 |
what do you want to do? l |
| 1702 |
getting changed largefiles |
| 1703 |
1 largefiles updated, 0 removed |
| 1704 |
3 files updated, 1 files merged, 0 files removed, 0 files unresolved |
| 1705 |
(branch merge, don't forget to commit) |
| 1706 |
$ hg commit -m "Merge repos e and f" |
| 1707 |
Invoking status precommit hook |
| 1708 |
M normal3 |
| 1709 |
M sub/normal4 |
| 1710 |
M sub2/large6 |
| 1711 |
$ cat normal3 |
| 1712 |
normal3-modified |
| 1713 |
$ cat sub/normal4 |
| 1714 |
normal4-modified |
| 1715 |
$ cat sub/large4 |
| 1716 |
large4-merge-test |
| 1717 |
$ cat sub2/large6 |
| 1718 |
large6-modified |
| 1719 |
$ cat sub2/large7 |
| 1720 |
large7 |
| 1721 |
|
| 1722 |
Test status after merging with a branch that introduces a new largefile: |
| 1723 |
|
| 1724 |
$ echo large > large |
| 1725 |
$ hg add --large large |
| 1726 |
$ hg commit -m 'add largefile' |
| 1727 |
Invoking status precommit hook |
| 1728 |
A large |
| 1729 |
$ hg update -q ".^" |
| 1730 |
$ echo change >> normal3 |
| 1731 |
$ hg commit -m 'some change' |
| 1732 |
Invoking status precommit hook |
| 1733 |
M normal3 |
| 1734 |
created new head |
| 1735 |
$ hg merge |
| 1736 |
getting changed largefiles |
| 1737 |
1 largefiles updated, 0 removed |
| 1738 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1739 |
(branch merge, don't forget to commit) |
| 1740 |
$ hg status |
| 1741 |
M large |
| 1742 |
|
| 1743 |
- make sure update of merge with removed largefiles fails as expected |
| 1744 |
$ hg rm sub2/large6 |
| 1745 |
$ hg up -r. |
| 1746 |
abort: outstanding uncommitted merge |
| 1747 |
[20] |
| 1748 |
|
| 1749 |
- revert should be able to revert files introduced in a pending merge |
| 1750 |
$ hg revert --all -r . |
| 1751 |
removing .hglf/large |
| 1752 |
undeleting .hglf/sub2/large6 |
| 1753 |
|
| 1754 |
Test that a normal file and a largefile with the same name and path cannot |
| 1755 |
coexist. |
| 1756 |
|
| 1757 |
$ rm sub2/large7 |
| 1758 |
$ echo "largeasnormal" > sub2/large7 |
| 1759 |
$ hg add sub2/large7 |
| 1760 |
sub2/large7 already a largefile |
| 1761 |
|
| 1762 |
Test that transplanting a largefile change works correctly. |
| 1763 |
|
| 1764 |
$ cd .. |
| 1765 |
$ hg clone -r 8 d g |
| 1766 |
adding changesets |
| 1767 |
adding manifests |
| 1768 |
adding file changes |
| 1769 |
added 9 changesets with 26 changes to 10 files |
| 1770 |
new changesets 30d30fe6a5be:a381d2c8c80e (9 drafts) |
| 1771 |
updating to branch default |
| 1772 |
getting changed largefiles |
| 1773 |
3 largefiles updated, 0 removed |
| 1774 |
5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1775 |
$ cd g |
| 1776 |
$ hg transplant -s ../d 598410d3eb9a |
| 1777 |
searching for changes |
| 1778 |
searching for changes |
| 1779 |
adding changesets |
| 1780 |
adding manifests |
| 1781 |
adding file changes |
| 1782 |
added 1 changesets with 2 changes to 2 files |
| 1783 |
new changesets 598410d3eb9a (1 drafts) |
| 1784 |
$ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
| 1785 |
9:598410d3eb9a modify normal file largefile in repo d |
| 1786 |
8:a381d2c8c80e modify normal file and largefile in repo b |
| 1787 |
7:daea875e9014 add/edit more largefiles |
| 1788 |
6:4355d653f84f edit files yet again |
| 1789 |
5:9d5af5072dbd edit files again |
| 1790 |
4:74c02385b94c move files |
| 1791 |
3:9e8fbc4bce62 copy files |
| 1792 |
2:51a0ae4d5864 remove files |
| 1793 |
1:ce8896473775 edit files |
| 1794 |
0:30d30fe6a5be add files |
| 1795 |
$ cat normal3 |
| 1796 |
normal3-modified |
| 1797 |
$ cat sub/normal4 |
| 1798 |
normal4-modified |
| 1799 |
$ cat sub/large4 |
| 1800 |
large4-modified |
| 1801 |
$ cat sub2/large6 |
| 1802 |
large6-modified |
| 1803 |
$ cat sub2/large7 |
| 1804 |
large7 |
| 1805 |
|
| 1806 |
Cat a largefile |
| 1807 |
$ hg cat normal3 |
| 1808 |
normal3-modified |
| 1809 |
$ hg cat sub/large4 |
| 1810 |
large4-modified |
| 1811 |
$ rm "${USERCACHE}"/* |
| 1812 |
$ hg cat -r a381d2c8c80e -o cat.out sub/large4 |
| 1813 |
$ cat cat.out |
| 1814 |
large4-modified |
| 1815 |
$ rm cat.out |
| 1816 |
$ hg cat -r a381d2c8c80e normal3 |
| 1817 |
normal3-modified |
| 1818 |
$ hg cat -r '.^' normal3 |
| 1819 |
normal3-modified |
| 1820 |
$ hg cat -r '.^' sub/large4 doesntexist |
| 1821 |
large4-modified |
| 1822 |
doesntexist: no such file in rev a381d2c8c80e |
| 1823 |
$ hg --cwd sub cat -r '.^' large4 |
| 1824 |
large4-modified |
| 1825 |
$ hg --cwd sub cat -r '.^' ../normal3 |
| 1826 |
normal3-modified |
| 1827 |
Cat a standin |
| 1828 |
$ hg cat .hglf/sub/large4 |
| 1829 |
e166e74c7303192238d60af5a9c4ce9bef0b7928 |
| 1830 |
$ hg cat .hglf/normal3 |
| 1831 |
.hglf/normal3: no such file in rev 598410d3eb9a |
| 1832 |
[1] |
| 1833 |
|
| 1834 |
Test that renaming a largefile results in correct output for status |
| 1835 |
|
| 1836 |
$ hg rename sub/large4 large4-renamed |
| 1837 |
$ hg commit -m "test rename output" |
| 1838 |
Invoking status precommit hook |
| 1839 |
A large4-renamed |
| 1840 |
R sub/large4 |
| 1841 |
$ cat large4-renamed |
| 1842 |
large4-modified |
| 1843 |
$ cd sub2 |
| 1844 |
$ hg rename large6 large6-renamed |
| 1845 |
$ hg st |
| 1846 |
A sub2/large6-renamed |
| 1847 |
R sub2/large6 |
| 1848 |
$ cd .. |
| 1849 |
|
| 1850 |
Test --normal flag |
| 1851 |
|
| 1852 |
$ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null |
| 1853 |
$ hg add --normal --large new-largefile |
| 1854 |
abort: --normal cannot be used with --large |
| 1855 |
[255] |
| 1856 |
$ hg add --normal new-largefile |
| 1857 |
new-largefile: up to 69 MB of RAM may be required to manage this file |
| 1858 |
(use 'hg revert new-largefile' to cancel the pending addition) |
| 1859 |
$ hg revert new-largefile |
| 1860 |
$ hg --config ui.large-file-limit=22M add --normal new-largefile |
| 1861 |
|
| 1862 |
Test explicit commit of switch between normal and largefile - make sure both |
| 1863 |
the add and the remove is committed. |
| 1864 |
|
| 1865 |
$ hg up -qC |
| 1866 |
$ hg forget normal3 large4-renamed |
| 1867 |
$ hg add --large normal3 |
| 1868 |
$ hg add large4-renamed |
| 1869 |
$ hg commit -m 'swap' normal3 large4-renamed |
| 1870 |
Invoking status precommit hook |
| 1871 |
A large4-renamed |
| 1872 |
A normal3 |
| 1873 |
? new-largefile |
| 1874 |
? sub2/large6-renamed |
| 1875 |
$ hg mani |
| 1876 |
.hglf/normal3 |
| 1877 |
.hglf/sub2/large6 |
| 1878 |
.hglf/sub2/large7 |
| 1879 |
large4-renamed |
| 1880 |
sub/normal4 |
| 1881 |
|
| 1882 |
$ cd .. |
| 1883 |
|
| 1884 |
|
| 1885 |
|