Patchwork [3,of,3] test-lfs: add tests to show that hashes remain unchanged by conversions

login
register
mail settings
Submitter Matt Harbison
Date Jan. 14, 2018, 4:26 a.m.
Message ID <3f5167faeb5d1f28939e.1515903963@Envy>
Download mbox | patch
Permalink /patch/26727/
State Accepted
Headers show

Comments

Matt Harbison - Jan. 14, 2018, 4:26 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1515901233 18000
#      Sat Jan 13 22:40:33 2018 -0500
# Node ID 3f5167faeb5d1f28939eaf2c2825bb65f67a2458
# Parent  b4b8915f07f1f9059fead8198fc746ed19ba6519
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.

Patch

diff --git a/tests/test-lfs.t b/tests/test-lfs.t
--- a/tests/test-lfs.t
+++ b/tests/test-lfs.t
@@ -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 \