largefiles: test coverage of explicit commit of normal/largefile switch stable
authorMads Kiilerich <madski@unity3d.com>
Wed, 21 Oct 2015 00:10:46 +0200
branchstable
changeset 26816 e82bce7ec843
parent 26815 b57e5bfaad7c
child 26817 b68797f244e4
largefiles: test coverage of explicit commit of normal/largefile switch This reveals that a switch from normal to largefile violates the normal largefile invariant and gives a manifest with both a normal and standin file in the repository, while a switch from largefile to normal gives nothing. Not good.
tests/test-largefiles.t
--- a/tests/test-largefiles.t	Tue Oct 20 16:00:02 2015 -0500
+++ b/tests/test-largefiles.t	Wed Oct 21 00:10:46 2015 +0200
@@ -1832,6 +1832,27 @@
   $ hg add --normal new-largefile
   new-largefile: up to 69 MB of RAM may be required to manage this file
   (use 'hg revert new-largefile' to cancel the pending addition)
+
+Test explicit commit of switch between normal and largefile - make sure both
+the add and the remove is committed.
+
+  $ hg up -qC
+  $ hg forget normal3 large4-renamed
+  $ hg add --large normal3
+  $ hg add large4-renamed
+  $ hg commit -m 'swap' normal3 large4-renamed
+  Invoking status precommit hook
+  A large4-renamed
+  A normal3
+  ? new-largefile
+  ? sub2/large6-renamed
+  $ hg mani
+  .hglf/normal3
+  .hglf/sub2/large6
+  .hglf/sub2/large7
+  normal3
+  sub/normal4
+
   $ cd ..