comparison tests/test-largefiles-update.t @ 23187:f726b05ecfe6

largefiles: update standins only at the 1st commit of "hg rebase --continue" Before this patch, "hg rebase --continue" may record incorrect standins, because largefiles extension always avoid updating standins while rebasing, even though largefiles in the working directory may be modified manually at the 1st commit of "hg rebase --continue". But, on the other hand, updating standins should be avoided at subsequent commits for efficiency reason. To update standins only at the 1st commit of "hg rebase --continue", this patch introduces state-full callable object "automatedcommithook", which updates standins by "lfutil.updatestandinsbymatch()" only at the 1st commit of resuming. Even after this patch, "repo._isrebasing = True" is still needed to avoid some status report while updating largefiles in "lfcommands.updatelfiles()". This is reason why this patch omits not "repo._isrebasing = True" in "overriderebase" but examination of "getattr(repo, "_isrebasing", False)" in "updatestandinsbymatch".
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Wed, 05 Nov 2014 23:24:47 +0900
parents 24600c9d7f4e
children 0ec2e124fcc0
comparison
equal deleted inserted replaced
23186:6de61d0b773f 23187:f726b05ecfe6
507 $ cat .hglf/large1 507 $ cat .hglf/large1
508 58e24f733a964da346e2407a2bee99d9001184f5 508 58e24f733a964da346e2407a2bee99d9001184f5
509 $ cat large1 509 $ cat large1
510 large1 in #1 510 large1 in #1
511 511
512 $ hg rebase -q --abort 512 Test that rebase updates standins for manually modified largefiles at
513 rebase aborted 513 the 1st commit of resuming.
514
515 $ echo "manually modified before 'hg rebase --continue'" > large1
516 $ hg resolve -m normal1
517 (no more unresolved files)
518 $ hg rebase --continue --config ui.interactive=True <<EOF
519 > c
520 > EOF
521 local changed .hglf/large1 which remote deleted
522 use (c)hanged version or (d)elete? c
523
524 $ hg diff -c "tip~1" --nodates .hglf/large1 | grep '^[+-][0-9a-z]'
525 -e5bb990443d6a92aaf7223813720f7566c9dd05b
526 +8a4f783556e7dea21139ca0466eafce954c75c13
527 $ rm -f large1
528 $ hg update -q -C tip
529 $ cat large1
530 manually modified before 'hg rebase --continue'
514 531
515 Test that transplant updates largefiles, of which standins are safely 532 Test that transplant updates largefiles, of which standins are safely
516 changed, even if it is aborted by conflict of other. 533 changed, even if it is aborted by conflict of other.
517 534
518 $ hg update -q -C 5 535 $ hg update -q -C 5