[PATCH 1 of 2 stable] largefiles: test coverage of explicit commit of normal/largefile switch
Mads Kiilerich
mads at kiilerich.com
Tue Oct 20 22:28:49 UTC 2015
# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1445379046 -7200
# Wed Oct 21 00:10:46 2015 +0200
# Branch stable
# Node ID e82bce7ec843eff37e917d072c7c333146bb573f
# Parent b57e5bfaad7ccc9d45884717115ba9a36d6b7b41
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.
diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t
--- a/tests/test-largefiles.t
+++ b/tests/test-largefiles.t
@@ -1832,6 +1832,27 @@ Test --normal flag
$ 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 ..
More information about the Mercurial-devel
mailing list