Show More
@@ -1,126 +1,131 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | cp "$TESTDIR"/printenv.py . |
|
4 | 4 | |
|
5 | 5 | echo "====== Setting up test" |
|
6 | 6 | hg init test |
|
7 | 7 | cd test |
|
8 | 8 | echo 0 > afile |
|
9 | 9 | hg add afile |
|
10 | 10 | hg commit -m "0.0" -d "1000000 0" |
|
11 | 11 | echo 1 >> afile |
|
12 | 12 | hg commit -m "0.1" -d "1000000 0" |
|
13 | 13 | echo 2 >> afile |
|
14 | 14 | hg commit -m "0.2" -d "1000000 0" |
|
15 | 15 | echo 3 >> afile |
|
16 | 16 | hg commit -m "0.3" -d "1000000 0" |
|
17 | 17 | hg update -C 0 |
|
18 | 18 | echo 1 >> afile |
|
19 | 19 | hg commit -m "1.1" -d "1000000 0" |
|
20 | 20 | echo 2 >> afile |
|
21 | 21 | hg commit -m "1.2" -d "1000000 0" |
|
22 | 22 | echo "a line" > fred |
|
23 | 23 | echo 3 >> afile |
|
24 | 24 | hg add fred |
|
25 | 25 | hg commit -m "1.3" -d "1000000 0" |
|
26 | 26 | hg mv afile adifferentfile |
|
27 | 27 | hg commit -m "1.3m" -d "1000000 0" |
|
28 | 28 | hg update -C 3 |
|
29 | 29 | hg mv afile anotherfile |
|
30 | 30 | hg commit -m "0.3m" -d "1000000 0" |
|
31 | 31 | hg verify |
|
32 | 32 | cd .. |
|
33 | 33 | hg init empty |
|
34 | 34 | |
|
35 | 35 | echo "====== Bundle --all" |
|
36 | 36 | hg -R test bundle --all all.hg |
|
37 | 37 | echo "====== Bundle test to full.hg" |
|
38 | 38 | hg -R test bundle full.hg empty |
|
39 | 39 | echo "====== Unbundle full.hg in test" |
|
40 | 40 | hg -R test unbundle full.hg |
|
41 | 41 | echo "====== Verify empty" |
|
42 | 42 | hg -R empty heads |
|
43 | 43 | hg -R empty verify |
|
44 | 44 | |
|
45 | 45 | echo "====== Pull full.hg into test (using --cwd)" |
|
46 | 46 | hg --cwd test pull ../full.hg |
|
47 | 47 | echo "====== Pull full.hg into empty (using --cwd)" |
|
48 | 48 | hg --cwd empty pull ../full.hg |
|
49 | 49 | echo "====== Rollback empty" |
|
50 | 50 | hg -R empty rollback |
|
51 | 51 | echo "====== Pull full.hg into empty again (using --cwd)" |
|
52 | 52 | hg --cwd empty pull ../full.hg |
|
53 | 53 | |
|
54 | 54 | echo "====== Pull full.hg into test (using -R)" |
|
55 | 55 | hg -R test pull full.hg |
|
56 | 56 | echo "====== Pull full.hg into empty (using -R)" |
|
57 | 57 | hg -R empty pull full.hg |
|
58 | 58 | echo "====== Rollback empty" |
|
59 | 59 | hg -R empty rollback |
|
60 | 60 | echo "====== Pull full.hg into empty again (using -R)" |
|
61 | 61 | hg -R empty pull full.hg |
|
62 | 62 | |
|
63 | 63 | echo "====== Log -R full.hg in fresh empty" |
|
64 | 64 | rm -r empty |
|
65 | 65 | hg init empty |
|
66 | 66 | cd empty |
|
67 | 67 | hg -R bundle://../full.hg log |
|
68 | 68 | |
|
69 | 69 | echo "====== Pull ../full.hg into empty (with hook)" |
|
70 | 70 | echo '[hooks]' >> .hg/hgrc |
|
71 | 71 | echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc |
|
72 | 72 | #doesn't work (yet ?) |
|
73 | 73 | #hg -R bundle://../full.hg verify |
|
74 | 74 | hg pull bundle://../full.hg |
|
75 | 75 | echo "====== Rollback empty" |
|
76 | 76 | hg rollback |
|
77 | 77 | cd .. |
|
78 | 78 | echo "====== Log -R bundle:empty+full.hg" |
|
79 | 79 | hg -R bundle:empty+full.hg log --template="{rev} " |
|
80 | 80 | echo "" |
|
81 | 81 | echo "====== Pull full.hg into empty again (using -R; with hook)" |
|
82 | 82 | hg -R empty pull full.hg |
|
83 | 83 | |
|
84 | 84 | echo "====== Create partial clones" |
|
85 | 85 | rm -r empty |
|
86 | 86 | hg init empty |
|
87 | 87 | hg clone -r 3 test partial |
|
88 | 88 | hg clone partial partial2 |
|
89 | 89 | cd partial |
|
90 | 90 | echo "====== Log -R full.hg in partial" |
|
91 | 91 | hg -R bundle://../full.hg log |
|
92 | 92 | echo "====== Incoming full.hg in partial" |
|
93 | 93 | hg incoming bundle://../full.hg |
|
94 | 94 | echo "====== Outgoing -R full.hg vs partial2 in partial" |
|
95 | 95 | hg -R bundle://../full.hg outgoing ../partial2 |
|
96 | 96 | echo "====== Outgoing -R does-not-exist.hg vs partial2 in partial" |
|
97 | 97 | hg -R bundle://../does-not-exist.hg outgoing ../partial2 |
|
98 | 98 | cd .. |
|
99 | 99 | |
|
100 | echo "====== Direct clone from bundle (all-history)" | |
|
101 | hg clone full.hg full-clone | |
|
102 | hg -R full-clone heads | |
|
103 | rm -r full-clone | |
|
104 | ||
|
100 | 105 | # test for http://www.selenic.com/mercurial/bts/issue216 |
|
101 | 106 | echo "====== Unbundle incremental bundles into fresh empty in one go" |
|
102 | 107 | rm -r empty |
|
103 | 108 | hg init empty |
|
104 | 109 | hg -R test bundle --base null -r 0 ../0.hg |
|
105 | 110 | hg -R test bundle --base 0 -r 1 ../1.hg |
|
106 | 111 | hg -R empty unbundle -u ../0.hg ../1.hg |
|
107 | 112 | |
|
108 | 113 | # test for 540d1059c802 |
|
109 | 114 | echo "====== test for 540d1059c802" |
|
110 | 115 | hg init orig |
|
111 | 116 | cd orig |
|
112 | 117 | echo foo > foo |
|
113 | 118 | hg add foo |
|
114 | 119 | hg ci -m 'add foo' -d '0 0' |
|
115 | 120 | |
|
116 | 121 | hg clone . ../copy |
|
117 | 122 | hg tag -d '0 0' foo |
|
118 | 123 | |
|
119 | 124 | cd ../copy |
|
120 | 125 | echo >> foo |
|
121 | 126 | hg ci -m 'change foo' -d '0 0' |
|
122 | 127 | hg bundle ../bundle.hg ../orig |
|
123 | 128 | |
|
124 | 129 | cd ../orig |
|
125 | 130 | hg incoming ../bundle.hg |
|
126 | 131 | cd .. |
@@ -1,287 +1,306 b'' | |||
|
1 | 1 | ====== Setting up test |
|
2 | 2 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
3 | 3 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
4 | 4 | checking changesets |
|
5 | 5 | checking manifests |
|
6 | 6 | crosschecking files in changesets and manifests |
|
7 | 7 | checking files |
|
8 | 8 | 4 files, 9 changesets, 7 total revisions |
|
9 | 9 | ====== Bundle --all |
|
10 | 10 | 9 changesets found |
|
11 | 11 | ====== Bundle test to full.hg |
|
12 | 12 | searching for changes |
|
13 | 13 | 9 changesets found |
|
14 | 14 | ====== Unbundle full.hg in test |
|
15 | 15 | adding changesets |
|
16 | 16 | adding manifests |
|
17 | 17 | adding file changes |
|
18 | 18 | added 0 changesets with 0 changes to 4 files |
|
19 | 19 | (run 'hg update' to get a working copy) |
|
20 | 20 | ====== Verify empty |
|
21 | 21 | changeset: -1:000000000000 |
|
22 | 22 | tag: tip |
|
23 | 23 | user: |
|
24 | 24 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
25 | 25 | |
|
26 | 26 | checking changesets |
|
27 | 27 | checking manifests |
|
28 | 28 | crosschecking files in changesets and manifests |
|
29 | 29 | checking files |
|
30 | 30 | 0 files, 0 changesets, 0 total revisions |
|
31 | 31 | ====== Pull full.hg into test (using --cwd) |
|
32 | 32 | pulling from ../full.hg |
|
33 | 33 | searching for changes |
|
34 | 34 | no changes found |
|
35 | 35 | ====== Pull full.hg into empty (using --cwd) |
|
36 | 36 | pulling from ../full.hg |
|
37 | 37 | requesting all changes |
|
38 | 38 | adding changesets |
|
39 | 39 | adding manifests |
|
40 | 40 | adding file changes |
|
41 | 41 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
42 | 42 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
43 | 43 | ====== Rollback empty |
|
44 | 44 | rolling back last transaction |
|
45 | 45 | ====== Pull full.hg into empty again (using --cwd) |
|
46 | 46 | pulling from ../full.hg |
|
47 | 47 | requesting all changes |
|
48 | 48 | adding changesets |
|
49 | 49 | adding manifests |
|
50 | 50 | adding file changes |
|
51 | 51 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
52 | 52 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
53 | 53 | ====== Pull full.hg into test (using -R) |
|
54 | 54 | pulling from full.hg |
|
55 | 55 | searching for changes |
|
56 | 56 | no changes found |
|
57 | 57 | ====== Pull full.hg into empty (using -R) |
|
58 | 58 | pulling from full.hg |
|
59 | 59 | searching for changes |
|
60 | 60 | no changes found |
|
61 | 61 | ====== Rollback empty |
|
62 | 62 | rolling back last transaction |
|
63 | 63 | ====== Pull full.hg into empty again (using -R) |
|
64 | 64 | pulling from full.hg |
|
65 | 65 | requesting all changes |
|
66 | 66 | adding changesets |
|
67 | 67 | adding manifests |
|
68 | 68 | adding file changes |
|
69 | 69 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
70 | 70 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
71 | 71 | ====== Log -R full.hg in fresh empty |
|
72 | 72 | changeset: 8:836ac62537ab |
|
73 | 73 | tag: tip |
|
74 | 74 | parent: 3:ac69c658229d |
|
75 | 75 | user: test |
|
76 | 76 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
77 | 77 | summary: 0.3m |
|
78 | 78 | |
|
79 | 79 | changeset: 7:80fe151401c2 |
|
80 | 80 | user: test |
|
81 | 81 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
82 | 82 | summary: 1.3m |
|
83 | 83 | |
|
84 | 84 | changeset: 6:1e3f6b843bd6 |
|
85 | 85 | user: test |
|
86 | 86 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
87 | 87 | summary: 1.3 |
|
88 | 88 | |
|
89 | 89 | changeset: 5:024e4e7df376 |
|
90 | 90 | user: test |
|
91 | 91 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
92 | 92 | summary: 1.2 |
|
93 | 93 | |
|
94 | 94 | changeset: 4:5f4f3ceb285e |
|
95 | 95 | parent: 0:5649c9d34dd8 |
|
96 | 96 | user: test |
|
97 | 97 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
98 | 98 | summary: 1.1 |
|
99 | 99 | |
|
100 | 100 | changeset: 3:ac69c658229d |
|
101 | 101 | user: test |
|
102 | 102 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
103 | 103 | summary: 0.3 |
|
104 | 104 | |
|
105 | 105 | changeset: 2:d62976ca1e50 |
|
106 | 106 | user: test |
|
107 | 107 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
108 | 108 | summary: 0.2 |
|
109 | 109 | |
|
110 | 110 | changeset: 1:10b2180f755b |
|
111 | 111 | user: test |
|
112 | 112 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
113 | 113 | summary: 0.1 |
|
114 | 114 | |
|
115 | 115 | changeset: 0:5649c9d34dd8 |
|
116 | 116 | user: test |
|
117 | 117 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
118 | 118 | summary: 0.0 |
|
119 | 119 | |
|
120 | 120 | ====== Pull ../full.hg into empty (with hook) |
|
121 | 121 | changegroup hook: HG_NODE=5649c9d34dd87d0ecb5fd39672128376e83b22e1 HG_SOURCE=pull HG_URL=bundle:../full.hg |
|
122 | 122 | pulling from bundle://../full.hg |
|
123 | 123 | requesting all changes |
|
124 | 124 | adding changesets |
|
125 | 125 | adding manifests |
|
126 | 126 | adding file changes |
|
127 | 127 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
128 | 128 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
129 | 129 | ====== Rollback empty |
|
130 | 130 | rolling back last transaction |
|
131 | 131 | ====== Log -R bundle:empty+full.hg |
|
132 | 132 | 8 7 6 5 4 3 2 1 0 |
|
133 | 133 | ====== Pull full.hg into empty again (using -R; with hook) |
|
134 | 134 | changegroup hook: HG_NODE=5649c9d34dd87d0ecb5fd39672128376e83b22e1 HG_SOURCE=pull HG_URL=bundle:empty+full.hg |
|
135 | 135 | pulling from full.hg |
|
136 | 136 | requesting all changes |
|
137 | 137 | adding changesets |
|
138 | 138 | adding manifests |
|
139 | 139 | adding file changes |
|
140 | 140 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
141 | 141 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
142 | 142 | ====== Create partial clones |
|
143 | 143 | requesting all changes |
|
144 | 144 | adding changesets |
|
145 | 145 | adding manifests |
|
146 | 146 | adding file changes |
|
147 | 147 | added 4 changesets with 4 changes to 1 files |
|
148 | 148 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
149 | 149 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
150 | 150 | ====== Log -R full.hg in partial |
|
151 | 151 | changeset: 8:836ac62537ab |
|
152 | 152 | tag: tip |
|
153 | 153 | parent: 3:ac69c658229d |
|
154 | 154 | user: test |
|
155 | 155 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
156 | 156 | summary: 0.3m |
|
157 | 157 | |
|
158 | 158 | changeset: 7:80fe151401c2 |
|
159 | 159 | user: test |
|
160 | 160 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
161 | 161 | summary: 1.3m |
|
162 | 162 | |
|
163 | 163 | changeset: 6:1e3f6b843bd6 |
|
164 | 164 | user: test |
|
165 | 165 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
166 | 166 | summary: 1.3 |
|
167 | 167 | |
|
168 | 168 | changeset: 5:024e4e7df376 |
|
169 | 169 | user: test |
|
170 | 170 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
171 | 171 | summary: 1.2 |
|
172 | 172 | |
|
173 | 173 | changeset: 4:5f4f3ceb285e |
|
174 | 174 | parent: 0:5649c9d34dd8 |
|
175 | 175 | user: test |
|
176 | 176 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
177 | 177 | summary: 1.1 |
|
178 | 178 | |
|
179 | 179 | changeset: 3:ac69c658229d |
|
180 | 180 | user: test |
|
181 | 181 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
182 | 182 | summary: 0.3 |
|
183 | 183 | |
|
184 | 184 | changeset: 2:d62976ca1e50 |
|
185 | 185 | user: test |
|
186 | 186 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
187 | 187 | summary: 0.2 |
|
188 | 188 | |
|
189 | 189 | changeset: 1:10b2180f755b |
|
190 | 190 | user: test |
|
191 | 191 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
192 | 192 | summary: 0.1 |
|
193 | 193 | |
|
194 | 194 | changeset: 0:5649c9d34dd8 |
|
195 | 195 | user: test |
|
196 | 196 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
197 | 197 | summary: 0.0 |
|
198 | 198 | |
|
199 | 199 | ====== Incoming full.hg in partial |
|
200 | 200 | comparing with bundle://../full.hg |
|
201 | 201 | searching for changes |
|
202 | 202 | changeset: 4:5f4f3ceb285e |
|
203 | 203 | parent: 0:5649c9d34dd8 |
|
204 | 204 | user: test |
|
205 | 205 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
206 | 206 | summary: 1.1 |
|
207 | 207 | |
|
208 | 208 | changeset: 5:024e4e7df376 |
|
209 | 209 | user: test |
|
210 | 210 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
211 | 211 | summary: 1.2 |
|
212 | 212 | |
|
213 | 213 | changeset: 6:1e3f6b843bd6 |
|
214 | 214 | user: test |
|
215 | 215 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
216 | 216 | summary: 1.3 |
|
217 | 217 | |
|
218 | 218 | changeset: 7:80fe151401c2 |
|
219 | 219 | user: test |
|
220 | 220 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
221 | 221 | summary: 1.3m |
|
222 | 222 | |
|
223 | 223 | changeset: 8:836ac62537ab |
|
224 | 224 | tag: tip |
|
225 | 225 | parent: 3:ac69c658229d |
|
226 | 226 | user: test |
|
227 | 227 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
228 | 228 | summary: 0.3m |
|
229 | 229 | |
|
230 | 230 | ====== Outgoing -R full.hg vs partial2 in partial |
|
231 | 231 | comparing with ../partial2 |
|
232 | 232 | searching for changes |
|
233 | 233 | changeset: 4:5f4f3ceb285e |
|
234 | 234 | parent: 0:5649c9d34dd8 |
|
235 | 235 | user: test |
|
236 | 236 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
237 | 237 | summary: 1.1 |
|
238 | 238 | |
|
239 | 239 | changeset: 5:024e4e7df376 |
|
240 | 240 | user: test |
|
241 | 241 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
242 | 242 | summary: 1.2 |
|
243 | 243 | |
|
244 | 244 | changeset: 6:1e3f6b843bd6 |
|
245 | 245 | user: test |
|
246 | 246 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
247 | 247 | summary: 1.3 |
|
248 | 248 | |
|
249 | 249 | changeset: 7:80fe151401c2 |
|
250 | 250 | user: test |
|
251 | 251 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
252 | 252 | summary: 1.3m |
|
253 | 253 | |
|
254 | 254 | changeset: 8:836ac62537ab |
|
255 | 255 | tag: tip |
|
256 | 256 | parent: 3:ac69c658229d |
|
257 | 257 | user: test |
|
258 | 258 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
259 | 259 | summary: 0.3m |
|
260 | 260 | |
|
261 | 261 | ====== Outgoing -R does-not-exist.hg vs partial2 in partial |
|
262 | 262 | abort: No such file or directory: ../does-not-exist.hg |
|
263 | ====== Direct clone from bundle (all-history) | |
|
264 | requesting all changes | |
|
265 | adding changesets | |
|
266 | adding manifests | |
|
267 | adding file changes | |
|
268 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
|
269 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
270 | changeset: 8:836ac62537ab | |
|
271 | tag: tip | |
|
272 | parent: 3:ac69c658229d | |
|
273 | user: test | |
|
274 | date: Mon Jan 12 13:46:40 1970 +0000 | |
|
275 | summary: 0.3m | |
|
276 | ||
|
277 | changeset: 7:80fe151401c2 | |
|
278 | user: test | |
|
279 | date: Mon Jan 12 13:46:40 1970 +0000 | |
|
280 | summary: 1.3m | |
|
281 | ||
|
263 | 282 | ====== Unbundle incremental bundles into fresh empty in one go |
|
264 | 283 | 1 changesets found |
|
265 | 284 | 1 changesets found |
|
266 | 285 | adding changesets |
|
267 | 286 | adding manifests |
|
268 | 287 | adding file changes |
|
269 | 288 | added 1 changesets with 1 changes to 1 files |
|
270 | 289 | adding changesets |
|
271 | 290 | adding manifests |
|
272 | 291 | adding file changes |
|
273 | 292 | added 1 changesets with 1 changes to 1 files |
|
274 | 293 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
275 | 294 | ====== test for 540d1059c802 |
|
276 | 295 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
277 | 296 | searching for changes |
|
278 | 297 | 1 changesets found |
|
279 | 298 | comparing with ../bundle.hg |
|
280 | 299 | searching for changes |
|
281 | 300 | changeset: 2:ed1b79f46b9a |
|
282 | 301 | tag: tip |
|
283 | 302 | parent: 0:bbd179dfa0a7 |
|
284 | 303 | user: test |
|
285 | 304 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
286 | 305 | summary: change foo |
|
287 | 306 |
General Comments 0
You need to be logged in to leave comments.
Login now