##// END OF EJS Templates
largefiles: test coverage of fatal interruption of update...
Mads Kiilerich -
r30189:4999c12c stable
parent child Browse files
Show More
@@ -144,6 +144,7 b' Test that "hg merge" updates largefiles '
144 large1 in #1
144 large1 in #1
145 $ cat .hglf/large1
145 $ cat .hglf/large1
146 58e24f733a964da346e2407a2bee99d9001184f5
146 58e24f733a964da346e2407a2bee99d9001184f5
147 $ rm normal1.orig
147
148
148 (merge non-existing largefiles from "other" via conflict prompt -
149 (merge non-existing largefiles from "other" via conflict prompt -
149 make sure the following commit doesn't abort in a confusing way when trying to
150 make sure the following commit doesn't abort in a confusing way when trying to
@@ -243,6 +244,7 b' Test that "hg rollback" restores status '
243 ? largeY
244 ? largeY
244 $ test -f .hglf/largeY
245 $ test -f .hglf/largeY
245 [1]
246 [1]
247 $ rm largeY
246
248
247 Test that "hg rollback" restores standins correctly
249 Test that "hg rollback" restores standins correctly
248
250
@@ -285,6 +287,7 b' is not branch-tip)'
285 58e24f733a964da346e2407a2bee99d9001184f5
287 58e24f733a964da346e2407a2bee99d9001184f5
286 $ cat .hglf/large2
288 $ cat .hglf/large2
287 1deebade43c8c498a3c8daddac0244dc55d1331d
289 1deebade43c8c498a3c8daddac0244dc55d1331d
290 $ rm normalX
288
291
289 Test that "hg status" shows status of largefiles correctly just after
292 Test that "hg status" shows status of largefiles correctly just after
290 automated commit like rebase/transplant
293 automated commit like rebase/transplant
@@ -598,6 +601,7 b' it is aborted by conflict.'
598 58e24f733a964da346e2407a2bee99d9001184f5
601 58e24f733a964da346e2407a2bee99d9001184f5
599 $ cat large1
602 $ cat large1
600 large1 in #1
603 large1 in #1
604 $ rm normal1.orig
601
605
602 Test that rebase updates standins for manually modified largefiles at
606 Test that rebase updates standins for manually modified largefiles at
603 the 1st commit of resuming.
607 the 1st commit of resuming.
@@ -728,6 +732,48 b' bit correctly on the platform being unaw'
728
732
729 #endif
733 #endif
730
734
735 Test a fatal error interrupting an update. lfdirstate doesn't realize that
736 .hglf has been updated while the largefile hasn't. Status thus shows a clean
737 state ... but rebuilding lfdirstate and checking all hashes reveals it isn't
738 clean.
739
740 Start with clean dirstates:
741 $ hg up -qcr "8^"
742 $ sleep 1
743 $ hg st
744 Update standins without updating largefiles:
745 $ cat << EOF > ../crashupdatelfiles.py
746 > import hgext.largefiles.lfutil
747 > def getlfilestoupdate(oldstandins, newstandins):
748 > raise SystemExit(7)
749 > hgext.largefiles.lfutil.getlfilestoupdate = getlfilestoupdate
750 > EOF
751 $ hg up -Cr "8" --config extensions.crashupdatelfiles=../crashupdatelfiles.py
752 [7]
753 Check large1 content and status:
754 BUG: largeX is R and large1 is not M and update does nothing
755 $ cat large1
756 large1 in #3
757 $ hg st
758 R largeX
759 $ hg up -Cr .
760 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
761 $ hg st
762 R largeX
763 Force largefiles rehashing and check again - revealing modifications that
764 update now can remove:
765 $ rm .hg/largefiles/dirstate
766 $ hg st
767 M large1
768 ! largeX
769 $ hg up -Cr .
770 getting changed largefiles
771 2 largefiles updated, 0 removed
772 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
773 $ hg st
774 $ cat large1
775 manually modified before 'hg transplant --continue'
776
731 $ cd ..
777 $ cd ..
732
778
733 Test that "hg convert" avoids copying largefiles from the working
779 Test that "hg convert" avoids copying largefiles from the working
General Comments 0
You need to be logged in to leave comments. Login now