test-lfs: add tests to show that hashes remain unchanged by conversions
authorMatt Harbison <matt_harbison@yahoo.com>
Sat, 13 Jan 2018 22:40:33 -0500
changeset 35650 4568e98b5f45
parent 35649 1f0690bfc683
child 35651 15cfd343d3a9
test-lfs: add tests to show that hashes remain unchanged by conversions This is a very cool feature that we should document, but I'll punt that to the freeze. From what I can tell, git doesn't have this capability.
tests/test-lfs.t
--- a/tests/test-lfs.t	Sat Jan 13 22:29:18 2018 -0500
+++ b/tests/test-lfs.t	Sat Jan 13 22:40:33 2018 -0500
@@ -862,6 +862,21 @@
   $ grep 'lfs' convert_lfs/.hg/requires
   lfs
 
+The hashes in all stages of the conversion are unchanged.
+
+  $ hg -R repo8 log -T '{node|short}\n'
+  0fae949de7fa
+  9cd6bdffdac0
+  7f96794915f7
+  $ hg -R convert_normal log -T '{node|short}\n'
+  0fae949de7fa
+  9cd6bdffdac0
+  7f96794915f7
+  $ hg -R convert_lfs log -T '{node|short}\n'
+  0fae949de7fa
+  9cd6bdffdac0
+  7f96794915f7
+
 This convert is trickier, because it contains deleted files (via `hg mv`)
 
   $ hg --config extensions.convert= --config lfs.threshold=1000M \