##// END OF EJS Templates
bundle: exit early when there are no commits to bundle...
Durham Goode -
r27911:645e7884 stable
parent child Browse files
Show More

The requested changes are too big and content was truncated. Show full diff

1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
@@ -1,731 +1,735 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 $ echo "[hooks]" >> .hg/hgrc
219 $ echo "[hooks]" >> .hg/hgrc
220 $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc
220 $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc
221
221
222 doesn't work (yet ?)
222 doesn't work (yet ?)
223
223
224 hg -R bundle://../full.hg verify
224 hg -R bundle://../full.hg verify
225
225
226 $ hg pull bundle://../full.hg
226 $ hg pull bundle://../full.hg
227 pulling from bundle:../full.hg
227 pulling from bundle:../full.hg
228 requesting all changes
228 requesting all changes
229 adding changesets
229 adding changesets
230 adding manifests
230 adding manifests
231 adding file changes
231 adding file changes
232 added 9 changesets with 7 changes to 4 files (+1 heads)
232 added 9 changesets with 7 changes to 4 files (+1 heads)
233 changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=bundle:../full.hg (glob)
233 changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=bundle:../full.hg (glob)
234 (run 'hg heads' to see heads, 'hg merge' to merge)
234 (run 'hg heads' to see heads, 'hg merge' to merge)
235
235
236 Rollback empty
236 Rollback empty
237
237
238 $ hg rollback
238 $ hg rollback
239 repository tip rolled back to revision -1 (undo pull)
239 repository tip rolled back to revision -1 (undo pull)
240 $ cd ..
240 $ cd ..
241
241
242 Log -R bundle:empty+full.hg
242 Log -R bundle:empty+full.hg
243
243
244 $ hg -R bundle:empty+full.hg log --template="{rev} "; echo ""
244 $ hg -R bundle:empty+full.hg log --template="{rev} "; echo ""
245 8 7 6 5 4 3 2 1 0
245 8 7 6 5 4 3 2 1 0
246
246
247 Pull full.hg into empty again (using -R; with hook)
247 Pull full.hg into empty again (using -R; with hook)
248
248
249 $ hg -R empty pull full.hg
249 $ hg -R empty pull full.hg
250 pulling from full.hg
250 pulling from full.hg
251 requesting all changes
251 requesting all changes
252 adding changesets
252 adding changesets
253 adding manifests
253 adding manifests
254 adding file changes
254 adding file changes
255 added 9 changesets with 7 changes to 4 files (+1 heads)
255 added 9 changesets with 7 changes to 4 files (+1 heads)
256 changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=bundle:empty+full.hg (glob)
256 changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=bundle:empty+full.hg (glob)
257 (run 'hg heads' to see heads, 'hg merge' to merge)
257 (run 'hg heads' to see heads, 'hg merge' to merge)
258
258
259 Cannot produce streaming clone bundles with "hg bundle"
259 Cannot produce streaming clone bundles with "hg bundle"
260
260
261 $ hg -R test bundle -t packed1 packed.hg
261 $ hg -R test bundle -t packed1 packed.hg
262 abort: packed bundles cannot be produced by "hg bundle"
262 abort: packed bundles cannot be produced by "hg bundle"
263 (use "hg debugcreatestreamclonebundle")
263 (use "hg debugcreatestreamclonebundle")
264 [255]
264 [255]
265
265
266 packed1 is produced properly
266 packed1 is produced properly
267
267
268 $ hg -R test debugcreatestreamclonebundle packed.hg
268 $ hg -R test debugcreatestreamclonebundle packed.hg
269 writing 2663 bytes for 6 files
269 writing 2663 bytes for 6 files
270 bundle requirements: generaldelta, revlogv1
270 bundle requirements: generaldelta, revlogv1
271
271
272 $ f -B 64 --size --sha1 --hexdump packed.hg
272 $ f -B 64 --size --sha1 --hexdump packed.hg
273 packed.hg: size=2826, sha1=e139f97692a142b19cdcff64a69697d5307ce6d4
273 packed.hg: size=2826, sha1=e139f97692a142b19cdcff64a69697d5307ce6d4
274 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........|
274 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........|
275 0010: 00 00 00 00 0a 67 00 16 67 65 6e 65 72 61 6c 64 |.....g..generald|
275 0010: 00 00 00 00 0a 67 00 16 67 65 6e 65 72 61 6c 64 |.....g..generald|
276 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 00 64 61 |elta,revlogv1.da|
276 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 00 64 61 |elta,revlogv1.da|
277 0030: 74 61 2f 61 64 69 66 66 65 72 65 6e 74 66 69 6c |ta/adifferentfil|
277 0030: 74 61 2f 61 64 69 66 66 65 72 65 6e 74 66 69 6c |ta/adifferentfil|
278
278
279 $ hg debugbundle --spec packed.hg
279 $ hg debugbundle --spec packed.hg
280 none-packed1;requirements%3Dgeneraldelta%2Crevlogv1
280 none-packed1;requirements%3Dgeneraldelta%2Crevlogv1
281
281
282 generaldelta requirement is listed in stream clone bundles
282 generaldelta requirement is listed in stream clone bundles
283
283
284 $ hg --config format.generaldelta=true init testgd
284 $ hg --config format.generaldelta=true init testgd
285 $ cd testgd
285 $ cd testgd
286 $ touch foo
286 $ touch foo
287 $ hg -q commit -A -m initial
287 $ hg -q commit -A -m initial
288 $ cd ..
288 $ cd ..
289 $ hg -R testgd debugcreatestreamclonebundle packedgd.hg
289 $ hg -R testgd debugcreatestreamclonebundle packedgd.hg
290 writing 301 bytes for 3 files
290 writing 301 bytes for 3 files
291 bundle requirements: generaldelta, revlogv1
291 bundle requirements: generaldelta, revlogv1
292
292
293 $ f -B 64 --size --sha1 --hexdump packedgd.hg
293 $ f -B 64 --size --sha1 --hexdump packedgd.hg
294 packedgd.hg: size=396, sha1=981f9e589799335304a5a9a44caa3623a48d2a9f
294 packedgd.hg: size=396, sha1=981f9e589799335304a5a9a44caa3623a48d2a9f
295 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 03 00 00 |HGS1UN..........|
295 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 03 00 00 |HGS1UN..........|
296 0010: 00 00 00 00 01 2d 00 16 67 65 6e 65 72 61 6c 64 |.....-..generald|
296 0010: 00 00 00 00 01 2d 00 16 67 65 6e 65 72 61 6c 64 |.....-..generald|
297 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 00 64 61 |elta,revlogv1.da|
297 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 00 64 61 |elta,revlogv1.da|
298 0030: 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 03 00 01 |ta/foo.i.64.....|
298 0030: 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 03 00 01 |ta/foo.i.64.....|
299
299
300 $ hg debugbundle --spec packedgd.hg
300 $ hg debugbundle --spec packedgd.hg
301 none-packed1;requirements%3Dgeneraldelta%2Crevlogv1
301 none-packed1;requirements%3Dgeneraldelta%2Crevlogv1
302
302
303 Unpacking packed1 bundles with "hg unbundle" isn't allowed
303 Unpacking packed1 bundles with "hg unbundle" isn't allowed
304
304
305 $ hg init packed
305 $ hg init packed
306 $ hg -R packed unbundle packed.hg
306 $ hg -R packed unbundle packed.hg
307 abort: packed bundles cannot be applied with "hg unbundle"
307 abort: packed bundles cannot be applied with "hg unbundle"
308 (use "hg debugapplystreamclonebundle")
308 (use "hg debugapplystreamclonebundle")
309 [255]
309 [255]
310
310
311 packed1 can be consumed from debug command
311 packed1 can be consumed from debug command
312
312
313 $ hg -R packed debugapplystreamclonebundle packed.hg
313 $ hg -R packed debugapplystreamclonebundle packed.hg
314 6 files to transfer, 2.60 KB of data
314 6 files to transfer, 2.60 KB of data
315 transferred 2.60 KB in *.* seconds (* */sec) (glob)
315 transferred 2.60 KB in *.* seconds (* */sec) (glob)
316
316
317 Does not work on non-empty repo
317 Does not work on non-empty repo
318
318
319 $ hg -R packed debugapplystreamclonebundle packed.hg
319 $ hg -R packed debugapplystreamclonebundle packed.hg
320 abort: cannot apply stream clone bundle on non-empty repo
320 abort: cannot apply stream clone bundle on non-empty repo
321 [255]
321 [255]
322
322
323 Create partial clones
323 Create partial clones
324
324
325 $ rm -r empty
325 $ rm -r empty
326 $ hg init empty
326 $ hg init empty
327 $ hg clone -r 3 test partial
327 $ hg clone -r 3 test partial
328 adding changesets
328 adding changesets
329 adding manifests
329 adding manifests
330 adding file changes
330 adding file changes
331 added 4 changesets with 4 changes to 1 files
331 added 4 changesets with 4 changes to 1 files
332 updating to branch default
332 updating to branch default
333 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
333 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
334 $ hg clone partial partial2
334 $ hg clone partial partial2
335 updating to branch default
335 updating to branch default
336 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
336 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
337 $ cd partial
337 $ cd partial
338
338
339 Log -R full.hg in partial
339 Log -R full.hg in partial
340
340
341 $ hg -R bundle://../full.hg log -T phases
341 $ hg -R bundle://../full.hg log -T phases
342 changeset: 8:aa35859c02ea
342 changeset: 8:aa35859c02ea
343 tag: tip
343 tag: tip
344 phase: draft
344 phase: draft
345 parent: 3:eebf5a27f8ca
345 parent: 3:eebf5a27f8ca
346 user: test
346 user: test
347 date: Thu Jan 01 00:00:00 1970 +0000
347 date: Thu Jan 01 00:00:00 1970 +0000
348 summary: 0.3m
348 summary: 0.3m
349
349
350 changeset: 7:a6a34bfa0076
350 changeset: 7:a6a34bfa0076
351 phase: draft
351 phase: draft
352 user: test
352 user: test
353 date: Thu Jan 01 00:00:00 1970 +0000
353 date: Thu Jan 01 00:00:00 1970 +0000
354 summary: 1.3m
354 summary: 1.3m
355
355
356 changeset: 6:7373c1169842
356 changeset: 6:7373c1169842
357 phase: draft
357 phase: draft
358 user: test
358 user: test
359 date: Thu Jan 01 00:00:00 1970 +0000
359 date: Thu Jan 01 00:00:00 1970 +0000
360 summary: 1.3
360 summary: 1.3
361
361
362 changeset: 5:1bb50a9436a7
362 changeset: 5:1bb50a9436a7
363 phase: draft
363 phase: draft
364 user: test
364 user: test
365 date: Thu Jan 01 00:00:00 1970 +0000
365 date: Thu Jan 01 00:00:00 1970 +0000
366 summary: 1.2
366 summary: 1.2
367
367
368 changeset: 4:095197eb4973
368 changeset: 4:095197eb4973
369 phase: draft
369 phase: draft
370 parent: 0:f9ee2f85a263
370 parent: 0:f9ee2f85a263
371 user: test
371 user: test
372 date: Thu Jan 01 00:00:00 1970 +0000
372 date: Thu Jan 01 00:00:00 1970 +0000
373 summary: 1.1
373 summary: 1.1
374
374
375 changeset: 3:eebf5a27f8ca
375 changeset: 3:eebf5a27f8ca
376 phase: public
376 phase: public
377 user: test
377 user: test
378 date: Thu Jan 01 00:00:00 1970 +0000
378 date: Thu Jan 01 00:00:00 1970 +0000
379 summary: 0.3
379 summary: 0.3
380
380
381 changeset: 2:e38ba6f5b7e0
381 changeset: 2:e38ba6f5b7e0
382 phase: public
382 phase: public
383 user: test
383 user: test
384 date: Thu Jan 01 00:00:00 1970 +0000
384 date: Thu Jan 01 00:00:00 1970 +0000
385 summary: 0.2
385 summary: 0.2
386
386
387 changeset: 1:34c2bf6b0626
387 changeset: 1:34c2bf6b0626
388 phase: public
388 phase: public
389 user: test
389 user: test
390 date: Thu Jan 01 00:00:00 1970 +0000
390 date: Thu Jan 01 00:00:00 1970 +0000
391 summary: 0.1
391 summary: 0.1
392
392
393 changeset: 0:f9ee2f85a263
393 changeset: 0:f9ee2f85a263
394 phase: public
394 phase: public
395 user: test
395 user: test
396 date: Thu Jan 01 00:00:00 1970 +0000
396 date: Thu Jan 01 00:00:00 1970 +0000
397 summary: 0.0
397 summary: 0.0
398
398
399
399
400 Incoming full.hg in partial
400 Incoming full.hg in partial
401
401
402 $ hg incoming bundle://../full.hg
402 $ hg incoming bundle://../full.hg
403 comparing with bundle:../full.hg
403 comparing with bundle:../full.hg
404 searching for changes
404 searching for changes
405 changeset: 4:095197eb4973
405 changeset: 4:095197eb4973
406 parent: 0:f9ee2f85a263
406 parent: 0:f9ee2f85a263
407 user: test
407 user: test
408 date: Thu Jan 01 00:00:00 1970 +0000
408 date: Thu Jan 01 00:00:00 1970 +0000
409 summary: 1.1
409 summary: 1.1
410
410
411 changeset: 5:1bb50a9436a7
411 changeset: 5:1bb50a9436a7
412 user: test
412 user: test
413 date: Thu Jan 01 00:00:00 1970 +0000
413 date: Thu Jan 01 00:00:00 1970 +0000
414 summary: 1.2
414 summary: 1.2
415
415
416 changeset: 6:7373c1169842
416 changeset: 6:7373c1169842
417 user: test
417 user: test
418 date: Thu Jan 01 00:00:00 1970 +0000
418 date: Thu Jan 01 00:00:00 1970 +0000
419 summary: 1.3
419 summary: 1.3
420
420
421 changeset: 7:a6a34bfa0076
421 changeset: 7:a6a34bfa0076
422 user: test
422 user: test
423 date: Thu Jan 01 00:00:00 1970 +0000
423 date: Thu Jan 01 00:00:00 1970 +0000
424 summary: 1.3m
424 summary: 1.3m
425
425
426 changeset: 8:aa35859c02ea
426 changeset: 8:aa35859c02ea
427 tag: tip
427 tag: tip
428 parent: 3:eebf5a27f8ca
428 parent: 3:eebf5a27f8ca
429 user: test
429 user: test
430 date: Thu Jan 01 00:00:00 1970 +0000
430 date: Thu Jan 01 00:00:00 1970 +0000
431 summary: 0.3m
431 summary: 0.3m
432
432
433
433
434 Outgoing -R full.hg vs partial2 in partial
434 Outgoing -R full.hg vs partial2 in partial
435
435
436 $ hg -R bundle://../full.hg outgoing ../partial2
436 $ hg -R bundle://../full.hg outgoing ../partial2
437 comparing with ../partial2
437 comparing with ../partial2
438 searching for changes
438 searching for changes
439 changeset: 4:095197eb4973
439 changeset: 4:095197eb4973
440 parent: 0:f9ee2f85a263
440 parent: 0:f9ee2f85a263
441 user: test
441 user: test
442 date: Thu Jan 01 00:00:00 1970 +0000
442 date: Thu Jan 01 00:00:00 1970 +0000
443 summary: 1.1
443 summary: 1.1
444
444
445 changeset: 5:1bb50a9436a7
445 changeset: 5:1bb50a9436a7
446 user: test
446 user: test
447 date: Thu Jan 01 00:00:00 1970 +0000
447 date: Thu Jan 01 00:00:00 1970 +0000
448 summary: 1.2
448 summary: 1.2
449
449
450 changeset: 6:7373c1169842
450 changeset: 6:7373c1169842
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.3
453 summary: 1.3
454
454
455 changeset: 7:a6a34bfa0076
455 changeset: 7:a6a34bfa0076
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.3m
458 summary: 1.3m
459
459
460 changeset: 8:aa35859c02ea
460 changeset: 8:aa35859c02ea
461 tag: tip
461 tag: tip
462 parent: 3:eebf5a27f8ca
462 parent: 3:eebf5a27f8ca
463 user: test
463 user: test
464 date: Thu Jan 01 00:00:00 1970 +0000
464 date: Thu Jan 01 00:00:00 1970 +0000
465 summary: 0.3m
465 summary: 0.3m
466
466
467
467
468 Outgoing -R does-not-exist.hg vs partial2 in partial
468 Outgoing -R does-not-exist.hg vs partial2 in partial
469
469
470 $ hg -R bundle://../does-not-exist.hg outgoing ../partial2
470 $ hg -R bundle://../does-not-exist.hg outgoing ../partial2
471 abort: *../does-not-exist.hg* (glob)
471 abort: *../does-not-exist.hg* (glob)
472 [255]
472 [255]
473 $ cd ..
473 $ cd ..
474
474
475 hide outer repo
475 hide outer repo
476 $ hg init
476 $ hg init
477
477
478 Direct clone from bundle (all-history)
478 Direct clone from bundle (all-history)
479
479
480 $ hg clone full.hg full-clone
480 $ hg clone full.hg full-clone
481 requesting all changes
481 requesting all changes
482 adding changesets
482 adding changesets
483 adding manifests
483 adding manifests
484 adding file changes
484 adding file changes
485 added 9 changesets with 7 changes to 4 files (+1 heads)
485 added 9 changesets with 7 changes to 4 files (+1 heads)
486 updating to branch default
486 updating to branch default
487 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
487 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
488 $ hg -R full-clone heads
488 $ hg -R full-clone heads
489 changeset: 8:aa35859c02ea
489 changeset: 8:aa35859c02ea
490 tag: tip
490 tag: tip
491 parent: 3:eebf5a27f8ca
491 parent: 3:eebf5a27f8ca
492 user: test
492 user: test
493 date: Thu Jan 01 00:00:00 1970 +0000
493 date: Thu Jan 01 00:00:00 1970 +0000
494 summary: 0.3m
494 summary: 0.3m
495
495
496 changeset: 7:a6a34bfa0076
496 changeset: 7:a6a34bfa0076
497 user: test
497 user: test
498 date: Thu Jan 01 00:00:00 1970 +0000
498 date: Thu Jan 01 00:00:00 1970 +0000
499 summary: 1.3m
499 summary: 1.3m
500
500
501 $ rm -r full-clone
501 $ rm -r full-clone
502
502
503 When cloning from a non-copiable repository into '', do not
503 When cloning from a non-copiable repository into '', do not
504 recurse infinitely (issue2528)
504 recurse infinitely (issue2528)
505
505
506 $ hg clone full.hg ''
506 $ hg clone full.hg ''
507 abort: empty destination path is not valid
507 abort: empty destination path is not valid
508 [255]
508 [255]
509
509
510 test for https://bz.mercurial-scm.org/216
510 test for https://bz.mercurial-scm.org/216
511
511
512 Unbundle incremental bundles into fresh empty in one go
512 Unbundle incremental bundles into fresh empty in one go
513
513
514 $ rm -r empty
514 $ rm -r empty
515 $ hg init empty
515 $ hg init empty
516 $ hg -R test bundle --base null -r 0 ../0.hg
516 $ hg -R test bundle --base null -r 0 ../0.hg
517 1 changesets found
517 1 changesets found
518 $ hg -R test bundle --base 0 -r 1 ../1.hg
518 $ hg -R test bundle --base 0 -r 1 ../1.hg
519 1 changesets found
519 1 changesets found
520 $ hg -R empty unbundle -u ../0.hg ../1.hg
520 $ hg -R empty unbundle -u ../0.hg ../1.hg
521 adding changesets
521 adding changesets
522 adding manifests
522 adding manifests
523 adding file changes
523 adding file changes
524 added 1 changesets with 1 changes to 1 files
524 added 1 changesets with 1 changes to 1 files
525 adding changesets
525 adding changesets
526 adding manifests
526 adding manifests
527 adding file changes
527 adding file changes
528 added 1 changesets with 1 changes to 1 files
528 added 1 changesets with 1 changes to 1 files
529 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
530
530
531 View full contents of the bundle
531 View full contents of the bundle
532 $ hg -R test bundle --base null -r 3 ../partial.hg
532 $ hg -R test bundle --base null -r 3 ../partial.hg
533 4 changesets found
533 4 changesets found
534 $ cd test
534 $ cd test
535 $ hg -R ../../partial.hg log -r "bundle()"
535 $ hg -R ../../partial.hg log -r "bundle()"
536 changeset: 0:f9ee2f85a263
536 changeset: 0:f9ee2f85a263
537 user: test
537 user: test
538 date: Thu Jan 01 00:00:00 1970 +0000
538 date: Thu Jan 01 00:00:00 1970 +0000
539 summary: 0.0
539 summary: 0.0
540
540
541 changeset: 1:34c2bf6b0626
541 changeset: 1:34c2bf6b0626
542 user: test
542 user: test
543 date: Thu Jan 01 00:00:00 1970 +0000
543 date: Thu Jan 01 00:00:00 1970 +0000
544 summary: 0.1
544 summary: 0.1
545
545
546 changeset: 2:e38ba6f5b7e0
546 changeset: 2:e38ba6f5b7e0
547 user: test
547 user: test
548 date: Thu Jan 01 00:00:00 1970 +0000
548 date: Thu Jan 01 00:00:00 1970 +0000
549 summary: 0.2
549 summary: 0.2
550
550
551 changeset: 3:eebf5a27f8ca
551 changeset: 3:eebf5a27f8ca
552 user: test
552 user: test
553 date: Thu Jan 01 00:00:00 1970 +0000
553 date: Thu Jan 01 00:00:00 1970 +0000
554 summary: 0.3
554 summary: 0.3
555
555
556 $ cd ..
556 $ cd ..
557
557
558 test for 540d1059c802
558 test for 540d1059c802
559
559
560 test for 540d1059c802
560 test for 540d1059c802
561
561
562 $ hg init orig
562 $ hg init orig
563 $ cd orig
563 $ cd orig
564 $ echo foo > foo
564 $ echo foo > foo
565 $ hg add foo
565 $ hg add foo
566 $ hg ci -m 'add foo'
566 $ hg ci -m 'add foo'
567
567
568 $ hg clone . ../copy
568 $ hg clone . ../copy
569 updating to branch default
569 updating to branch default
570 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
570 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
571 $ hg tag foo
571 $ hg tag foo
572
572
573 $ cd ../copy
573 $ cd ../copy
574 $ echo >> foo
574 $ echo >> foo
575 $ hg ci -m 'change foo'
575 $ hg ci -m 'change foo'
576 $ hg bundle ../bundle.hg ../orig
576 $ hg bundle ../bundle.hg ../orig
577 searching for changes
577 searching for changes
578 1 changesets found
578 1 changesets found
579
579
580 $ cd ../orig
580 $ cd ../orig
581 $ hg incoming ../bundle.hg
581 $ hg incoming ../bundle.hg
582 comparing with ../bundle.hg
582 comparing with ../bundle.hg
583 searching for changes
583 searching for changes
584 changeset: 2:ed1b79f46b9a
584 changeset: 2:ed1b79f46b9a
585 tag: tip
585 tag: tip
586 parent: 0:bbd179dfa0a7
586 parent: 0:bbd179dfa0a7
587 user: test
587 user: test
588 date: Thu Jan 01 00:00:00 1970 +0000
588 date: Thu Jan 01 00:00:00 1970 +0000
589 summary: change foo
589 summary: change foo
590
590
591 $ cd ..
591 $ cd ..
592
592
593 test bundle with # in the filename (issue2154):
593 test bundle with # in the filename (issue2154):
594
594
595 $ cp bundle.hg 'test#bundle.hg'
595 $ cp bundle.hg 'test#bundle.hg'
596 $ cd orig
596 $ cd orig
597 $ hg incoming '../test#bundle.hg'
597 $ hg incoming '../test#bundle.hg'
598 comparing with ../test
598 comparing with ../test
599 abort: unknown revision 'bundle.hg'!
599 abort: unknown revision 'bundle.hg'!
600 [255]
600 [255]
601
601
602 note that percent encoding is not handled:
602 note that percent encoding is not handled:
603
603
604 $ hg incoming ../test%23bundle.hg
604 $ hg incoming ../test%23bundle.hg
605 abort: repository ../test%23bundle.hg not found!
605 abort: repository ../test%23bundle.hg not found!
606 [255]
606 [255]
607 $ cd ..
607 $ cd ..
608
608
609 test to bundle revisions on the newly created branch (issue3828):
609 test to bundle revisions on the newly created branch (issue3828):
610
610
611 $ hg -q clone -U test test-clone
611 $ hg -q clone -U test test-clone
612 $ cd test
612 $ cd test
613
613
614 $ hg -q branch foo
614 $ hg -q branch foo
615 $ hg commit -m "create foo branch"
615 $ hg commit -m "create foo branch"
616 $ hg -q outgoing ../test-clone
616 $ hg -q outgoing ../test-clone
617 9:b4f5acb1ee27
617 9:b4f5acb1ee27
618 $ hg -q bundle --branch foo foo.hg ../test-clone
618 $ hg -q bundle --branch foo foo.hg ../test-clone
619 $ hg -R foo.hg -q log -r "bundle()"
619 $ hg -R foo.hg -q log -r "bundle()"
620 9:b4f5acb1ee27
620 9:b4f5acb1ee27
621
621
622 $ cd ..
622 $ cd ..
623
623
624 test for https://bz.mercurial-scm.org/1144
624 test for https://bz.mercurial-scm.org/1144
625
625
626 test that verify bundle does not traceback
626 test that verify bundle does not traceback
627
627
628 partial history bundle, fails w/ unknown parent
628 partial history bundle, fails w/ unknown parent
629
629
630 $ hg -R bundle.hg verify
630 $ hg -R bundle.hg verify
631 abort: 00changelog.i@bbd179dfa0a7: unknown parent!
631 abort: 00changelog.i@bbd179dfa0a7: unknown parent!
632 [255]
632 [255]
633
633
634 full history bundle, refuses to verify non-local repo
634 full history bundle, refuses to verify non-local repo
635
635
636 $ hg -R all.hg verify
636 $ hg -R all.hg verify
637 abort: cannot verify bundle or remote repos
637 abort: cannot verify bundle or remote repos
638 [255]
638 [255]
639
639
640 but, regular verify must continue to work
640 but, regular verify must continue to work
641
641
642 $ hg -R orig verify
642 $ hg -R orig verify
643 checking changesets
643 checking changesets
644 checking manifests
644 checking manifests
645 crosschecking files in changesets and manifests
645 crosschecking files in changesets and manifests
646 checking files
646 checking files
647 2 files, 2 changesets, 2 total revisions
647 2 files, 2 changesets, 2 total revisions
648
648
649 diff against bundle
649 diff against bundle
650
650
651 $ hg init b
651 $ hg init b
652 $ cd b
652 $ cd b
653 $ hg -R ../all.hg diff -r tip
653 $ hg -R ../all.hg diff -r tip
654 diff -r aa35859c02ea anotherfile
654 diff -r aa35859c02ea anotherfile
655 --- a/anotherfile Thu Jan 01 00:00:00 1970 +0000
655 --- a/anotherfile Thu Jan 01 00:00:00 1970 +0000
656 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
656 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
657 @@ -1,4 +0,0 @@
657 @@ -1,4 +0,0 @@
658 -0
658 -0
659 -1
659 -1
660 -2
660 -2
661 -3
661 -3
662 $ cd ..
662 $ cd ..
663
663
664 bundle single branch
664 bundle single branch
665
665
666 $ hg init branchy
666 $ hg init branchy
667 $ cd branchy
667 $ cd branchy
668 $ echo a >a
668 $ echo a >a
669 $ echo x >x
669 $ echo x >x
670 $ hg ci -Ama
670 $ hg ci -Ama
671 adding a
671 adding a
672 adding x
672 adding x
673 $ echo c >c
673 $ echo c >c
674 $ echo xx >x
674 $ echo xx >x
675 $ hg ci -Amc
675 $ hg ci -Amc
676 adding c
676 adding c
677 $ echo c1 >c1
677 $ echo c1 >c1
678 $ hg ci -Amc1
678 $ hg ci -Amc1
679 adding c1
679 adding c1
680 $ hg up 0
680 $ hg up 0
681 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
681 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
682 $ echo b >b
682 $ echo b >b
683 $ hg ci -Amb
683 $ hg ci -Amb
684 adding b
684 adding b
685 created new head
685 created new head
686 $ echo b1 >b1
686 $ echo b1 >b1
687 $ echo xx >x
687 $ echo xx >x
688 $ hg ci -Amb1
688 $ hg ci -Amb1
689 adding b1
689 adding b1
690 $ hg clone -q -r2 . part
690 $ hg clone -q -r2 . part
691
691
692 == bundling via incoming
692 == bundling via incoming
693
693
694 $ hg in -R part --bundle incoming.hg --template "{node}\n" .
694 $ hg in -R part --bundle incoming.hg --template "{node}\n" .
695 comparing with .
695 comparing with .
696 searching for changes
696 searching for changes
697 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a
697 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a
698 057f4db07f61970e1c11e83be79e9d08adc4dc31
698 057f4db07f61970e1c11e83be79e9d08adc4dc31
699
699
700 == bundling
700 == bundling
701
701
702 $ hg bundle bundle.hg part --debug --config progress.debug=true
702 $ hg bundle bundle.hg part --debug --config progress.debug=true
703 query 1; heads
703 query 1; heads
704 searching for changes
704 searching for changes
705 all remote heads known locally
705 all remote heads known locally
706 2 changesets found
706 2 changesets found
707 list of changesets:
707 list of changesets:
708 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a
708 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a
709 057f4db07f61970e1c11e83be79e9d08adc4dc31
709 057f4db07f61970e1c11e83be79e9d08adc4dc31
710 bundle2-output-bundle: "HG20", (1 params) 1 parts total
710 bundle2-output-bundle: "HG20", (1 params) 1 parts total
711 bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload
711 bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload
712 bundling: 1/2 changesets (50.00%)
712 bundling: 1/2 changesets (50.00%)
713 bundling: 2/2 changesets (100.00%)
713 bundling: 2/2 changesets (100.00%)
714 bundling: 1/2 manifests (50.00%)
714 bundling: 1/2 manifests (50.00%)
715 bundling: 2/2 manifests (100.00%)
715 bundling: 2/2 manifests (100.00%)
716 bundling: b 1/3 files (33.33%)
716 bundling: b 1/3 files (33.33%)
717 bundling: b1 2/3 files (66.67%)
717 bundling: b1 2/3 files (66.67%)
718 bundling: x 3/3 files (100.00%)
718 bundling: x 3/3 files (100.00%)
719
719
720 == Test for issue3441
720 == Test for issue3441
721
721
722 $ hg clone -q -r0 . part2
722 $ hg clone -q -r0 . part2
723 $ hg -q -R part2 pull bundle.hg
723 $ hg -q -R part2 pull bundle.hg
724 $ hg -R part2 verify
724 $ hg -R part2 verify
725 checking changesets
725 checking changesets
726 checking manifests
726 checking manifests
727 crosschecking files in changesets and manifests
727 crosschecking files in changesets and manifests
728 checking files
728 checking files
729 4 files, 3 changesets, 5 total revisions
729 4 files, 3 changesets, 5 total revisions
730
730
731 $ cd ..
731 == Test bundling no commits
732
733 $ hg bundle -r 'public()' no-output.hg
734 abort: no commits to bundle
735 [255]
General Comments 0
You need to be logged in to leave comments. Login now