Show More
@@ -1,210 +1,211 | |||
|
1 | 1 | #require no-chg |
|
2 | 2 | |
|
3 | 3 | $ hg init repo |
|
4 | 4 | $ cd repo |
|
5 | 5 | $ echo foo > foo |
|
6 | 6 | $ hg ci -qAm 'add foo' |
|
7 | 7 | $ echo >> foo |
|
8 | 8 | $ hg ci -m 'change foo' |
|
9 | 9 | $ hg up -qC 0 |
|
10 | 10 | $ echo bar > bar |
|
11 | 11 | $ hg ci -qAm 'add bar' |
|
12 | 12 | |
|
13 | 13 | $ hg log |
|
14 | 14 | changeset: 2:effea6de0384 |
|
15 | 15 | tag: tip |
|
16 | 16 | parent: 0:bbd179dfa0a7 |
|
17 | 17 | user: test |
|
18 | 18 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
19 | 19 | summary: add bar |
|
20 | 20 | |
|
21 | 21 | changeset: 1:ed1b79f46b9a |
|
22 | 22 | user: test |
|
23 | 23 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
24 | 24 | summary: change foo |
|
25 | 25 | |
|
26 | 26 | changeset: 0:bbd179dfa0a7 |
|
27 | 27 | user: test |
|
28 | 28 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
29 | 29 | summary: add foo |
|
30 | 30 | |
|
31 | 31 | $ cd .. |
|
32 | 32 | |
|
33 | 33 | Test pullbundle functionality |
|
34 | 34 | |
|
35 | 35 | $ cd repo |
|
36 | 36 | $ cat <<EOF > .hg/hgrc |
|
37 | 37 | > [server] |
|
38 | 38 | > pullbundle = True |
|
39 | 39 | > [experimental] |
|
40 | 40 | > evolution = True |
|
41 | 41 | > [extensions] |
|
42 | 42 | > blackbox = |
|
43 | 43 | > EOF |
|
44 | 44 | $ hg bundle --base null -r 0 .hg/0.hg |
|
45 | 45 | 1 changesets found |
|
46 | 46 | $ hg bundle --base 0 -r 1 .hg/1.hg |
|
47 | 47 | 1 changesets found |
|
48 | 48 | $ hg bundle --base 1 -r 2 .hg/2.hg |
|
49 | 49 | 1 changesets found |
|
50 | 50 | $ cat <<EOF > .hg/pullbundles.manifest |
|
51 | 51 | > 2.hg BUNDLESPEC=none-v2 heads=effea6de0384e684f44435651cb7bd70b8735bd4 bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa |
|
52 | 52 | > 1.hg BUNDLESPEC=bzip2-v2 heads=ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa |
|
53 | 53 | > 0.hg BUNDLESPEC=gzip-v2 heads=bbd179dfa0a71671c253b3ae0aa1513b60d199fa |
|
54 | 54 | > EOF |
|
55 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid | |
|
55 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid -E ../error.txt | |
|
56 | 56 | listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) |
|
57 | 57 | $ cat ../repo.pid >> $DAEMON_PIDS |
|
58 | 58 | $ cd .. |
|
59 | 59 | $ hg clone -r 0 http://localhost:$HGPORT2/ repo.pullbundle |
|
60 | 60 | adding changesets |
|
61 | 61 | adding manifests |
|
62 | 62 | adding file changes |
|
63 | 63 | added 1 changesets with 1 changes to 1 files |
|
64 | 64 | new changesets bbd179dfa0a7 (1 drafts) |
|
65 | 65 | updating to branch default |
|
66 | 66 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
67 | $ cat error.txt | |
|
67 | 68 | $ cd repo.pullbundle |
|
68 | 69 | $ hg pull -r 1 |
|
69 | 70 | pulling from http://localhost:$HGPORT2/ |
|
70 | 71 | searching for changes |
|
71 | 72 | adding changesets |
|
72 | 73 | adding manifests |
|
73 | 74 | adding file changes |
|
74 | 75 | added 1 changesets with 1 changes to 1 files |
|
75 | 76 | new changesets ed1b79f46b9a (1 drafts) |
|
76 | 77 | (run 'hg update' to get a working copy) |
|
77 | 78 | $ hg pull -r 2 |
|
78 | 79 | pulling from http://localhost:$HGPORT2/ |
|
79 | 80 | searching for changes |
|
80 | 81 | adding changesets |
|
81 | 82 | adding manifests |
|
82 | 83 | adding file changes |
|
83 | 84 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
84 | 85 | new changesets effea6de0384 (1 drafts) |
|
85 | 86 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
86 | 87 | $ cd .. |
|
87 | 88 | $ killdaemons.py |
|
88 | 89 | $ grep 'sending pullbundle ' repo/.hg/blackbox.log |
|
89 | 90 | * sending pullbundle "0.hg" (glob) |
|
90 | 91 | * sending pullbundle "1.hg" (glob) |
|
91 | 92 | * sending pullbundle "2.hg" (glob) |
|
92 | 93 | $ rm repo/.hg/blackbox.log |
|
93 | 94 | |
|
94 | 95 | Test pullbundle functionality for incremental pulls |
|
95 | 96 | |
|
96 | 97 | $ cd repo |
|
97 | 98 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid |
|
98 | 99 | listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) |
|
99 | 100 | $ cat ../repo.pid >> $DAEMON_PIDS |
|
100 | 101 | $ cd .. |
|
101 | 102 | $ hg clone http://localhost:$HGPORT2/ repo.pullbundle2 |
|
102 | 103 | requesting all changes |
|
103 | 104 | adding changesets |
|
104 | 105 | adding manifests |
|
105 | 106 | adding file changes |
|
106 | 107 | adding changesets |
|
107 | 108 | adding manifests |
|
108 | 109 | adding file changes |
|
109 | 110 | adding changesets |
|
110 | 111 | adding manifests |
|
111 | 112 | adding file changes |
|
112 | 113 | added 3 changesets with 3 changes to 3 files (+1 heads) |
|
113 | 114 | new changesets bbd179dfa0a7:ed1b79f46b9a (3 drafts) |
|
114 | 115 | updating to branch default |
|
115 | 116 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
116 | 117 | $ killdaemons.py |
|
117 | 118 | $ grep 'sending pullbundle ' repo/.hg/blackbox.log |
|
118 | 119 | * sending pullbundle "0.hg" (glob) |
|
119 | 120 | * sending pullbundle "2.hg" (glob) |
|
120 | 121 | * sending pullbundle "1.hg" (glob) |
|
121 | 122 | $ rm repo/.hg/blackbox.log |
|
122 | 123 | |
|
123 | 124 | Test pullbundle functionality for incoming |
|
124 | 125 | |
|
125 | 126 | $ cd repo |
|
126 | 127 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid |
|
127 | 128 | listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) |
|
128 | 129 | $ cat ../repo.pid >> $DAEMON_PIDS |
|
129 | 130 | $ cd .. |
|
130 | 131 | $ hg clone http://localhost:$HGPORT2/ repo.pullbundle2a -r 0 |
|
131 | 132 | adding changesets |
|
132 | 133 | adding manifests |
|
133 | 134 | adding file changes |
|
134 | 135 | added 1 changesets with 1 changes to 1 files |
|
135 | 136 | new changesets bbd179dfa0a7 (1 drafts) |
|
136 | 137 | updating to branch default |
|
137 | 138 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
138 | 139 | $ cd repo.pullbundle2a |
|
139 | 140 | $ hg incoming -r ed1b79f46b9a |
|
140 | 141 | comparing with http://localhost:$HGPORT2/ |
|
141 | 142 | searching for changes |
|
142 | 143 | changeset: 1:ed1b79f46b9a |
|
143 | 144 | tag: tip |
|
144 | 145 | user: test |
|
145 | 146 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
146 | 147 | summary: change foo |
|
147 | 148 | |
|
148 | 149 | $ cd .. |
|
149 | 150 | $ killdaemons.py |
|
150 | 151 | $ grep 'sending pullbundle ' repo/.hg/blackbox.log |
|
151 | 152 | * sending pullbundle "0.hg" (glob) |
|
152 | 153 | * sending pullbundle "1.hg" (glob) |
|
153 | 154 | $ rm repo/.hg/blackbox.log |
|
154 | 155 | |
|
155 | 156 | Test recovery from misconfigured server sending no new data |
|
156 | 157 | |
|
157 | 158 | $ cd repo |
|
158 | 159 | $ cat <<EOF > .hg/pullbundles.manifest |
|
159 | 160 | > 0.hg heads=ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa |
|
160 | 161 | > 0.hg heads=bbd179dfa0a71671c253b3ae0aa1513b60d199fa |
|
161 | 162 | > EOF |
|
162 | 163 | $ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid |
|
163 | 164 | listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?) |
|
164 | 165 | $ cat ../repo.pid >> $DAEMON_PIDS |
|
165 | 166 | $ cd .. |
|
166 | 167 | $ hg clone -r 0 http://localhost:$HGPORT2/ repo.pullbundle3 |
|
167 | 168 | adding changesets |
|
168 | 169 | adding manifests |
|
169 | 170 | adding file changes |
|
170 | 171 | added 1 changesets with 1 changes to 1 files |
|
171 | 172 | new changesets bbd179dfa0a7 (1 drafts) |
|
172 | 173 | updating to branch default |
|
173 | 174 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
174 | 175 | $ cd repo.pullbundle3 |
|
175 | 176 | $ hg pull -r 1 |
|
176 | 177 | pulling from http://localhost:$HGPORT2/ |
|
177 | 178 | searching for changes |
|
178 | 179 | adding changesets |
|
179 | 180 | adding manifests |
|
180 | 181 | adding file changes |
|
181 | 182 | added 0 changesets with 0 changes to 1 files |
|
182 | 183 | abort: 00changelog.i@ed1b79f46b9a: no node! |
|
183 | 184 | [255] |
|
184 | 185 | $ cd .. |
|
185 | 186 | $ killdaemons.py |
|
186 | 187 | $ grep 'sending pullbundle ' repo/.hg/blackbox.log |
|
187 | 188 | * sending pullbundle "0.hg" (glob) |
|
188 | 189 | * sending pullbundle "0.hg" (glob) |
|
189 | 190 | $ rm repo/.hg/blackbox.log |
|
190 | 191 | |
|
191 | 192 | Test processing when nodes used in the pullbundle.manifest end up being hidden |
|
192 | 193 | |
|
193 | 194 | $ hg --repo repo debugobsolete ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a |
|
194 | 195 | 1 new obsolescence markers |
|
195 | 196 | obsoleted 1 changesets |
|
196 | 197 | $ hg serve --repo repo --config server.view=visible -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
197 | 198 | $ cat hg.pid >> $DAEMON_PIDS |
|
198 | 199 | $ hg clone http://localhost:$HGPORT repo-obs |
|
199 | 200 | requesting all changes |
|
200 | 201 | adding changesets |
|
201 | 202 | adding manifests |
|
202 | 203 | adding file changes |
|
203 | 204 | adding changesets |
|
204 | 205 | adding manifests |
|
205 | 206 | adding file changes |
|
206 | 207 | added 2 changesets with 2 changes to 2 files |
|
207 | 208 | new changesets bbd179dfa0a7:effea6de0384 |
|
208 | 209 | updating to branch default |
|
209 | 210 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
210 | 211 | $ killdaemons.py |
General Comments 0
You need to be logged in to leave comments.
Login now