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