comparison tests/test-largefiles-update.t @ 30191:328545c7d8a1 stable

largefiles: fix 'deleted' files sometimes persistently appearing with R status A code snippet that has been around since largefiles was introduced was wrong: Standins no longer found in lfdirstate has *not* been removed - they have probably just been deleted ... or not created. This wrong reporting did that 'up -C' didn't undo the change and didn't sync the two dirstates. Instead of reporting such files as removed, propagate the deletion to the standin file and report the file as deleted.
author Mads Kiilerich <madski@unity3d.com>
date Mon, 17 Oct 2016 17:12:24 +0200
parents 56b930238036
children 438173c41587
comparison
equal deleted inserted replaced
30190:56b930238036 30191:328545c7d8a1
749 > hgext.largefiles.lfutil.getlfilestoupdate = getlfilestoupdate 749 > hgext.largefiles.lfutil.getlfilestoupdate = getlfilestoupdate
750 > EOF 750 > EOF
751 $ hg up -Cr "8" --config extensions.crashupdatelfiles=../crashupdatelfiles.py 751 $ hg up -Cr "8" --config extensions.crashupdatelfiles=../crashupdatelfiles.py
752 [7] 752 [7]
753 Check large1 content and status ... and that update will undo modifications: 753 Check large1 content and status ... and that update will undo modifications:
754 BUG: large is R
755 $ cat large1 754 $ cat large1
756 large1 in #3 755 large1 in #3
757 $ hg st 756 $ hg st
758 M large1 757 M large1
759 R largeX
760 $ hg up -Cr .
761 getting changed largefiles
762 1 largefiles updated, 0 removed
763 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
764 $ cat large1
765 manually modified before 'hg transplant --continue'
766 $ hg st
767 R largeX
768 Force largefiles rehashing and check again - which makes it realize that largeX
769 not has been removed but just doesn't exist:
770 $ rm .hg/largefiles/dirstate
771 $ hg st
772 ! largeX 758 ! largeX
773 $ hg up -Cr . 759 $ hg up -Cr .
774 getting changed largefiles 760 getting changed largefiles
775 1 largefiles updated, 0 removed 761 2 largefiles updated, 0 removed
776 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 762 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
763 $ cat large1
764 manually modified before 'hg transplant --continue'
765 $ hg st
766 Force largefiles rehashing and check that all changes have been caught by
767 status and update:
768 $ rm .hg/largefiles/dirstate
777 $ hg st 769 $ hg st
778 770
779 $ cd .. 771 $ cd ..
780 772
781 Test that "hg convert" avoids copying largefiles from the working 773 Test that "hg convert" avoids copying largefiles from the working