diff tests/test-hardlinks.t @ 47447:377d8fc20e34

clone: reuse the stream clone logic for local clone Streaming clone and local (non `--pull`) clone do mostly the same thing, however they were using different logic to do so. This means the logic frequently went out of sync and that new case had to be dealt with twice. This is fragile and anoying. So we replace this with a re-use of the logic we use for streaming clone. I can see various test changes: - a more precise progress output, - armless fncache loading during clone, - fncache is no longer hardlinked (since we write it by hand). I am not reinstalling the `reposimplestore` specific output, as far as I understand this variant have been broken for years. Differential Revision: https://phab.mercurial-scm.org/D10855
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 08 Jun 2021 02:06:45 +0200
parents 8be95673eb8a
children 7ee07e1a25c0
line wrap: on
line diff
--- a/tests/test-hardlinks.t	Wed Jun 09 15:33:58 2021 +0200
+++ b/tests/test-hardlinks.t	Tue Jun 08 02:06:45 2021 +0200
@@ -61,13 +61,13 @@
 Create hardlinked clone r2:
 
   $ hg clone -U --debug r1 r2 --config progress.debug=true
-  linking: 1 files
-  linking: 2 files
-  linking: 3 files
-  linking: 4 files
-  linking: 5 files
-  linking: 6 files
-  linking: 7 files
+  linking: 1/7 files (14.29%)
+  linking: 2/7 files (28.57%)
+  linking: 3/7 files (42.86%)
+  linking: 4/7 files (57.14%)
+  linking: 5/7 files (71.43%)
+  linking: 6/7 files (85.71%)
+  linking: 7/7 files (100.00%)
   linked 7 files
   updating the branch cache
 
@@ -91,7 +91,7 @@
   2 r1/.hg/store/00manifest.i
   2 r1/.hg/store/data/d1/f2.i
   2 r1/.hg/store/data/f1.i
-  2 r1/.hg/store/fncache (repofncache !)
+  1 r1/.hg/store/fncache (repofncache !)
   1 r1/.hg/store/phaseroots
   1 r1/.hg/store/undo
   1 r1/.hg/store/undo.backup.fncache (repofncache !)
@@ -103,7 +103,7 @@
   2 r2/.hg/store/00manifest.i
   2 r2/.hg/store/data/d1/f2.i
   2 r2/.hg/store/data/f1.i
-  2 r2/.hg/store/fncache (repofncache !)
+  1 r2/.hg/store/fncache (repofncache !)
 
 Repo r3 should not be hardlinked:
 
@@ -175,7 +175,7 @@
 
 #if hardlink-whitelisted repofncache
   $ nlinksdir r2/.hg/store/fncache
-  2 r2/.hg/store/fncache
+  1 r2/.hg/store/fncache
 #endif
 
   $ hg -R r2 verify
@@ -201,11 +201,11 @@
   1 r2/.hg/store/00manifest.i
   1 r2/.hg/store/data/d1/f2.i
   1 r2/.hg/store/data/f1.i
-  [12] r2/\.hg/store/fncache (re) (repofncache !)
+  1 r2/.hg/store/fncache (repofncache !)
 
 #if hardlink-whitelisted repofncache
   $ nlinksdir r2/.hg/store/fncache
-  2 r2/.hg/store/fncache
+  1 r2/.hg/store/fncache
 #endif
 
 Create a file which exec permissions we will change