Show More
@@ -1,951 +1,1041 b'' | |||||
1 | Setting up test |
|
1 | Setting up test | |
2 |
|
2 | |||
3 | $ hg init test |
|
3 | $ hg init test | |
4 | $ cd test |
|
4 | $ cd test | |
5 | $ echo 0 > afile |
|
5 | $ echo 0 > afile | |
6 | $ hg add afile |
|
6 | $ hg add afile | |
7 | $ hg commit -m "0.0" |
|
7 | $ hg commit -m "0.0" | |
8 | $ echo 1 >> afile |
|
8 | $ echo 1 >> afile | |
9 | $ hg commit -m "0.1" |
|
9 | $ hg commit -m "0.1" | |
10 | $ echo 2 >> afile |
|
10 | $ echo 2 >> afile | |
11 | $ hg commit -m "0.2" |
|
11 | $ hg commit -m "0.2" | |
12 | $ echo 3 >> afile |
|
12 | $ echo 3 >> afile | |
13 | $ hg commit -m "0.3" |
|
13 | $ hg commit -m "0.3" | |
14 | $ hg update -C 0 |
|
14 | $ hg update -C 0 | |
15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
16 | $ echo 1 >> afile |
|
16 | $ echo 1 >> afile | |
17 | $ hg commit -m "1.1" |
|
17 | $ hg commit -m "1.1" | |
18 | created new head |
|
18 | created new head | |
19 | $ echo 2 >> afile |
|
19 | $ echo 2 >> afile | |
20 | $ hg commit -m "1.2" |
|
20 | $ hg commit -m "1.2" | |
21 | $ echo "a line" > fred |
|
21 | $ echo "a line" > fred | |
22 | $ echo 3 >> afile |
|
22 | $ echo 3 >> afile | |
23 | $ hg add fred |
|
23 | $ hg add fred | |
24 | $ hg commit -m "1.3" |
|
24 | $ hg commit -m "1.3" | |
25 | $ hg mv afile adifferentfile |
|
25 | $ hg mv afile adifferentfile | |
26 | $ hg commit -m "1.3m" |
|
26 | $ hg commit -m "1.3m" | |
27 | $ hg update -C 3 |
|
27 | $ hg update -C 3 | |
28 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
28 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
29 | $ hg mv afile anotherfile |
|
29 | $ hg mv afile anotherfile | |
30 | $ hg commit -m "0.3m" |
|
30 | $ hg commit -m "0.3m" | |
31 | $ hg verify |
|
31 | $ hg verify | |
32 | checking changesets |
|
32 | checking changesets | |
33 | checking manifests |
|
33 | checking manifests | |
34 | crosschecking files in changesets and manifests |
|
34 | crosschecking files in changesets and manifests | |
35 | checking files |
|
35 | checking files | |
36 | checked 9 changesets with 7 changes to 4 files |
|
36 | checked 9 changesets with 7 changes to 4 files | |
37 | $ cd .. |
|
37 | $ cd .. | |
38 | $ hg init empty |
|
38 | $ hg init empty | |
39 |
|
39 | |||
40 | Bundle and phase |
|
40 | Bundle and phase | |
41 |
|
41 | |||
42 | $ hg -R test phase --force --secret 0 |
|
42 | $ hg -R test phase --force --secret 0 | |
43 | $ hg -R test bundle phase.hg empty |
|
43 | $ hg -R test bundle phase.hg empty | |
44 | searching for changes |
|
44 | searching for changes | |
45 | no changes found (ignored 9 secret changesets) |
|
45 | no changes found (ignored 9 secret changesets) | |
46 | [1] |
|
46 | [1] | |
47 | $ hg -R test phase --draft -r 'head()' |
|
47 | $ hg -R test phase --draft -r 'head()' | |
48 |
|
48 | |||
49 | Bundle --all |
|
49 | Bundle --all | |
50 |
|
50 | |||
51 | $ hg -R test bundle --all all.hg |
|
51 | $ hg -R test bundle --all all.hg | |
52 | 9 changesets found |
|
52 | 9 changesets found | |
53 |
|
53 | |||
54 | Bundle test to full.hg |
|
54 | Bundle test to full.hg | |
55 |
|
55 | |||
56 | $ hg -R test bundle full.hg empty |
|
56 | $ hg -R test bundle full.hg empty | |
57 | searching for changes |
|
57 | searching for changes | |
58 | 9 changesets found |
|
58 | 9 changesets found | |
59 |
|
59 | |||
60 | Unbundle full.hg in test |
|
60 | Unbundle full.hg in test | |
61 |
|
61 | |||
62 | $ hg -R test unbundle full.hg |
|
62 | $ hg -R test unbundle full.hg | |
63 | adding changesets |
|
63 | adding changesets | |
64 | adding manifests |
|
64 | adding manifests | |
65 | adding file changes |
|
65 | adding file changes | |
66 | added 0 changesets with 0 changes to 4 files |
|
66 | added 0 changesets with 0 changes to 4 files | |
67 | (run 'hg update' to get a working copy) |
|
67 | (run 'hg update' to get a working copy) | |
68 |
|
68 | |||
69 | Verify empty |
|
69 | Verify empty | |
70 |
|
70 | |||
71 | $ hg -R empty heads |
|
71 | $ hg -R empty heads | |
72 | [1] |
|
72 | [1] | |
73 | $ hg -R empty verify |
|
73 | $ hg -R empty verify | |
74 | checking changesets |
|
74 | checking changesets | |
75 | checking manifests |
|
75 | checking manifests | |
76 | crosschecking files in changesets and manifests |
|
76 | crosschecking files in changesets and manifests | |
77 | checking files |
|
77 | checking files | |
78 | checked 0 changesets with 0 changes to 0 files |
|
78 | checked 0 changesets with 0 changes to 0 files | |
79 |
|
79 | |||
80 | #if repobundlerepo |
|
80 | #if repobundlerepo | |
81 |
|
81 | |||
82 | Pull full.hg into test (using --cwd) |
|
82 | Pull full.hg into test (using --cwd) | |
83 |
|
83 | |||
84 | $ hg --cwd test pull ../full.hg |
|
84 | $ hg --cwd test pull ../full.hg | |
85 | pulling from ../full.hg |
|
85 | pulling from ../full.hg | |
86 | searching for changes |
|
86 | searching for changes | |
87 | no changes found |
|
87 | no changes found | |
88 |
|
88 | |||
89 | Verify that there are no leaked temporary files after pull (issue2797) |
|
89 | Verify that there are no leaked temporary files after pull (issue2797) | |
90 |
|
90 | |||
91 | $ ls test/.hg | grep .hg10un |
|
91 | $ ls test/.hg | grep .hg10un | |
92 | [1] |
|
92 | [1] | |
93 |
|
93 | |||
94 | Pull full.hg into empty (using --cwd) |
|
94 | Pull full.hg into empty (using --cwd) | |
95 |
|
95 | |||
96 | $ hg --cwd empty pull ../full.hg |
|
96 | $ hg --cwd empty pull ../full.hg | |
97 | pulling from ../full.hg |
|
97 | pulling from ../full.hg | |
98 | requesting all changes |
|
98 | requesting all changes | |
99 | adding changesets |
|
99 | adding changesets | |
100 | adding manifests |
|
100 | adding manifests | |
101 | adding file changes |
|
101 | adding file changes | |
102 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
102 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
103 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
|
103 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) | |
104 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
104 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
105 |
|
105 | |||
106 | Rollback empty |
|
106 | Rollback empty | |
107 |
|
107 | |||
108 | $ hg -R empty rollback |
|
108 | $ hg -R empty rollback | |
109 | repository tip rolled back to revision -1 (undo pull) |
|
109 | repository tip rolled back to revision -1 (undo pull) | |
110 |
|
110 | |||
111 | Pull full.hg into empty again (using --cwd) |
|
111 | Pull full.hg into empty again (using --cwd) | |
112 |
|
112 | |||
113 | $ hg --cwd empty pull ../full.hg |
|
113 | $ hg --cwd empty pull ../full.hg | |
114 | pulling from ../full.hg |
|
114 | pulling from ../full.hg | |
115 | requesting all changes |
|
115 | requesting all changes | |
116 | adding changesets |
|
116 | adding changesets | |
117 | adding manifests |
|
117 | adding manifests | |
118 | adding file changes |
|
118 | adding file changes | |
119 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
119 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
120 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
|
120 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) | |
121 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
121 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
122 |
|
122 | |||
123 | Pull full.hg into test (using -R) |
|
123 | Pull full.hg into test (using -R) | |
124 |
|
124 | |||
125 | $ hg -R test pull full.hg |
|
125 | $ hg -R test pull full.hg | |
126 | pulling from full.hg |
|
126 | pulling from full.hg | |
127 | searching for changes |
|
127 | searching for changes | |
128 | no changes found |
|
128 | no changes found | |
129 |
|
129 | |||
130 | Pull full.hg into empty (using -R) |
|
130 | Pull full.hg into empty (using -R) | |
131 |
|
131 | |||
132 | $ hg -R empty pull full.hg |
|
132 | $ hg -R empty pull full.hg | |
133 | pulling from full.hg |
|
133 | pulling from full.hg | |
134 | searching for changes |
|
134 | searching for changes | |
135 | no changes found |
|
135 | no changes found | |
136 |
|
136 | |||
137 | Rollback empty |
|
137 | Rollback empty | |
138 |
|
138 | |||
139 | $ hg -R empty rollback |
|
139 | $ hg -R empty rollback | |
140 | repository tip rolled back to revision -1 (undo pull) |
|
140 | repository tip rolled back to revision -1 (undo pull) | |
141 |
|
141 | |||
142 | Pull full.hg into empty again (using -R) |
|
142 | Pull full.hg into empty again (using -R) | |
143 |
|
143 | |||
144 | $ hg -R empty pull full.hg |
|
144 | $ hg -R empty pull full.hg | |
145 | pulling from full.hg |
|
145 | pulling from full.hg | |
146 | requesting all changes |
|
146 | requesting all changes | |
147 | adding changesets |
|
147 | adding changesets | |
148 | adding manifests |
|
148 | adding manifests | |
149 | adding file changes |
|
149 | adding file changes | |
150 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
150 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
151 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
|
151 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) | |
152 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
152 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
153 |
|
153 | |||
154 | Log -R full.hg in fresh empty |
|
154 | Log -R full.hg in fresh empty | |
155 |
|
155 | |||
156 | $ rm -r empty |
|
156 | $ rm -r empty | |
157 | $ hg init empty |
|
157 | $ hg init empty | |
158 | $ cd empty |
|
158 | $ cd empty | |
159 | $ hg -R bundle://../full.hg log |
|
159 | $ hg -R bundle://../full.hg log | |
160 | changeset: 8:aa35859c02ea |
|
160 | changeset: 8:aa35859c02ea | |
161 | tag: tip |
|
161 | tag: tip | |
162 | parent: 3:eebf5a27f8ca |
|
162 | parent: 3:eebf5a27f8ca | |
163 | user: test |
|
163 | user: test | |
164 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
164 | date: Thu Jan 01 00:00:00 1970 +0000 | |
165 | summary: 0.3m |
|
165 | summary: 0.3m | |
166 |
|
166 | |||
167 | changeset: 7:a6a34bfa0076 |
|
167 | changeset: 7:a6a34bfa0076 | |
168 | user: test |
|
168 | user: test | |
169 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
169 | date: Thu Jan 01 00:00:00 1970 +0000 | |
170 | summary: 1.3m |
|
170 | summary: 1.3m | |
171 |
|
171 | |||
172 | changeset: 6:7373c1169842 |
|
172 | changeset: 6:7373c1169842 | |
173 | user: test |
|
173 | user: test | |
174 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
174 | date: Thu Jan 01 00:00:00 1970 +0000 | |
175 | summary: 1.3 |
|
175 | summary: 1.3 | |
176 |
|
176 | |||
177 | changeset: 5:1bb50a9436a7 |
|
177 | changeset: 5:1bb50a9436a7 | |
178 | user: test |
|
178 | user: test | |
179 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
179 | date: Thu Jan 01 00:00:00 1970 +0000 | |
180 | summary: 1.2 |
|
180 | summary: 1.2 | |
181 |
|
181 | |||
182 | changeset: 4:095197eb4973 |
|
182 | changeset: 4:095197eb4973 | |
183 | parent: 0:f9ee2f85a263 |
|
183 | parent: 0:f9ee2f85a263 | |
184 | user: test |
|
184 | user: test | |
185 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
185 | date: Thu Jan 01 00:00:00 1970 +0000 | |
186 | summary: 1.1 |
|
186 | summary: 1.1 | |
187 |
|
187 | |||
188 | changeset: 3:eebf5a27f8ca |
|
188 | changeset: 3:eebf5a27f8ca | |
189 | user: test |
|
189 | user: test | |
190 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
190 | date: Thu Jan 01 00:00:00 1970 +0000 | |
191 | summary: 0.3 |
|
191 | summary: 0.3 | |
192 |
|
192 | |||
193 | changeset: 2:e38ba6f5b7e0 |
|
193 | changeset: 2:e38ba6f5b7e0 | |
194 | user: test |
|
194 | user: test | |
195 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
195 | date: Thu Jan 01 00:00:00 1970 +0000 | |
196 | summary: 0.2 |
|
196 | summary: 0.2 | |
197 |
|
197 | |||
198 | changeset: 1:34c2bf6b0626 |
|
198 | changeset: 1:34c2bf6b0626 | |
199 | user: test |
|
199 | user: test | |
200 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
200 | date: Thu Jan 01 00:00:00 1970 +0000 | |
201 | summary: 0.1 |
|
201 | summary: 0.1 | |
202 |
|
202 | |||
203 | changeset: 0:f9ee2f85a263 |
|
203 | changeset: 0:f9ee2f85a263 | |
204 | user: test |
|
204 | user: test | |
205 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
205 | date: Thu Jan 01 00:00:00 1970 +0000 | |
206 | summary: 0.0 |
|
206 | summary: 0.0 | |
207 |
|
207 | |||
208 | Make sure bundlerepo doesn't leak tempfiles (issue2491) |
|
208 | Make sure bundlerepo doesn't leak tempfiles (issue2491) | |
209 |
|
209 | |||
210 | $ ls .hg |
|
210 | $ ls .hg | |
211 | 00changelog.i |
|
211 | 00changelog.i | |
212 | cache |
|
212 | cache | |
213 | requires |
|
213 | requires | |
214 | store |
|
214 | store | |
215 | wcache |
|
215 | wcache | |
216 |
|
216 | |||
217 | Pull ../full.hg into empty (with hook) |
|
217 | Pull ../full.hg into empty (with hook) | |
218 |
|
218 | |||
219 | $ cat >> .hg/hgrc <<EOF |
|
219 | $ cat >> .hg/hgrc <<EOF | |
220 | > [hooks] |
|
220 | > [hooks] | |
221 | > changegroup = sh -c "printenv.py --line changegroup" |
|
221 | > changegroup = sh -c "printenv.py --line changegroup" | |
222 | > EOF |
|
222 | > EOF | |
223 |
|
223 | |||
224 | doesn't work (yet ?) |
|
224 | doesn't work (yet ?) | |
225 | NOTE: msys is mangling the URL below |
|
225 | NOTE: msys is mangling the URL below | |
226 |
|
226 | |||
227 | hg -R bundle://../full.hg verify |
|
227 | hg -R bundle://../full.hg verify | |
228 |
|
228 | |||
229 | $ hg pull bundle://../full.hg |
|
229 | $ hg pull bundle://../full.hg | |
230 | pulling from bundle:../full.hg |
|
230 | pulling from bundle:../full.hg | |
231 | requesting all changes |
|
231 | requesting all changes | |
232 | adding changesets |
|
232 | adding changesets | |
233 | adding manifests |
|
233 | adding manifests | |
234 | adding file changes |
|
234 | adding file changes | |
235 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
235 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
236 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
|
236 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) | |
237 | changegroup hook: HG_HOOKNAME=changegroup |
|
237 | changegroup hook: HG_HOOKNAME=changegroup | |
238 | HG_HOOKTYPE=changegroup |
|
238 | HG_HOOKTYPE=changegroup | |
239 | HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 |
|
239 | HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 | |
240 | HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf |
|
240 | HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf | |
241 | HG_SOURCE=pull |
|
241 | HG_SOURCE=pull | |
242 | HG_TXNID=TXN:$ID$ |
|
242 | HG_TXNID=TXN:$ID$ | |
243 | HG_TXNNAME=pull |
|
243 | HG_TXNNAME=pull | |
244 | bundle:../full.hg (no-msys !) |
|
244 | bundle:../full.hg (no-msys !) | |
245 | bundle;../full.hg (msys !) |
|
245 | bundle;../full.hg (msys !) | |
246 | HG_URL=bundle:../full.hg (no-msys !) |
|
246 | HG_URL=bundle:../full.hg (no-msys !) | |
247 | HG_URL=bundle;../full.hg (msys !) |
|
247 | HG_URL=bundle;../full.hg (msys !) | |
248 |
|
248 | |||
249 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
249 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
250 |
|
250 | |||
251 | Rollback empty |
|
251 | Rollback empty | |
252 |
|
252 | |||
253 | $ hg rollback |
|
253 | $ hg rollback | |
254 | repository tip rolled back to revision -1 (undo pull) |
|
254 | repository tip rolled back to revision -1 (undo pull) | |
255 | $ cd .. |
|
255 | $ cd .. | |
256 |
|
256 | |||
257 | Log -R bundle:empty+full.hg |
|
257 | Log -R bundle:empty+full.hg | |
258 |
|
258 | |||
259 | $ hg -R bundle:empty+full.hg log --template="{rev} "; echo "" |
|
259 | $ hg -R bundle:empty+full.hg log --template="{rev} "; echo "" | |
260 | 8 7 6 5 4 3 2 1 0 |
|
260 | 8 7 6 5 4 3 2 1 0 | |
261 |
|
261 | |||
262 | Pull full.hg into empty again (using -R; with hook) |
|
262 | Pull full.hg into empty again (using -R; with hook) | |
263 |
|
263 | |||
264 | $ hg -R empty pull full.hg |
|
264 | $ hg -R empty pull full.hg | |
265 | pulling from full.hg |
|
265 | pulling from full.hg | |
266 | requesting all changes |
|
266 | requesting all changes | |
267 | adding changesets |
|
267 | adding changesets | |
268 | adding manifests |
|
268 | adding manifests | |
269 | adding file changes |
|
269 | adding file changes | |
270 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
270 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
271 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
|
271 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) | |
272 | changegroup hook: HG_HOOKNAME=changegroup |
|
272 | changegroup hook: HG_HOOKNAME=changegroup | |
273 | HG_HOOKTYPE=changegroup |
|
273 | HG_HOOKTYPE=changegroup | |
274 | HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 |
|
274 | HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 | |
275 | HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf |
|
275 | HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf | |
276 | HG_SOURCE=pull |
|
276 | HG_SOURCE=pull | |
277 | HG_TXNID=TXN:$ID$ |
|
277 | HG_TXNID=TXN:$ID$ | |
278 | HG_TXNNAME=pull |
|
278 | HG_TXNNAME=pull | |
279 | bundle:empty+full.hg |
|
279 | bundle:empty+full.hg | |
280 | HG_URL=bundle:empty+full.hg |
|
280 | HG_URL=bundle:empty+full.hg | |
281 |
|
281 | |||
282 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
282 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
283 |
|
283 | |||
284 | #endif |
|
284 | #endif | |
285 |
|
285 | |||
286 | Cannot produce streaming clone bundles with "hg bundle" |
|
286 | Cannot produce streaming clone bundles with "hg bundle" | |
287 |
|
287 | |||
288 | $ hg -R test bundle -t packed1 packed.hg |
|
288 | $ hg -R test bundle -t packed1 packed.hg | |
289 | abort: packed bundles cannot be produced by "hg bundle" |
|
289 | abort: packed bundles cannot be produced by "hg bundle" | |
290 | (use 'hg debugcreatestreamclonebundle') |
|
290 | (use 'hg debugcreatestreamclonebundle') | |
291 | [10] |
|
291 | [10] | |
292 |
|
292 | |||
293 | packed1 is produced properly |
|
293 | packed1 is produced properly | |
294 |
|
294 | |||
295 | #if reporevlogstore |
|
295 | ||
|
296 | #if reporevlogstore rust | |||
296 |
|
297 | |||
297 | $ hg -R test debugcreatestreamclonebundle packed.hg |
|
298 | $ hg -R test debugcreatestreamclonebundle packed.hg | |
298 |
writing 266 |
|
299 | writing 2665 bytes for 6 files | |
299 | writing 2665 bytes for 6 files (zstd !) |
|
300 | bundle requirements: generaldelta, persistent-nodemap, revlogv1, sparserevlog | |
300 | bundle requirements: generaldelta, revlogv1, sparserevlog (no-rust !) |
|
301 | ||
301 | bundle requirements: generaldelta, persistent-nodemap, revlogv1, sparserevlog (rust !) |
|
302 | $ f -B 64 --size --sha1 --hexdump packed.hg | |
|
303 | packed.hg: size=2860, sha1=81d7a2e535892cda51e82c200f818de2cca828d3 | |||
|
304 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........| | |||
|
305 | 0010: 00 00 00 00 0a 69 00 36 67 65 6e 65 72 61 6c 64 |.....i.6generald| | |||
|
306 | 0020: 65 6c 74 61 2c 70 65 72 73 69 73 74 65 6e 74 2d |elta,persistent-| | |||
|
307 | 0030: 6e 6f 64 65 6d 61 70 2c 72 65 76 6c 6f 67 76 31 |nodemap,revlogv1| | |||
|
308 | $ hg debugbundle --spec packed.hg | |||
|
309 | none-packed1;requirements%3Dgeneraldelta%2Cpersistent-nodemap%2Crevlogv1%2Csparserevlog | |||
|
310 | #endif | |||
|
311 | ||||
|
312 | #if reporevlogstore no-rust zstd | |||
|
313 | ||||
|
314 | $ hg -R test debugcreatestreamclonebundle packed.hg | |||
|
315 | writing 2665 bytes for 6 files | |||
|
316 | bundle requirements: generaldelta, revlogv1, sparserevlog | |||
302 |
|
317 | |||
303 | $ f -B 64 --size --sha1 --hexdump packed.hg |
|
318 | $ f -B 64 --size --sha1 --hexdump packed.hg | |
304 | packed.hg: size=2840, sha1=12bf3eee3eb8a04c503ce2d29b48f0135c7edff5 (no-zstd !) |
|
319 | packed.hg: size=2841, sha1=8b645a65f49b0ae43042a9f3da56d4bfdf1c7f99 | |
305 | packed.hg: size=2841, sha1=8b645a65f49b0ae43042a9f3da56d4bfdf1c7f99 (zstd no-rust !) |
|
|||
306 | packed.hg: size=2860, sha1=81d7a2e535892cda51e82c200f818de2cca828d3 (rust !) |
|
|||
307 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........| |
|
320 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........| | |
308 |
0010: 00 00 00 00 0a 6 |
|
321 | 0010: 00 00 00 00 0a 69 00 23 67 65 6e 65 72 61 6c 64 |.....i.#generald| | |
309 |
0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 2c 73 70 |elta,revlogv1,sp| |
|
322 | 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 2c 73 70 |elta,revlogv1,sp| | |
310 |
0030: 61 72 73 65 72 65 76 6c 6f 67 00 64 61 74 61 2f |arserevlog.data/| |
|
323 | 0030: 61 72 73 65 72 65 76 6c 6f 67 00 64 61 74 61 2f |arserevlog.data/| | |
311 | 0010: 00 00 00 00 0a 69 00 23 67 65 6e 65 72 61 6c 64 |.....i.#generald| (zstd no-rust !) |
|
324 | $ hg debugbundle --spec packed.hg | |
312 | 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 2c 73 70 |elta,revlogv1,sp| (zstd no-rust !) |
|
325 | none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Csparserevlog | |
313 | 0030: 61 72 73 65 72 65 76 6c 6f 67 00 64 61 74 61 2f |arserevlog.data/| (zstd no-rust !) |
|
326 | #endif | |
314 | 0010: 00 00 00 00 0a 69 00 36 67 65 6e 65 72 61 6c 64 |.....i.6generald| (rust !) |
|
327 | ||
315 | 0020: 65 6c 74 61 2c 70 65 72 73 69 73 74 65 6e 74 2d |elta,persistent-| (rust !) |
|
328 | #if reporevlogstore no-rust no-zstd | |
316 | 0030: 6e 6f 64 65 6d 61 70 2c 72 65 76 6c 6f 67 76 31 |nodemap,revlogv1| (rust !) |
|
|||
317 |
|
329 | |||
|
330 | $ hg -R test debugcreatestreamclonebundle packed.hg | |||
|
331 | writing 2664 bytes for 6 files | |||
|
332 | bundle requirements: generaldelta, revlogv1, sparserevlog | |||
|
333 | ||||
|
334 | $ f -B 64 --size --sha1 --hexdump packed.hg | |||
|
335 | packed.hg: size=2840, sha1=12bf3eee3eb8a04c503ce2d29b48f0135c7edff5 | |||
|
336 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........| | |||
|
337 | 0010: 00 00 00 00 0a 68 00 23 67 65 6e 65 72 61 6c 64 |.....h.#generald| | |||
|
338 | 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 2c 73 70 |elta,revlogv1,sp| | |||
|
339 | 0030: 61 72 73 65 72 65 76 6c 6f 67 00 64 61 74 61 2f |arserevlog.data/| | |||
318 | $ hg debugbundle --spec packed.hg |
|
340 | $ hg debugbundle --spec packed.hg | |
319 |
none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Csparserevlog |
|
341 | none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Csparserevlog | |
320 | none-packed1;requirements%3Dgeneraldelta%2Cpersistent-nodemap%2Crevlogv1%2Csparserevlog (rust !) |
|
342 | #endif | |
|
343 | ||||
|
344 | #if reporevlogstore | |||
321 |
|
345 | |||
322 | generaldelta requirement is not listed in stream clone bundles unless used |
|
346 | generaldelta requirement is not listed in stream clone bundles unless used | |
323 |
|
347 | |||
324 | $ hg --config format.usegeneraldelta=false init testnongd |
|
348 | $ hg --config format.usegeneraldelta=false init testnongd | |
325 | $ cd testnongd |
|
349 | $ cd testnongd | |
326 | $ touch foo |
|
350 | $ touch foo | |
327 | $ hg -q commit -A -m initial |
|
351 | $ hg -q commit -A -m initial | |
328 | $ cd .. |
|
352 | $ cd .. | |
|
353 | ||||
|
354 | #endif | |||
|
355 | ||||
|
356 | #if reporevlogstore rust | |||
|
357 | ||||
329 | $ hg -R testnongd debugcreatestreamclonebundle packednongd.hg |
|
358 | $ hg -R testnongd debugcreatestreamclonebundle packednongd.hg | |
330 | writing 301 bytes for 3 files |
|
359 | writing 301 bytes for 3 files | |
331 |
bundle requirements: revlogv1 |
|
360 | bundle requirements: persistent-nodemap, revlogv1 | |
332 | bundle requirements: persistent-nodemap, revlogv1 (rust !) |
|
361 | ||
|
362 | $ f -B 64 --size --sha1 --hexdump packednongd.hg | |||
|
363 | packednongd.hg: size=402, sha1=d3cc1417f0e8142cf9340aaaa520b660ad3ec3ea | |||
|
364 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 03 00 00 |HGS1UN..........| | |||
|
365 | 0010: 00 00 00 00 01 2d 00 1c 70 65 72 73 69 73 74 65 |.....-..persiste| | |||
|
366 | 0020: 6e 74 2d 6e 6f 64 65 6d 61 70 2c 72 65 76 6c 6f |nt-nodemap,revlo| | |||
|
367 | 0030: 67 76 31 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 |gv1.data/foo.i.6| | |||
|
368 | ||||
|
369 | $ hg debugbundle --spec packednongd.hg | |||
|
370 | none-packed1;requirements%3Dpersistent-nodemap%2Crevlogv1 | |||
|
371 | ||||
|
372 | #endif | |||
|
373 | ||||
|
374 | #if reporevlogstore no-rust zstd | |||
|
375 | ||||
|
376 | $ hg -R testnongd debugcreatestreamclonebundle packednongd.hg | |||
|
377 | writing 301 bytes for 3 files | |||
|
378 | bundle requirements: revlogv1 | |||
333 |
|
379 | |||
334 | $ f -B 64 --size --sha1 --hexdump packednongd.hg |
|
380 | $ f -B 64 --size --sha1 --hexdump packednongd.hg | |
335 |
packednongd.hg: size=383, sha1=1d9c230238edd5d38907100b729ba72b1831fe6f |
|
381 | packednongd.hg: size=383, sha1=1d9c230238edd5d38907100b729ba72b1831fe6f | |
336 | packednongd.hg: size=402, sha1=d3cc1417f0e8142cf9340aaaa520b660ad3ec3ea (rust !) |
|
|||
337 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 03 00 00 |HGS1UN..........| |
|
382 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 03 00 00 |HGS1UN..........| | |
338 |
0010: 00 00 00 00 01 2d 00 09 72 65 76 6c 6f 67 76 31 |.....-..revlogv1| |
|
383 | 0010: 00 00 00 00 01 2d 00 09 72 65 76 6c 6f 67 76 31 |.....-..revlogv1| | |
339 |
0020: 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 |.data/foo.i.64..| |
|
384 | 0020: 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 |.data/foo.i.64..| | |
340 |
0030: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| |
|
385 | 0030: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| | |
341 | 0010: 00 00 00 00 01 2d 00 1c 70 65 72 73 69 73 74 65 |.....-..persiste| (rust !) |
|
|||
342 | 0020: 6e 74 2d 6e 6f 64 65 6d 61 70 2c 72 65 76 6c 6f |nt-nodemap,revlo| (rust !) |
|
|||
343 | 0030: 67 76 31 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 |gv1.data/foo.i.6| (rust !) |
|
|||
344 |
|
386 | |||
345 | $ hg debugbundle --spec packednongd.hg |
|
387 | $ hg debugbundle --spec packednongd.hg | |
346 |
none-packed1;requirements%3Drevlogv1 |
|
388 | none-packed1;requirements%3Drevlogv1 | |
347 | none-packed1;requirements%3Dpersistent-nodemap%2Crevlogv1 (rust !) |
|
389 | ||
|
390 | ||||
|
391 | #endif | |||
|
392 | ||||
|
393 | #if reporevlogstore no-rust no-zstd | |||
|
394 | ||||
|
395 | $ hg -R testnongd debugcreatestreamclonebundle packednongd.hg | |||
|
396 | writing 301 bytes for 3 files | |||
|
397 | bundle requirements: revlogv1 | |||
|
398 | ||||
|
399 | $ f -B 64 --size --sha1 --hexdump packednongd.hg | |||
|
400 | packednongd.hg: size=383, sha1=1d9c230238edd5d38907100b729ba72b1831fe6f | |||
|
401 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 03 00 00 |HGS1UN..........| | |||
|
402 | 0010: 00 00 00 00 01 2d 00 09 72 65 76 6c 6f 67 76 31 |.....-..revlogv1| | |||
|
403 | 0020: 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 |.data/foo.i.64..| | |||
|
404 | 0030: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| | |||
|
405 | ||||
|
406 | $ hg debugbundle --spec packednongd.hg | |||
|
407 | none-packed1;requirements%3Drevlogv1 | |||
|
408 | ||||
|
409 | ||||
|
410 | #endif | |||
|
411 | ||||
|
412 | #if reporevlogstore | |||
348 |
|
413 | |||
349 | Warning emitted when packed bundles contain secret changesets |
|
414 | Warning emitted when packed bundles contain secret changesets | |
350 |
|
415 | |||
351 | $ hg init testsecret |
|
416 | $ hg init testsecret | |
352 | $ cd testsecret |
|
417 | $ cd testsecret | |
353 | $ touch foo |
|
418 | $ touch foo | |
354 | $ hg -q commit -A -m initial |
|
419 | $ hg -q commit -A -m initial | |
355 | $ hg phase --force --secret -r . |
|
420 | $ hg phase --force --secret -r . | |
356 | $ cd .. |
|
421 | $ cd .. | |
357 |
|
422 | |||
|
423 | #endif | |||
|
424 | ||||
|
425 | #if reporevlogstore rust | |||
|
426 | ||||
358 | $ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg |
|
427 | $ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg | |
359 | (warning: stream clone bundle will contain secret revisions) |
|
428 | (warning: stream clone bundle will contain secret revisions) | |
360 | writing 301 bytes for 3 files |
|
429 | writing 301 bytes for 3 files | |
361 |
bundle requirements: generaldelta, revlogv1, sparserevlog |
|
430 | bundle requirements: generaldelta, persistent-nodemap, revlogv1, sparserevlog | |
362 | bundle requirements: generaldelta, persistent-nodemap, revlogv1, sparserevlog (rust !) |
|
431 | ||
|
432 | #endif | |||
|
433 | ||||
|
434 | #if reporevlogstore no-rust zstd | |||
|
435 | ||||
|
436 | $ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg | |||
|
437 | (warning: stream clone bundle will contain secret revisions) | |||
|
438 | writing 301 bytes for 3 files | |||
|
439 | bundle requirements: generaldelta, revlogv1, sparserevlog | |||
|
440 | ||||
|
441 | #endif | |||
|
442 | ||||
|
443 | #if reporevlogstore no-rust no-zstd | |||
|
444 | ||||
|
445 | $ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg | |||
|
446 | (warning: stream clone bundle will contain secret revisions) | |||
|
447 | writing 301 bytes for 3 files | |||
|
448 | bundle requirements: generaldelta, revlogv1, sparserevlog | |||
|
449 | ||||
|
450 | #endif | |||
|
451 | ||||
|
452 | #if reporevlogstore | |||
363 |
|
453 | |||
364 | Unpacking packed1 bundles with "hg unbundle" isn't allowed |
|
454 | Unpacking packed1 bundles with "hg unbundle" isn't allowed | |
365 |
|
455 | |||
366 | $ hg init packed |
|
456 | $ hg init packed | |
367 | $ hg -R packed unbundle packed.hg |
|
457 | $ hg -R packed unbundle packed.hg | |
368 | abort: packed bundles cannot be applied with "hg unbundle" |
|
458 | abort: packed bundles cannot be applied with "hg unbundle" | |
369 | (use "hg debugapplystreamclonebundle") |
|
459 | (use "hg debugapplystreamclonebundle") | |
370 | [10] |
|
460 | [10] | |
371 |
|
461 | |||
372 | packed1 can be consumed from debug command |
|
462 | packed1 can be consumed from debug command | |
373 |
|
463 | |||
374 | (this also confirms that streamclone-ed changes are visible via |
|
464 | (this also confirms that streamclone-ed changes are visible via | |
375 | @filecache properties to in-process procedures before closing |
|
465 | @filecache properties to in-process procedures before closing | |
376 | transaction) |
|
466 | transaction) | |
377 |
|
467 | |||
378 | $ cat > $TESTTMP/showtip.py <<EOF |
|
468 | $ cat > $TESTTMP/showtip.py <<EOF | |
379 | > from __future__ import absolute_import |
|
469 | > from __future__ import absolute_import | |
380 | > |
|
470 | > | |
381 | > def showtip(ui, repo, hooktype, **kwargs): |
|
471 | > def showtip(ui, repo, hooktype, **kwargs): | |
382 | > ui.warn(b'%s: %s\n' % (hooktype, repo[b'tip'].hex()[:12])) |
|
472 | > ui.warn(b'%s: %s\n' % (hooktype, repo[b'tip'].hex()[:12])) | |
383 | > |
|
473 | > | |
384 | > def reposetup(ui, repo): |
|
474 | > def reposetup(ui, repo): | |
385 | > # this confirms (and ensures) that (empty) 00changelog.i |
|
475 | > # this confirms (and ensures) that (empty) 00changelog.i | |
386 | > # before streamclone is already cached as repo.changelog |
|
476 | > # before streamclone is already cached as repo.changelog | |
387 | > ui.setconfig(b'hooks', b'pretxnopen.showtip', showtip) |
|
477 | > ui.setconfig(b'hooks', b'pretxnopen.showtip', showtip) | |
388 | > |
|
478 | > | |
389 | > # this confirms that streamclone-ed changes are visible to |
|
479 | > # this confirms that streamclone-ed changes are visible to | |
390 | > # in-process procedures before closing transaction |
|
480 | > # in-process procedures before closing transaction | |
391 | > ui.setconfig(b'hooks', b'pretxnclose.showtip', showtip) |
|
481 | > ui.setconfig(b'hooks', b'pretxnclose.showtip', showtip) | |
392 | > |
|
482 | > | |
393 | > # this confirms that streamclone-ed changes are still visible |
|
483 | > # this confirms that streamclone-ed changes are still visible | |
394 | > # after closing transaction |
|
484 | > # after closing transaction | |
395 | > ui.setconfig(b'hooks', b'txnclose.showtip', showtip) |
|
485 | > ui.setconfig(b'hooks', b'txnclose.showtip', showtip) | |
396 | > EOF |
|
486 | > EOF | |
397 | $ cat >> $HGRCPATH <<EOF |
|
487 | $ cat >> $HGRCPATH <<EOF | |
398 | > [extensions] |
|
488 | > [extensions] | |
399 | > showtip = $TESTTMP/showtip.py |
|
489 | > showtip = $TESTTMP/showtip.py | |
400 | > EOF |
|
490 | > EOF | |
401 |
|
491 | |||
402 | $ hg -R packed debugapplystreamclonebundle packed.hg |
|
492 | $ hg -R packed debugapplystreamclonebundle packed.hg | |
403 | 6 files to transfer, 2.60 KB of data |
|
493 | 6 files to transfer, 2.60 KB of data | |
404 | pretxnopen: 000000000000 |
|
494 | pretxnopen: 000000000000 | |
405 | pretxnclose: aa35859c02ea |
|
495 | pretxnclose: aa35859c02ea | |
406 | transferred 2.60 KB in * seconds (* */sec) (glob) |
|
496 | transferred 2.60 KB in * seconds (* */sec) (glob) | |
407 | txnclose: aa35859c02ea |
|
497 | txnclose: aa35859c02ea | |
408 |
|
498 | |||
409 | (for safety, confirm visibility of streamclone-ed changes by another |
|
499 | (for safety, confirm visibility of streamclone-ed changes by another | |
410 | process, too) |
|
500 | process, too) | |
411 |
|
501 | |||
412 | $ hg -R packed tip -T "{node|short}\n" |
|
502 | $ hg -R packed tip -T "{node|short}\n" | |
413 | aa35859c02ea |
|
503 | aa35859c02ea | |
414 |
|
504 | |||
415 | $ cat >> $HGRCPATH <<EOF |
|
505 | $ cat >> $HGRCPATH <<EOF | |
416 | > [extensions] |
|
506 | > [extensions] | |
417 | > showtip = ! |
|
507 | > showtip = ! | |
418 | > EOF |
|
508 | > EOF | |
419 |
|
509 | |||
420 | Does not work on non-empty repo |
|
510 | Does not work on non-empty repo | |
421 |
|
511 | |||
422 | $ hg -R packed debugapplystreamclonebundle packed.hg |
|
512 | $ hg -R packed debugapplystreamclonebundle packed.hg | |
423 | abort: cannot apply stream clone bundle on non-empty repo |
|
513 | abort: cannot apply stream clone bundle on non-empty repo | |
424 | [255] |
|
514 | [255] | |
425 |
|
515 | |||
426 | #endif |
|
516 | #endif | |
427 |
|
517 | |||
428 | Create partial clones |
|
518 | Create partial clones | |
429 |
|
519 | |||
430 | $ rm -r empty |
|
520 | $ rm -r empty | |
431 | $ hg init empty |
|
521 | $ hg init empty | |
432 | $ hg clone -r 3 test partial |
|
522 | $ hg clone -r 3 test partial | |
433 | adding changesets |
|
523 | adding changesets | |
434 | adding manifests |
|
524 | adding manifests | |
435 | adding file changes |
|
525 | adding file changes | |
436 | added 4 changesets with 4 changes to 1 files |
|
526 | added 4 changesets with 4 changes to 1 files | |
437 | new changesets f9ee2f85a263:eebf5a27f8ca |
|
527 | new changesets f9ee2f85a263:eebf5a27f8ca | |
438 | updating to branch default |
|
528 | updating to branch default | |
439 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
529 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
440 | $ hg clone partial partial2 |
|
530 | $ hg clone partial partial2 | |
441 | updating to branch default |
|
531 | updating to branch default | |
442 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
532 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
443 | $ cd partial |
|
533 | $ cd partial | |
444 |
|
534 | |||
445 | #if repobundlerepo |
|
535 | #if repobundlerepo | |
446 |
|
536 | |||
447 | Log -R full.hg in partial |
|
537 | Log -R full.hg in partial | |
448 |
|
538 | |||
449 | $ hg -R bundle://../full.hg log -T phases |
|
539 | $ hg -R bundle://../full.hg log -T phases | |
450 | changeset: 8:aa35859c02ea |
|
540 | changeset: 8:aa35859c02ea | |
451 | tag: tip |
|
541 | tag: tip | |
452 | phase: draft |
|
542 | phase: draft | |
453 | parent: 3:eebf5a27f8ca |
|
543 | parent: 3:eebf5a27f8ca | |
454 | user: test |
|
544 | user: test | |
455 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
545 | date: Thu Jan 01 00:00:00 1970 +0000 | |
456 | summary: 0.3m |
|
546 | summary: 0.3m | |
457 |
|
547 | |||
458 | changeset: 7:a6a34bfa0076 |
|
548 | changeset: 7:a6a34bfa0076 | |
459 | phase: draft |
|
549 | phase: draft | |
460 | user: test |
|
550 | user: test | |
461 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
551 | date: Thu Jan 01 00:00:00 1970 +0000 | |
462 | summary: 1.3m |
|
552 | summary: 1.3m | |
463 |
|
553 | |||
464 | changeset: 6:7373c1169842 |
|
554 | changeset: 6:7373c1169842 | |
465 | phase: draft |
|
555 | phase: draft | |
466 | user: test |
|
556 | user: test | |
467 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
557 | date: Thu Jan 01 00:00:00 1970 +0000 | |
468 | summary: 1.3 |
|
558 | summary: 1.3 | |
469 |
|
559 | |||
470 | changeset: 5:1bb50a9436a7 |
|
560 | changeset: 5:1bb50a9436a7 | |
471 | phase: draft |
|
561 | phase: draft | |
472 | user: test |
|
562 | user: test | |
473 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
563 | date: Thu Jan 01 00:00:00 1970 +0000 | |
474 | summary: 1.2 |
|
564 | summary: 1.2 | |
475 |
|
565 | |||
476 | changeset: 4:095197eb4973 |
|
566 | changeset: 4:095197eb4973 | |
477 | phase: draft |
|
567 | phase: draft | |
478 | parent: 0:f9ee2f85a263 |
|
568 | parent: 0:f9ee2f85a263 | |
479 | user: test |
|
569 | user: test | |
480 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
570 | date: Thu Jan 01 00:00:00 1970 +0000 | |
481 | summary: 1.1 |
|
571 | summary: 1.1 | |
482 |
|
572 | |||
483 | changeset: 3:eebf5a27f8ca |
|
573 | changeset: 3:eebf5a27f8ca | |
484 | phase: public |
|
574 | phase: public | |
485 | user: test |
|
575 | user: test | |
486 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
576 | date: Thu Jan 01 00:00:00 1970 +0000 | |
487 | summary: 0.3 |
|
577 | summary: 0.3 | |
488 |
|
578 | |||
489 | changeset: 2:e38ba6f5b7e0 |
|
579 | changeset: 2:e38ba6f5b7e0 | |
490 | phase: public |
|
580 | phase: public | |
491 | user: test |
|
581 | user: test | |
492 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
582 | date: Thu Jan 01 00:00:00 1970 +0000 | |
493 | summary: 0.2 |
|
583 | summary: 0.2 | |
494 |
|
584 | |||
495 | changeset: 1:34c2bf6b0626 |
|
585 | changeset: 1:34c2bf6b0626 | |
496 | phase: public |
|
586 | phase: public | |
497 | user: test |
|
587 | user: test | |
498 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
588 | date: Thu Jan 01 00:00:00 1970 +0000 | |
499 | summary: 0.1 |
|
589 | summary: 0.1 | |
500 |
|
590 | |||
501 | changeset: 0:f9ee2f85a263 |
|
591 | changeset: 0:f9ee2f85a263 | |
502 | phase: public |
|
592 | phase: public | |
503 | user: test |
|
593 | user: test | |
504 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
594 | date: Thu Jan 01 00:00:00 1970 +0000 | |
505 | summary: 0.0 |
|
595 | summary: 0.0 | |
506 |
|
596 | |||
507 |
|
597 | |||
508 | Incoming full.hg in partial |
|
598 | Incoming full.hg in partial | |
509 |
|
599 | |||
510 | $ hg incoming bundle://../full.hg |
|
600 | $ hg incoming bundle://../full.hg | |
511 | comparing with bundle:../full.hg |
|
601 | comparing with bundle:../full.hg | |
512 | searching for changes |
|
602 | searching for changes | |
513 | changeset: 4:095197eb4973 |
|
603 | changeset: 4:095197eb4973 | |
514 | parent: 0:f9ee2f85a263 |
|
604 | parent: 0:f9ee2f85a263 | |
515 | user: test |
|
605 | user: test | |
516 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
606 | date: Thu Jan 01 00:00:00 1970 +0000 | |
517 | summary: 1.1 |
|
607 | summary: 1.1 | |
518 |
|
608 | |||
519 | changeset: 5:1bb50a9436a7 |
|
609 | changeset: 5:1bb50a9436a7 | |
520 | user: test |
|
610 | user: test | |
521 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
611 | date: Thu Jan 01 00:00:00 1970 +0000 | |
522 | summary: 1.2 |
|
612 | summary: 1.2 | |
523 |
|
613 | |||
524 | changeset: 6:7373c1169842 |
|
614 | changeset: 6:7373c1169842 | |
525 | user: test |
|
615 | user: test | |
526 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
616 | date: Thu Jan 01 00:00:00 1970 +0000 | |
527 | summary: 1.3 |
|
617 | summary: 1.3 | |
528 |
|
618 | |||
529 | changeset: 7:a6a34bfa0076 |
|
619 | changeset: 7:a6a34bfa0076 | |
530 | user: test |
|
620 | user: test | |
531 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
621 | date: Thu Jan 01 00:00:00 1970 +0000 | |
532 | summary: 1.3m |
|
622 | summary: 1.3m | |
533 |
|
623 | |||
534 | changeset: 8:aa35859c02ea |
|
624 | changeset: 8:aa35859c02ea | |
535 | tag: tip |
|
625 | tag: tip | |
536 | parent: 3:eebf5a27f8ca |
|
626 | parent: 3:eebf5a27f8ca | |
537 | user: test |
|
627 | user: test | |
538 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
628 | date: Thu Jan 01 00:00:00 1970 +0000 | |
539 | summary: 0.3m |
|
629 | summary: 0.3m | |
540 |
|
630 | |||
541 |
|
631 | |||
542 | Outgoing -R full.hg vs partial2 in partial |
|
632 | Outgoing -R full.hg vs partial2 in partial | |
543 |
|
633 | |||
544 | $ hg -R bundle://../full.hg outgoing ../partial2 |
|
634 | $ hg -R bundle://../full.hg outgoing ../partial2 | |
545 | comparing with ../partial2 |
|
635 | comparing with ../partial2 | |
546 | searching for changes |
|
636 | searching for changes | |
547 | changeset: 4:095197eb4973 |
|
637 | changeset: 4:095197eb4973 | |
548 | parent: 0:f9ee2f85a263 |
|
638 | parent: 0:f9ee2f85a263 | |
549 | user: test |
|
639 | user: test | |
550 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
640 | date: Thu Jan 01 00:00:00 1970 +0000 | |
551 | summary: 1.1 |
|
641 | summary: 1.1 | |
552 |
|
642 | |||
553 | changeset: 5:1bb50a9436a7 |
|
643 | changeset: 5:1bb50a9436a7 | |
554 | user: test |
|
644 | user: test | |
555 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
645 | date: Thu Jan 01 00:00:00 1970 +0000 | |
556 | summary: 1.2 |
|
646 | summary: 1.2 | |
557 |
|
647 | |||
558 | changeset: 6:7373c1169842 |
|
648 | changeset: 6:7373c1169842 | |
559 | user: test |
|
649 | user: test | |
560 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
650 | date: Thu Jan 01 00:00:00 1970 +0000 | |
561 | summary: 1.3 |
|
651 | summary: 1.3 | |
562 |
|
652 | |||
563 | changeset: 7:a6a34bfa0076 |
|
653 | changeset: 7:a6a34bfa0076 | |
564 | user: test |
|
654 | user: test | |
565 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
655 | date: Thu Jan 01 00:00:00 1970 +0000 | |
566 | summary: 1.3m |
|
656 | summary: 1.3m | |
567 |
|
657 | |||
568 | changeset: 8:aa35859c02ea |
|
658 | changeset: 8:aa35859c02ea | |
569 | tag: tip |
|
659 | tag: tip | |
570 | parent: 3:eebf5a27f8ca |
|
660 | parent: 3:eebf5a27f8ca | |
571 | user: test |
|
661 | user: test | |
572 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
662 | date: Thu Jan 01 00:00:00 1970 +0000 | |
573 | summary: 0.3m |
|
663 | summary: 0.3m | |
574 |
|
664 | |||
575 |
|
665 | |||
576 | Outgoing -R does-not-exist.hg vs partial2 in partial |
|
666 | Outgoing -R does-not-exist.hg vs partial2 in partial | |
577 |
|
667 | |||
578 | $ hg -R bundle://../does-not-exist.hg outgoing ../partial2 |
|
668 | $ hg -R bundle://../does-not-exist.hg outgoing ../partial2 | |
579 | abort: *../does-not-exist.hg* (glob) |
|
669 | abort: *../does-not-exist.hg* (glob) | |
580 | [255] |
|
670 | [255] | |
581 |
|
671 | |||
582 | #endif |
|
672 | #endif | |
583 |
|
673 | |||
584 | $ cd .. |
|
674 | $ cd .. | |
585 |
|
675 | |||
586 | hide outer repo |
|
676 | hide outer repo | |
587 | $ hg init |
|
677 | $ hg init | |
588 |
|
678 | |||
589 | Direct clone from bundle (all-history) |
|
679 | Direct clone from bundle (all-history) | |
590 |
|
680 | |||
591 | #if repobundlerepo |
|
681 | #if repobundlerepo | |
592 |
|
682 | |||
593 | $ hg clone full.hg full-clone |
|
683 | $ hg clone full.hg full-clone | |
594 | requesting all changes |
|
684 | requesting all changes | |
595 | adding changesets |
|
685 | adding changesets | |
596 | adding manifests |
|
686 | adding manifests | |
597 | adding file changes |
|
687 | adding file changes | |
598 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
688 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
599 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
|
689 | new changesets f9ee2f85a263:aa35859c02ea (9 drafts) | |
600 | updating to branch default |
|
690 | updating to branch default | |
601 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
691 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
602 | $ hg -R full-clone heads |
|
692 | $ hg -R full-clone heads | |
603 | changeset: 8:aa35859c02ea |
|
693 | changeset: 8:aa35859c02ea | |
604 | tag: tip |
|
694 | tag: tip | |
605 | parent: 3:eebf5a27f8ca |
|
695 | parent: 3:eebf5a27f8ca | |
606 | user: test |
|
696 | user: test | |
607 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
697 | date: Thu Jan 01 00:00:00 1970 +0000 | |
608 | summary: 0.3m |
|
698 | summary: 0.3m | |
609 |
|
699 | |||
610 | changeset: 7:a6a34bfa0076 |
|
700 | changeset: 7:a6a34bfa0076 | |
611 | user: test |
|
701 | user: test | |
612 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
702 | date: Thu Jan 01 00:00:00 1970 +0000 | |
613 | summary: 1.3m |
|
703 | summary: 1.3m | |
614 |
|
704 | |||
615 | $ rm -r full-clone |
|
705 | $ rm -r full-clone | |
616 |
|
706 | |||
617 | When cloning from a non-copiable repository into '', do not |
|
707 | When cloning from a non-copiable repository into '', do not | |
618 | recurse infinitely (issue2528) |
|
708 | recurse infinitely (issue2528) | |
619 |
|
709 | |||
620 | $ hg clone full.hg '' |
|
710 | $ hg clone full.hg '' | |
621 | abort: empty destination path is not valid |
|
711 | abort: empty destination path is not valid | |
622 | [10] |
|
712 | [10] | |
623 |
|
713 | |||
624 | test for https://bz.mercurial-scm.org/216 |
|
714 | test for https://bz.mercurial-scm.org/216 | |
625 |
|
715 | |||
626 | Unbundle incremental bundles into fresh empty in one go |
|
716 | Unbundle incremental bundles into fresh empty in one go | |
627 |
|
717 | |||
628 | $ rm -r empty |
|
718 | $ rm -r empty | |
629 | $ hg init empty |
|
719 | $ hg init empty | |
630 | $ hg -R test bundle --base null -r 0 ../0.hg |
|
720 | $ hg -R test bundle --base null -r 0 ../0.hg | |
631 | 1 changesets found |
|
721 | 1 changesets found | |
632 | $ hg -R test bundle --base 0 -r 1 ../1.hg |
|
722 | $ hg -R test bundle --base 0 -r 1 ../1.hg | |
633 | 1 changesets found |
|
723 | 1 changesets found | |
634 | $ hg -R empty unbundle -u ../0.hg ../1.hg |
|
724 | $ hg -R empty unbundle -u ../0.hg ../1.hg | |
635 | adding changesets |
|
725 | adding changesets | |
636 | adding manifests |
|
726 | adding manifests | |
637 | adding file changes |
|
727 | adding file changes | |
638 | added 1 changesets with 1 changes to 1 files |
|
728 | added 1 changesets with 1 changes to 1 files | |
639 | new changesets f9ee2f85a263 (1 drafts) |
|
729 | new changesets f9ee2f85a263 (1 drafts) | |
640 | adding changesets |
|
730 | adding changesets | |
641 | adding manifests |
|
731 | adding manifests | |
642 | adding file changes |
|
732 | adding file changes | |
643 | added 1 changesets with 1 changes to 1 files |
|
733 | added 1 changesets with 1 changes to 1 files | |
644 | new changesets 34c2bf6b0626 (1 drafts) |
|
734 | new changesets 34c2bf6b0626 (1 drafts) | |
645 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
735 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
646 |
|
736 | |||
647 | View full contents of the bundle |
|
737 | View full contents of the bundle | |
648 | $ hg -R test bundle --base null -r 3 ../partial.hg |
|
738 | $ hg -R test bundle --base null -r 3 ../partial.hg | |
649 | 4 changesets found |
|
739 | 4 changesets found | |
650 | $ cd test |
|
740 | $ cd test | |
651 | $ hg -R ../../partial.hg log -r "bundle()" |
|
741 | $ hg -R ../../partial.hg log -r "bundle()" | |
652 | changeset: 0:f9ee2f85a263 |
|
742 | changeset: 0:f9ee2f85a263 | |
653 | user: test |
|
743 | user: test | |
654 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
744 | date: Thu Jan 01 00:00:00 1970 +0000 | |
655 | summary: 0.0 |
|
745 | summary: 0.0 | |
656 |
|
746 | |||
657 | changeset: 1:34c2bf6b0626 |
|
747 | changeset: 1:34c2bf6b0626 | |
658 | user: test |
|
748 | user: test | |
659 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
749 | date: Thu Jan 01 00:00:00 1970 +0000 | |
660 | summary: 0.1 |
|
750 | summary: 0.1 | |
661 |
|
751 | |||
662 | changeset: 2:e38ba6f5b7e0 |
|
752 | changeset: 2:e38ba6f5b7e0 | |
663 | user: test |
|
753 | user: test | |
664 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
754 | date: Thu Jan 01 00:00:00 1970 +0000 | |
665 | summary: 0.2 |
|
755 | summary: 0.2 | |
666 |
|
756 | |||
667 | changeset: 3:eebf5a27f8ca |
|
757 | changeset: 3:eebf5a27f8ca | |
668 | user: test |
|
758 | user: test | |
669 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
759 | date: Thu Jan 01 00:00:00 1970 +0000 | |
670 | summary: 0.3 |
|
760 | summary: 0.3 | |
671 |
|
761 | |||
672 | $ cd .. |
|
762 | $ cd .. | |
673 |
|
763 | |||
674 | #endif |
|
764 | #endif | |
675 |
|
765 | |||
676 | test for 540d1059c802 |
|
766 | test for 540d1059c802 | |
677 |
|
767 | |||
678 | $ hg init orig |
|
768 | $ hg init orig | |
679 | $ cd orig |
|
769 | $ cd orig | |
680 | $ echo foo > foo |
|
770 | $ echo foo > foo | |
681 | $ hg add foo |
|
771 | $ hg add foo | |
682 | $ hg ci -m 'add foo' |
|
772 | $ hg ci -m 'add foo' | |
683 |
|
773 | |||
684 | $ hg clone . ../copy |
|
774 | $ hg clone . ../copy | |
685 | updating to branch default |
|
775 | updating to branch default | |
686 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
776 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
687 | $ hg tag foo |
|
777 | $ hg tag foo | |
688 |
|
778 | |||
689 | $ cd ../copy |
|
779 | $ cd ../copy | |
690 | $ echo >> foo |
|
780 | $ echo >> foo | |
691 | $ hg ci -m 'change foo' |
|
781 | $ hg ci -m 'change foo' | |
692 | $ hg bundle ../bundle.hg ../orig |
|
782 | $ hg bundle ../bundle.hg ../orig | |
693 | searching for changes |
|
783 | searching for changes | |
694 | 1 changesets found |
|
784 | 1 changesets found | |
695 |
|
785 | |||
696 | $ cd .. |
|
786 | $ cd .. | |
697 |
|
787 | |||
698 | #if repobundlerepo |
|
788 | #if repobundlerepo | |
699 | $ cd orig |
|
789 | $ cd orig | |
700 | $ hg incoming ../bundle.hg |
|
790 | $ hg incoming ../bundle.hg | |
701 | comparing with ../bundle.hg |
|
791 | comparing with ../bundle.hg | |
702 | searching for changes |
|
792 | searching for changes | |
703 | changeset: 2:ed1b79f46b9a |
|
793 | changeset: 2:ed1b79f46b9a | |
704 | tag: tip |
|
794 | tag: tip | |
705 | parent: 0:bbd179dfa0a7 |
|
795 | parent: 0:bbd179dfa0a7 | |
706 | user: test |
|
796 | user: test | |
707 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
797 | date: Thu Jan 01 00:00:00 1970 +0000 | |
708 | summary: change foo |
|
798 | summary: change foo | |
709 |
|
799 | |||
710 | $ cd .. |
|
800 | $ cd .. | |
711 |
|
801 | |||
712 | test bundle with # in the filename (issue2154): |
|
802 | test bundle with # in the filename (issue2154): | |
713 |
|
803 | |||
714 | $ cp bundle.hg 'test#bundle.hg' |
|
804 | $ cp bundle.hg 'test#bundle.hg' | |
715 | $ cd orig |
|
805 | $ cd orig | |
716 | $ hg incoming '../test#bundle.hg' |
|
806 | $ hg incoming '../test#bundle.hg' | |
717 | comparing with ../test |
|
807 | comparing with ../test | |
718 | abort: unknown revision 'bundle.hg' |
|
808 | abort: unknown revision 'bundle.hg' | |
719 | [10] |
|
809 | [10] | |
720 |
|
810 | |||
721 | note that percent encoding is not handled: |
|
811 | note that percent encoding is not handled: | |
722 |
|
812 | |||
723 | $ hg incoming ../test%23bundle.hg |
|
813 | $ hg incoming ../test%23bundle.hg | |
724 | abort: repository ../test%23bundle.hg not found |
|
814 | abort: repository ../test%23bundle.hg not found | |
725 | [255] |
|
815 | [255] | |
726 | $ cd .. |
|
816 | $ cd .. | |
727 |
|
817 | |||
728 | #endif |
|
818 | #endif | |
729 |
|
819 | |||
730 | test to bundle revisions on the newly created branch (issue3828): |
|
820 | test to bundle revisions on the newly created branch (issue3828): | |
731 |
|
821 | |||
732 | $ hg -q clone -U test test-clone |
|
822 | $ hg -q clone -U test test-clone | |
733 | $ cd test |
|
823 | $ cd test | |
734 |
|
824 | |||
735 | $ hg -q branch foo |
|
825 | $ hg -q branch foo | |
736 | $ hg commit -m "create foo branch" |
|
826 | $ hg commit -m "create foo branch" | |
737 | $ hg -q outgoing ../test-clone |
|
827 | $ hg -q outgoing ../test-clone | |
738 | 9:b4f5acb1ee27 |
|
828 | 9:b4f5acb1ee27 | |
739 | $ hg -q bundle --branch foo foo.hg ../test-clone |
|
829 | $ hg -q bundle --branch foo foo.hg ../test-clone | |
740 | #if repobundlerepo |
|
830 | #if repobundlerepo | |
741 | $ hg -R foo.hg -q log -r "bundle()" |
|
831 | $ hg -R foo.hg -q log -r "bundle()" | |
742 | 9:b4f5acb1ee27 |
|
832 | 9:b4f5acb1ee27 | |
743 | #endif |
|
833 | #endif | |
744 |
|
834 | |||
745 | $ cd .. |
|
835 | $ cd .. | |
746 |
|
836 | |||
747 | test for https://bz.mercurial-scm.org/1144 |
|
837 | test for https://bz.mercurial-scm.org/1144 | |
748 |
|
838 | |||
749 | test that verify bundle does not traceback |
|
839 | test that verify bundle does not traceback | |
750 |
|
840 | |||
751 | partial history bundle, fails w/ unknown parent |
|
841 | partial history bundle, fails w/ unknown parent | |
752 |
|
842 | |||
753 | $ hg -R bundle.hg verify |
|
843 | $ hg -R bundle.hg verify | |
754 | abort: 00changelog@bbd179dfa0a71671c253b3ae0aa1513b60d199fa: unknown parent |
|
844 | abort: 00changelog@bbd179dfa0a71671c253b3ae0aa1513b60d199fa: unknown parent | |
755 | [50] |
|
845 | [50] | |
756 |
|
846 | |||
757 | full history bundle, refuses to verify non-local repo |
|
847 | full history bundle, refuses to verify non-local repo | |
758 |
|
848 | |||
759 | #if repobundlerepo |
|
849 | #if repobundlerepo | |
760 | $ hg -R all.hg verify |
|
850 | $ hg -R all.hg verify | |
761 | abort: cannot verify bundle or remote repos |
|
851 | abort: cannot verify bundle or remote repos | |
762 | [255] |
|
852 | [255] | |
763 | #endif |
|
853 | #endif | |
764 |
|
854 | |||
765 | but, regular verify must continue to work |
|
855 | but, regular verify must continue to work | |
766 |
|
856 | |||
767 | $ hg -R orig verify |
|
857 | $ hg -R orig verify | |
768 | checking changesets |
|
858 | checking changesets | |
769 | checking manifests |
|
859 | checking manifests | |
770 | crosschecking files in changesets and manifests |
|
860 | crosschecking files in changesets and manifests | |
771 | checking files |
|
861 | checking files | |
772 | checked 2 changesets with 2 changes to 2 files |
|
862 | checked 2 changesets with 2 changes to 2 files | |
773 |
|
863 | |||
774 | #if repobundlerepo |
|
864 | #if repobundlerepo | |
775 | diff against bundle |
|
865 | diff against bundle | |
776 |
|
866 | |||
777 | $ hg init b |
|
867 | $ hg init b | |
778 | $ cd b |
|
868 | $ cd b | |
779 | $ hg -R ../all.hg diff -r tip |
|
869 | $ hg -R ../all.hg diff -r tip | |
780 | diff -r aa35859c02ea anotherfile |
|
870 | diff -r aa35859c02ea anotherfile | |
781 | --- a/anotherfile Thu Jan 01 00:00:00 1970 +0000 |
|
871 | --- a/anotherfile Thu Jan 01 00:00:00 1970 +0000 | |
782 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
872 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
783 | @@ -1,4 +0,0 @@ |
|
873 | @@ -1,4 +0,0 @@ | |
784 | -0 |
|
874 | -0 | |
785 | -1 |
|
875 | -1 | |
786 | -2 |
|
876 | -2 | |
787 | -3 |
|
877 | -3 | |
788 | $ cd .. |
|
878 | $ cd .. | |
789 | #endif |
|
879 | #endif | |
790 |
|
880 | |||
791 | bundle single branch |
|
881 | bundle single branch | |
792 |
|
882 | |||
793 | $ hg init branchy |
|
883 | $ hg init branchy | |
794 | $ cd branchy |
|
884 | $ cd branchy | |
795 | $ echo a >a |
|
885 | $ echo a >a | |
796 | $ echo x >x |
|
886 | $ echo x >x | |
797 | $ hg ci -Ama |
|
887 | $ hg ci -Ama | |
798 | adding a |
|
888 | adding a | |
799 | adding x |
|
889 | adding x | |
800 | $ echo c >c |
|
890 | $ echo c >c | |
801 | $ echo xx >x |
|
891 | $ echo xx >x | |
802 | $ hg ci -Amc |
|
892 | $ hg ci -Amc | |
803 | adding c |
|
893 | adding c | |
804 | $ echo c1 >c1 |
|
894 | $ echo c1 >c1 | |
805 | $ hg ci -Amc1 |
|
895 | $ hg ci -Amc1 | |
806 | adding c1 |
|
896 | adding c1 | |
807 | $ hg up 0 |
|
897 | $ hg up 0 | |
808 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
898 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
809 | $ echo b >b |
|
899 | $ echo b >b | |
810 | $ hg ci -Amb |
|
900 | $ hg ci -Amb | |
811 | adding b |
|
901 | adding b | |
812 | created new head |
|
902 | created new head | |
813 | $ echo b1 >b1 |
|
903 | $ echo b1 >b1 | |
814 | $ echo xx >x |
|
904 | $ echo xx >x | |
815 | $ hg ci -Amb1 |
|
905 | $ hg ci -Amb1 | |
816 | adding b1 |
|
906 | adding b1 | |
817 | $ hg clone -q -r2 . part |
|
907 | $ hg clone -q -r2 . part | |
818 |
|
908 | |||
819 | == bundling via incoming |
|
909 | == bundling via incoming | |
820 |
|
910 | |||
821 | $ hg in -R part --bundle incoming.hg --template "{node}\n" . |
|
911 | $ hg in -R part --bundle incoming.hg --template "{node}\n" . | |
822 | comparing with . |
|
912 | comparing with . | |
823 | searching for changes |
|
913 | searching for changes | |
824 | 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a |
|
914 | 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a | |
825 | 057f4db07f61970e1c11e83be79e9d08adc4dc31 |
|
915 | 057f4db07f61970e1c11e83be79e9d08adc4dc31 | |
826 |
|
916 | |||
827 | == bundling |
|
917 | == bundling | |
828 |
|
918 | |||
829 | $ hg bundle bundle.hg part --debug --config progress.debug=true |
|
919 | $ hg bundle bundle.hg part --debug --config progress.debug=true | |
830 | query 1; heads |
|
920 | query 1; heads | |
831 | searching for changes |
|
921 | searching for changes | |
832 | all remote heads known locally |
|
922 | all remote heads known locally | |
833 | 2 changesets found |
|
923 | 2 changesets found | |
834 | list of changesets: |
|
924 | list of changesets: | |
835 | 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a |
|
925 | 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a | |
836 | 057f4db07f61970e1c11e83be79e9d08adc4dc31 |
|
926 | 057f4db07f61970e1c11e83be79e9d08adc4dc31 | |
837 | bundle2-output-bundle: "HG20", (1 params) 2 parts total |
|
927 | bundle2-output-bundle: "HG20", (1 params) 2 parts total | |
838 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload |
|
928 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload | |
839 | changesets: 1/2 chunks (50.00%) |
|
929 | changesets: 1/2 chunks (50.00%) | |
840 | changesets: 2/2 chunks (100.00%) |
|
930 | changesets: 2/2 chunks (100.00%) | |
841 | manifests: 1/2 chunks (50.00%) |
|
931 | manifests: 1/2 chunks (50.00%) | |
842 | manifests: 2/2 chunks (100.00%) |
|
932 | manifests: 2/2 chunks (100.00%) | |
843 | files: b 1/3 files (33.33%) |
|
933 | files: b 1/3 files (33.33%) | |
844 | files: b1 2/3 files (66.67%) |
|
934 | files: b1 2/3 files (66.67%) | |
845 | files: x 3/3 files (100.00%) |
|
935 | files: x 3/3 files (100.00%) | |
846 | bundle2-output-part: "cache:rev-branch-cache" (advisory) streamed payload |
|
936 | bundle2-output-part: "cache:rev-branch-cache" (advisory) streamed payload | |
847 |
|
937 | |||
848 | #if repobundlerepo |
|
938 | #if repobundlerepo | |
849 | == Test for issue3441 |
|
939 | == Test for issue3441 | |
850 |
|
940 | |||
851 | $ hg clone -q -r0 . part2 |
|
941 | $ hg clone -q -r0 . part2 | |
852 | $ hg -q -R part2 pull bundle.hg |
|
942 | $ hg -q -R part2 pull bundle.hg | |
853 | $ hg -R part2 verify |
|
943 | $ hg -R part2 verify | |
854 | checking changesets |
|
944 | checking changesets | |
855 | checking manifests |
|
945 | checking manifests | |
856 | crosschecking files in changesets and manifests |
|
946 | crosschecking files in changesets and manifests | |
857 | checking files |
|
947 | checking files | |
858 | checked 3 changesets with 5 changes to 4 files |
|
948 | checked 3 changesets with 5 changes to 4 files | |
859 | #endif |
|
949 | #endif | |
860 |
|
950 | |||
861 | == Test bundling no commits |
|
951 | == Test bundling no commits | |
862 |
|
952 | |||
863 | $ hg bundle -r 'public()' no-output.hg |
|
953 | $ hg bundle -r 'public()' no-output.hg | |
864 | abort: no commits to bundle |
|
954 | abort: no commits to bundle | |
865 | [10] |
|
955 | [10] | |
866 |
|
956 | |||
867 | $ cd .. |
|
957 | $ cd .. | |
868 |
|
958 | |||
869 | When user merges to the revision existing only in the bundle, |
|
959 | When user merges to the revision existing only in the bundle, | |
870 | it should show warning that second parent of the working |
|
960 | it should show warning that second parent of the working | |
871 | directory does not exist |
|
961 | directory does not exist | |
872 |
|
962 | |||
873 | $ hg init update2bundled |
|
963 | $ hg init update2bundled | |
874 | $ cd update2bundled |
|
964 | $ cd update2bundled | |
875 | $ cat <<EOF >> .hg/hgrc |
|
965 | $ cat <<EOF >> .hg/hgrc | |
876 | > [extensions] |
|
966 | > [extensions] | |
877 | > strip = |
|
967 | > strip = | |
878 | > EOF |
|
968 | > EOF | |
879 | $ echo "aaa" >> a |
|
969 | $ echo "aaa" >> a | |
880 | $ hg commit -A -m 0 |
|
970 | $ hg commit -A -m 0 | |
881 | adding a |
|
971 | adding a | |
882 | $ echo "bbb" >> b |
|
972 | $ echo "bbb" >> b | |
883 | $ hg commit -A -m 1 |
|
973 | $ hg commit -A -m 1 | |
884 | adding b |
|
974 | adding b | |
885 | $ echo "ccc" >> c |
|
975 | $ echo "ccc" >> c | |
886 | $ hg commit -A -m 2 |
|
976 | $ hg commit -A -m 2 | |
887 | adding c |
|
977 | adding c | |
888 | $ hg update -r 1 |
|
978 | $ hg update -r 1 | |
889 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
979 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
890 | $ echo "ddd" >> d |
|
980 | $ echo "ddd" >> d | |
891 | $ hg commit -A -m 3 |
|
981 | $ hg commit -A -m 3 | |
892 | adding d |
|
982 | adding d | |
893 | created new head |
|
983 | created new head | |
894 | $ hg update -r 2 |
|
984 | $ hg update -r 2 | |
895 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
985 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
896 | $ hg log -G |
|
986 | $ hg log -G | |
897 | o changeset: 3:8bd3e1f196af |
|
987 | o changeset: 3:8bd3e1f196af | |
898 | | tag: tip |
|
988 | | tag: tip | |
899 | | parent: 1:a01eca7af26d |
|
989 | | parent: 1:a01eca7af26d | |
900 | | user: test |
|
990 | | user: test | |
901 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
991 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
902 | | summary: 3 |
|
992 | | summary: 3 | |
903 | | |
|
993 | | | |
904 | | @ changeset: 2:4652c276ac4f |
|
994 | | @ changeset: 2:4652c276ac4f | |
905 | |/ user: test |
|
995 | |/ user: test | |
906 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
996 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
907 | | summary: 2 |
|
997 | | summary: 2 | |
908 | | |
|
998 | | | |
909 | o changeset: 1:a01eca7af26d |
|
999 | o changeset: 1:a01eca7af26d | |
910 | | user: test |
|
1000 | | user: test | |
911 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1001 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
912 | | summary: 1 |
|
1002 | | summary: 1 | |
913 | | |
|
1003 | | | |
914 | o changeset: 0:4fe08cd4693e |
|
1004 | o changeset: 0:4fe08cd4693e | |
915 | user: test |
|
1005 | user: test | |
916 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1006 | date: Thu Jan 01 00:00:00 1970 +0000 | |
917 | summary: 0 |
|
1007 | summary: 0 | |
918 |
|
1008 | |||
919 |
|
1009 | |||
920 | #if repobundlerepo |
|
1010 | #if repobundlerepo | |
921 | $ hg bundle --base 1 -r 3 ../update2bundled.hg |
|
1011 | $ hg bundle --base 1 -r 3 ../update2bundled.hg | |
922 | 1 changesets found |
|
1012 | 1 changesets found | |
923 | $ hg strip -r 3 |
|
1013 | $ hg strip -r 3 | |
924 | saved backup bundle to $TESTTMP/update2bundled/.hg/strip-backup/8bd3e1f196af-017e56d8-backup.hg |
|
1014 | saved backup bundle to $TESTTMP/update2bundled/.hg/strip-backup/8bd3e1f196af-017e56d8-backup.hg | |
925 | $ hg merge -R ../update2bundled.hg -r 3 |
|
1015 | $ hg merge -R ../update2bundled.hg -r 3 | |
926 | setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle |
|
1016 | setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle | |
927 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1017 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
928 | (branch merge, don't forget to commit) |
|
1018 | (branch merge, don't forget to commit) | |
929 |
|
1019 | |||
930 | When user updates to the revision existing only in the bundle, |
|
1020 | When user updates to the revision existing only in the bundle, | |
931 | it should show warning |
|
1021 | it should show warning | |
932 |
|
1022 | |||
933 | $ hg update -R ../update2bundled.hg --clean -r 3 |
|
1023 | $ hg update -R ../update2bundled.hg --clean -r 3 | |
934 | setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle |
|
1024 | setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle | |
935 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1025 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
936 |
|
1026 | |||
937 | When user updates to the revision existing in the local repository |
|
1027 | When user updates to the revision existing in the local repository | |
938 | the warning shouldn't be emitted |
|
1028 | the warning shouldn't be emitted | |
939 |
|
1029 | |||
940 | $ hg update -R ../update2bundled.hg -r 0 |
|
1030 | $ hg update -R ../update2bundled.hg -r 0 | |
941 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1031 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
942 | #endif |
|
1032 | #endif | |
943 |
|
1033 | |||
944 | Test the option that create slim bundle |
|
1034 | Test the option that create slim bundle | |
945 |
|
1035 | |||
946 | $ hg bundle -a --config devel.bundle.delta=p1 ./slim.hg |
|
1036 | $ hg bundle -a --config devel.bundle.delta=p1 ./slim.hg | |
947 | 3 changesets found |
|
1037 | 3 changesets found | |
948 |
|
1038 | |||
949 | Test the option that create and no-delta's bundle |
|
1039 | Test the option that create and no-delta's bundle | |
950 | $ hg bundle -a --config devel.bundle.delta=full ./full.hg |
|
1040 | $ hg bundle -a --config devel.bundle.delta=full ./full.hg | |
951 | 3 changesets found |
|
1041 | 3 changesets found |
General Comments 0
You need to be logged in to leave comments.
Login now