##// END OF EJS Templates
test: enable sparse-revlog for test-remotefilelog-clone.t...
Boris Feld -
r40938:2fd79046 default
parent child Browse files
Show More
@@ -1,112 +1,121 b''
1 TRANSITIONAL CONFIG
2 $ cat << EOF >> $HGRCPATH
3 > [format]
4 > sparse-revlog = yes
5 > EOF
6
1 7 #require no-windows
2 8
3 9 $ . "$TESTDIR/remotefilelog-library.sh"
4 10
5 11 $ hg init master
6 12 $ cd master
7 13 $ cat >> .hg/hgrc <<EOF
8 14 > [remotefilelog]
9 15 > server=True
10 16 > EOF
11 17 $ echo x > x
12 18 $ hg commit -qAm x
13 19
14 20 $ cd ..
15 21
16 22 # shallow clone from full
17 23
18 24 $ hgcloneshallow ssh://user@dummy/master shallow --noupdate
19 25 streaming all changes
20 26 2 files to transfer, 227 bytes of data
21 27 transferred 227 bytes in * seconds (*/sec) (glob)
22 28 searching for changes
23 29 no changes found
24 30 $ cd shallow
25 31 $ cat .hg/requires
26 32 dotencode
27 33 exp-remotefilelog-repo-req-1
28 34 fncache
29 35 generaldelta
30 36 revlogv1
37 sparserevlog
31 38 store
32 39
33 40 $ hg update
34 41 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
35 42 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
36 43
37 44 $ cat x
38 45 x
39 46
40 47 $ ls .hg/store/data
41 48 $ echo foo > f
42 49 $ hg add f
43 50 $ hg ci -m 'local content'
44 51 $ ls .hg/store/data
45 52 4a0a19218e082a343a1b17e5333409af9d98f0f5
46 53
47 54 $ cd ..
48 55
49 56 # shallow clone from shallow
50 57
51 58 $ hgcloneshallow ssh://user@dummy/shallow shallow2 --noupdate
52 59 streaming all changes
53 60 3 files to transfer, 564 bytes of data
54 61 transferred 564 bytes in * seconds (*/sec) (glob)
55 62 searching for changes
56 63 no changes found
57 64 $ cd shallow2
58 65 $ cat .hg/requires
59 66 dotencode
60 67 exp-remotefilelog-repo-req-1
61 68 fncache
62 69 generaldelta
63 70 revlogv1
71 sparserevlog
64 72 store
65 73 $ ls .hg/store/data
66 74 4a0a19218e082a343a1b17e5333409af9d98f0f5
67 75
68 76 $ hg update
69 77 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
70 78
71 79 $ cat x
72 80 x
73 81
74 82 $ cd ..
75 83
76 84 # full clone from shallow
77 85
78 86 Note: the output to STDERR comes from a different process to the output on
79 87 STDOUT and their relative ordering is not deterministic. As a result, the test
80 88 was failing sporadically. To avoid this, we capture STDERR to a file and
81 89 check its contents separately.
82 90
83 91 $ TEMP_STDERR=full-clone-from-shallow.stderr.tmp
84 92 $ hg clone --noupdate ssh://user@dummy/shallow full 2>$TEMP_STDERR
85 93 streaming all changes
86 94 remote: abort: Cannot clone from a shallow repo to a full repo.
87 95 [255]
88 96 $ cat $TEMP_STDERR
89 97 abort: pull failed on remote
90 98 $ rm $TEMP_STDERR
91 99
92 100 # getbundle full clone
93 101
94 102 $ printf '[server]\npreferuncompressed=False\n' >> master/.hg/hgrc
95 103 $ hgcloneshallow ssh://user@dummy/master shallow3
96 104 requesting all changes
97 105 adding changesets
98 106 adding manifests
99 107 adding file changes
100 108 added 1 changesets with 0 changes to 0 files
101 109 new changesets b292c1e3311f
102 110 updating to branch default
103 111 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
104 112
105 113 $ ls shallow3/.hg/store/data
106 114 $ cat shallow3/.hg/requires
107 115 dotencode
108 116 exp-remotefilelog-repo-req-1
109 117 fncache
110 118 generaldelta
111 119 revlogv1
120 sparserevlog
112 121 store
General Comments 0
You need to be logged in to leave comments. Login now