Commit 5ec1d27
remote: base: don't checkout existing file (#2358)
* remote: base: don't checkout existing file
* remote: _checkout_file: split to smaller methods
* state: local: verify if file needs checkout considering link type and access rights
* tests: checkout: test avoiding unnecessary copying
* efiop review refactor
* remote: local: refactor _needs_checkout NOTE
* remote: local: remove bool cast for `protected`, wrap linking in try
* test: checkout: test relinking upon existing cache
* stage: remove obsolete unprotecing from Stage.create
* test: checkout: refactor setting link type
* test: checkout: parametrize relinking test
* remote: local: don't remove cache test file on cache_copy test
* remote: base: remove force from _needs_checkout arguments
* Update dvc/remote/local/__init__.py
Co-Authored-By: Alexander Schepanovski <suor.web@gmail.com>
* suor review refactor
* remote: base: re-add note why do we unprotect on _checkout_file
* test: checkout: tests for relinking and resetting target protection
* remove checkout behavior change
* remove unused imports
* remote: base: reuse __checkout_file in __checkout_dir
* initial dir
* checkout: test: should relink on repeated add
* remote: cleanup commented lines
* remote: base/local: add save_link flag to _checkout_file
* remote: local: add allow_copy flag to unprotect method
* Update dvc/remote/local/__init__.py
Co-Authored-By: Ruslan Kuprieiev <kupruser@gmail.com>
* remote: local: remove unnecessary removal warning on _checkout_file
* remote: local: proper cache link type detection
* test: checkout: move repeated add tests
* Update dvc/remote/local/__init__.py
Co-Authored-By: Ruslan Kuprieiev <kupruser@gmail.com>
* remote: base: remove _needs_checkout
* Update dvc/remote/base.py
Co-Authored-By: Ruslan Kuprieiev <kupruser@gmail.com>
* remote: base: remove wrappers from _checkout_file1 parent 74bd7d5 commit 5ec1d27
3 files changed
+174
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
683 | | - | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
684 | 689 | | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
689 | 696 | | |
690 | 697 | | |
691 | | - | |
692 | | - | |
693 | | - | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
694 | 716 | | |
695 | 717 | | |
696 | 718 | | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
697 | 722 | | |
698 | 723 | | |
699 | 724 | | |
| |||
712 | 737 | | |
713 | 738 | | |
714 | 739 | | |
715 | | - | |
716 | 740 | | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
726 | 748 | | |
727 | 749 | | |
728 | 750 | | |
| |||
803 | 825 | | |
804 | 826 | | |
805 | 827 | | |
806 | | - | |
| 828 | + | |
807 | 829 | | |
808 | 830 | | |
809 | 831 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| 192 | + | |
191 | 193 | | |
192 | 194 | | |
193 | 195 | | |
| |||
471 | 473 | | |
472 | 474 | | |
473 | 475 | | |
474 | | - | |
| 476 | + | |
475 | 477 | | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
487 | 492 | | |
488 | 493 | | |
489 | 494 | | |
| |||
493 | 498 | | |
494 | 499 | | |
495 | 500 | | |
496 | | - | |
| 501 | + | |
497 | 502 | | |
498 | | - | |
| 503 | + | |
499 | 504 | | |
500 | | - | |
| 505 | + | |
501 | 506 | | |
502 | 507 | | |
503 | 508 | | |
504 | 509 | | |
505 | 510 | | |
506 | 511 | | |
507 | 512 | | |
508 | | - | |
| 513 | + | |
509 | 514 | | |
510 | | - | |
| 515 | + | |
511 | 516 | | |
512 | 517 | | |
513 | 518 | | |
| |||
581 | 586 | | |
582 | 587 | | |
583 | 588 | | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
0 commit comments