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