Patchwork [2,of,3] test: use a bigger manifest in general delta test

login
register
mail settings
Submitter Pierre-Yves David
Date Dec. 2, 2015, 5:32 p.m.
Message ID <49f5bfa7043ae0c79753.1449077569@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/11762/
State Accepted
Headers show

Comments

Pierre-Yves David - Dec. 2, 2015, 5:32 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1449022260 28800
#      Tue Dec 01 18:11:00 2015 -0800
# Node ID 49f5bfa7043ae0c797536dab93260aee92fcbaa8
# Parent  36b2104baffa3b37993de698e6957b830bbb42cc
# EXP-Topic generaldelta
# Available At http://hg.netv6.net/marmoute-wip/mercurial/
#              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r 49f5bfa7043a
test: use a bigger manifest in general delta test

The currently used manifest is too small and cannot sustain a chain length
above "1".  This make testing the 'lazybasedelta' behavior hard. So we add an
extra file in the manifest to help testing in the next changeset.

The semantic of existing tests have been checked and is not changed.

Patch

diff --git a/tests/test-generaldelta.t b/tests/test-generaldelta.t
--- a/tests/test-generaldelta.t
+++ b/tests/test-generaldelta.t
@@ -5,10 +5,11 @@  inserted due to big distance from its pa
 
   $ hg init repo --config format.generaldelta=no --config format.usegeneraldelta=no
   $ cd repo
   $ echo foo > foo
   $ echo bar > bar
+  $ echo baz > baz
   $ hg commit -q -Am boo
   $ hg clone --pull . ../gdrepo -q --config format.generaldelta=yes
   $ for r in 1 2 3; do
   >   echo $r > foo
   >   hg commit -q -m $r
@@ -80,39 +81,39 @@  delta coming from the server base delta 
   $ hg clone repo --pull --config format.usegeneraldelta=1 usegd
   requesting all changes
   adding changesets
   adding manifests
   adding file changes
-  added 4 changesets with 5 changes to 2 files (+2 heads)
+  added 4 changesets with 6 changes to 3 files (+2 heads)
   updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg clone repo --pull --config format.generaldelta=1 full
   requesting all changes
   adding changesets
   adding manifests
   adding file changes
-  added 4 changesets with 5 changes to 2 files (+2 heads)
+  added 4 changesets with 6 changes to 3 files (+2 heads)
   updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg -R repo debugindex -m
      rev    offset  length   base linkrev nodeid       p1           p2
-       0         0      77      0       0 0273e8a1b972 000000000000 000000000000
-       1        77      57      0       1 e0c49f5ef780 0273e8a1b972 000000000000
-       2       134      77      2       2 de950093e41b 0273e8a1b972 000000000000
-       3       211      57      2       3 db74c7cde4d0 0273e8a1b972 000000000000
+       0         0     104      0       0 cef96823c800 000000000000 000000000000
+       1       104      57      0       1 58ab9a8d541d cef96823c800 000000000000
+       2       161      57      0       2 134fdc6fd680 cef96823c800 000000000000
+       3       218     104      3       3 723508934dad cef96823c800 000000000000
   $ hg -R usegd debugindex -m
      rev    offset  length  delta linkrev nodeid       p1           p2
-       0         0      77     -1       0 0273e8a1b972 000000000000 000000000000
-       1        77      57      0       1 e0c49f5ef780 0273e8a1b972 000000000000
-       2       134      77     -1       2 de950093e41b 0273e8a1b972 000000000000
-       3       211      57      2       3 db74c7cde4d0 0273e8a1b972 000000000000
+       0         0     104     -1       0 cef96823c800 000000000000 000000000000
+       1       104      57      0       1 58ab9a8d541d cef96823c800 000000000000
+       2       161      57      1       2 134fdc6fd680 cef96823c800 000000000000
+       3       218     104     -1       3 723508934dad cef96823c800 000000000000
   $ hg -R full debugindex -m
      rev    offset  length  delta linkrev nodeid       p1           p2
-       0         0      77     -1       0 0273e8a1b972 000000000000 000000000000
-       1        77      57      0       1 e0c49f5ef780 0273e8a1b972 000000000000
-       2       134      57      0       2 de950093e41b 0273e8a1b972 000000000000
-       3       191      57      0       3 db74c7cde4d0 0273e8a1b972 000000000000
+       0         0     104     -1       0 cef96823c800 000000000000 000000000000
+       1       104      57      0       1 58ab9a8d541d cef96823c800 000000000000
+       2       161      57      0       2 134fdc6fd680 cef96823c800 000000000000
+       3       218      57      0       3 723508934dad cef96823c800 000000000000
 
 Test format.aggressivemergedeltas
 
   $ hg init --config format.generaldelta=1 aggressive
   $ cd aggressive