test: enable generaldelta early in 'test-treemanifest.t'
authorPierre-Yves David <pierre-yves.david@fb.com>
Mon, 19 Oct 2015 11:28:31 +0200
changeset 28115 4d1a96bb831fc90aa34be60500011ee8bc8db02f
parent 28114 aa23e02f94150352b1d6a960b693d4c32d5c92f7
child 28116 b11495c2a7e25906dc39233342ad448a3910da7b
push id53
push usergszorc@mozilla.com
push dateSat, 14 Nov 2015 00:02:55 +0000
test: enable generaldelta early in 'test-treemanifest.t' Having generaldelta on results in minor test output changes (as we are staring at the revlog).
tests/test-treemanifest.t
--- a/tests/test-treemanifest.t
+++ b/tests/test-treemanifest.t
@@ -1,8 +1,12 @@
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > usegeneraldelta=yes
+  > EOF
 
 Set up repo
 
   $ hg --config experimental.treemanifest=True init repo
   $ cd repo
 
 Requirements get set on init
 
@@ -113,23 +117,23 @@ Merge creates 2-parent revision of direc
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   $ hg ci -m 'conflict-free merge involving dir1/'
   $ cat dir1/a
   5
   $ cat dir1/b
   6
   $ hg debugindex --dir dir1
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0      54      0       1 8b3ffd73f901 000000000000 000000000000
+     rev    offset  length  delta linkrev nodeid       p1           p2
+       0         0      54     -1       1 8b3ffd73f901 000000000000 000000000000
        1        54      68      0       2 b66d046c644f 8b3ffd73f901 000000000000
-       2       122      12      0       4 b87265673c8a b66d046c644f 000000000000
-       3       134      95      0       5 aa5d3adcec72 b66d046c644f 000000000000
-       4       229      81      0       6 e29b066b91ad b66d046c644f 000000000000
-       5       310     107      5       7 a120ce2b83f5 e29b066b91ad aa5d3adcec72
+       2       122      12      1       4 b87265673c8a b66d046c644f 000000000000
+       3       134      55      1       5 aa5d3adcec72 b66d046c644f 000000000000
+       4       189      55      1       6 e29b066b91ad b66d046c644f 000000000000
+       5       244      55      4       7 a120ce2b83f5 e29b066b91ad aa5d3adcec72
 
 Merge keeping directory from parent 1 does not create revlog entry. (Note that
 dir1's manifest does change, but only because dir1/a's filelog changes.)
 
   $ hg co 'desc("add dir2")'
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ echo 8 > dir2/a
   $ hg ci -m 'modify dir2/a'
@@ -245,46 +249,46 @@ Merge of two trees
   (branch merge, don't forget to commit)
   $ hg ci -m 'merge of flat manifests to new tree manifest'
   created new head
   $ hg diff -r 3
 
 Parent of tree root manifest should be flat manifest, and two for merge
 
   $ hg debugindex -m
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0      80      0       0 40536115ed9e 000000000000 000000000000
+     rev    offset  length  delta linkrev nodeid       p1           p2
+       0         0      80     -1       0 40536115ed9e 000000000000 000000000000
        1        80      83      0       1 f3376063c255 40536115ed9e 000000000000
-       2       163     103      0       2 5d9b9da231a2 40536115ed9e 000000000000
-       3       266      83      0       3 d17d663cbd8a 5d9b9da231a2 f3376063c255
-       4       349     132      4       4 c05a51345f86 f3376063c255 000000000000
-       5       481     110      4       5 82594b1f557d 5d9b9da231a2 f3376063c255
+       2       163      89      0       2 5d9b9da231a2 40536115ed9e 000000000000
+       3       252      83      2       3 d17d663cbd8a 5d9b9da231a2 f3376063c255
+       4       335     124      1       4 c05a51345f86 f3376063c255 000000000000
+       5       459     124      2       5 82594b1f557d 5d9b9da231a2 f3376063c255
 
 
 Status across flat/tree boundary should work
 
   $ hg status --rev '.^' --rev .
   M a
   M dir1/a
   M dir1/dir1/a
 
 
 Turning off treemanifest config has no effect
 
   $ hg debugindex .hg/store/meta/dir1/00manifest.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0     125      0       4 63c9c0557d24 000000000000 000000000000
-       1       125     109      0       5 23d12a1f6e0e 000000000000 000000000000
+     rev    offset  length  delta linkrev nodeid       p1           p2
+       0         0     125     -1       4 63c9c0557d24 000000000000 000000000000
+       1       125     131     -1       5 23d12a1f6e0e 000000000000 000000000000
   $ echo 2 > dir1/a
   $ hg --config experimental.treemanifest=False ci -qm 'modify dir1/a'
   $ hg debugindex .hg/store/meta/dir1/00manifest.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0     125      0       4 63c9c0557d24 000000000000 000000000000
-       1       125     109      0       5 23d12a1f6e0e 000000000000 000000000000
-       2       234      55      0       6 3cb2d87b4250 23d12a1f6e0e 000000000000
+     rev    offset  length  delta linkrev nodeid       p1           p2
+       0         0     125     -1       4 63c9c0557d24 000000000000 000000000000
+       1       125     131     -1       5 23d12a1f6e0e 000000000000 000000000000
+       2       256      55      1       6 3cb2d87b4250 23d12a1f6e0e 000000000000
 
 Create deeper repo with tree manifests.
 
   $ cd ..
   $ hg --config experimental.treemanifest=True init deeprepo
   $ cd deeprepo
 
   $ mkdir a