changeset 47449:da3fb8c10caa

revlogv2: also test that local clone works This is now the case so lets add a test. Differential Revision: https://phab.mercurial-scm.org/D10857
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 08 Jun 2021 02:34:59 +0200
parents d370256636fe
children 9cecc222c536
files tests/test-revlog-v2.t
diffstat 1 files changed, 27 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-revlog-v2.t	Tue Jun 08 03:56:33 2021 +0200
+++ b/tests/test-revlog-v2.t	Tue Jun 08 02:34:59 2021 +0200
@@ -18,8 +18,8 @@
   > revlogv2 = enable-unstable-format-and-corrupt-my-data
   > EOF
 
-  $ hg init empty-repo
-  $ cd empty-repo
+  $ hg init new-repo
+  $ cd new-repo
   $ cat .hg/requires
   dotencode
   exp-dirstate-v2 (dirstate-v2 !)
@@ -94,3 +94,28 @@
   .hg/store/00manifest-43c37dde.dat
   .hg/store/00manifest-e2c9362a.sda
   .hg/store/00manifest.i
+
+Local clone works
+-----------------
+
+  $ hg clone . ../cloned-repo
+  updating to branch default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg tip | tee ../tip-new
+  changeset:   0:96ee1d7354c4
+  tag:         tip
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     initial
+  
+  $ hg tip -R ../cloned-repo | tee ../tip-cloned
+  changeset:   0:96ee1d7354c4
+  tag:         tip
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     initial
+  
+
+The two repository should be identical, this diff MUST be empty
+
+  $ cmp ../tip-new ../tip-cloned || diff -U8 ../tip-new ../tip-cloned