##// END OF EJS Templates
tests: avoid repo.lookup() for converting revnum to nodeid...
Martin von Zweigbergk -
r37326:5da299da default
parent child Browse files
Show More
@@ -1,614 +1,614
1 #require killdaemons
1 #require killdaemons
2
2
3 #testcases sshv1 sshv2
3 #testcases sshv1 sshv2
4
4
5 #if sshv2
5 #if sshv2
6 $ cat >> $HGRCPATH << EOF
6 $ cat >> $HGRCPATH << EOF
7 > [experimental]
7 > [experimental]
8 > sshpeer.advertise-v2 = true
8 > sshpeer.advertise-v2 = true
9 > sshserver.support-v2 = true
9 > sshserver.support-v2 = true
10 > EOF
10 > EOF
11 #endif
11 #endif
12
12
13 Create an extension to test bundle2 remote-changegroup parts
13 Create an extension to test bundle2 remote-changegroup parts
14
14
15 $ cat > bundle2.py << EOF
15 $ cat > bundle2.py << EOF
16 > """A small extension to test bundle2 remote-changegroup parts.
16 > """A small extension to test bundle2 remote-changegroup parts.
17 >
17 >
18 > Current bundle2 implementation doesn't provide a way to generate those
18 > Current bundle2 implementation doesn't provide a way to generate those
19 > parts, so they must be created by extensions.
19 > parts, so they must be created by extensions.
20 > """
20 > """
21 > from mercurial import bundle2, changegroup, discovery, exchange, util
21 > from mercurial import bundle2, changegroup, discovery, exchange, util
22 >
22 >
23 > def _getbundlechangegrouppart(bundler, repo, source, bundlecaps=None,
23 > def _getbundlechangegrouppart(bundler, repo, source, bundlecaps=None,
24 > b2caps=None, heads=None, common=None,
24 > b2caps=None, heads=None, common=None,
25 > **kwargs):
25 > **kwargs):
26 > """this function replaces the changegroup part handler for getbundle.
26 > """this function replaces the changegroup part handler for getbundle.
27 > It allows to create a set of arbitrary parts containing changegroups
27 > It allows to create a set of arbitrary parts containing changegroups
28 > and remote-changegroups, as described in a bundle2maker file in the
28 > and remote-changegroups, as described in a bundle2maker file in the
29 > repository .hg/ directory.
29 > repository .hg/ directory.
30 >
30 >
31 > Each line of that bundle2maker file contain a description of the
31 > Each line of that bundle2maker file contain a description of the
32 > part to add:
32 > part to add:
33 > - changegroup common_revset heads_revset
33 > - changegroup common_revset heads_revset
34 > Creates a changegroup part based, using common_revset and
34 > Creates a changegroup part based, using common_revset and
35 > heads_revset for outgoing
35 > heads_revset for outgoing
36 > - remote-changegroup url file
36 > - remote-changegroup url file
37 > Creates a remote-changegroup part for a bundle at the given
37 > Creates a remote-changegroup part for a bundle at the given
38 > url. Size and digest, as required by the client, are computed
38 > url. Size and digest, as required by the client, are computed
39 > from the given file.
39 > from the given file.
40 > - raw-remote-changegroup <python expression>
40 > - raw-remote-changegroup <python expression>
41 > Creates a remote-changegroup part with the data given in the
41 > Creates a remote-changegroup part with the data given in the
42 > Python expression as parameters. The Python expression is
42 > Python expression as parameters. The Python expression is
43 > evaluated with eval, and is expected to be a dict.
43 > evaluated with eval, and is expected to be a dict.
44 > """
44 > """
45 > def newpart(name, data=''):
45 > def newpart(name, data=''):
46 > """wrapper around bundler.newpart adding an extra part making the
46 > """wrapper around bundler.newpart adding an extra part making the
47 > client output information about each processed part"""
47 > client output information about each processed part"""
48 > bundler.newpart('output', data=name)
48 > bundler.newpart('output', data=name)
49 > part = bundler.newpart(name, data=data)
49 > part = bundler.newpart(name, data=data)
50 > return part
50 > return part
51 >
51 >
52 > for line in open(repo.vfs.join('bundle2maker'), 'r'):
52 > for line in open(repo.vfs.join('bundle2maker'), 'r'):
53 > line = line.strip()
53 > line = line.strip()
54 > try:
54 > try:
55 > verb, args = line.split(None, 1)
55 > verb, args = line.split(None, 1)
56 > except ValueError:
56 > except ValueError:
57 > verb, args = line, ''
57 > verb, args = line, ''
58 > if verb == 'remote-changegroup':
58 > if verb == 'remote-changegroup':
59 > url, file = args.split()
59 > url, file = args.split()
60 > bundledata = open(file, 'rb').read()
60 > bundledata = open(file, 'rb').read()
61 > digest = util.digester.preferred(b2caps['digests'])
61 > digest = util.digester.preferred(b2caps['digests'])
62 > d = util.digester([digest], bundledata)
62 > d = util.digester([digest], bundledata)
63 > part = newpart('remote-changegroup')
63 > part = newpart('remote-changegroup')
64 > part.addparam('url', url)
64 > part.addparam('url', url)
65 > part.addparam('size', str(len(bundledata)))
65 > part.addparam('size', str(len(bundledata)))
66 > part.addparam('digests', digest)
66 > part.addparam('digests', digest)
67 > part.addparam('digest:%s' % digest, d[digest])
67 > part.addparam('digest:%s' % digest, d[digest])
68 > elif verb == 'raw-remote-changegroup':
68 > elif verb == 'raw-remote-changegroup':
69 > part = newpart('remote-changegroup')
69 > part = newpart('remote-changegroup')
70 > for k, v in eval(args).items():
70 > for k, v in eval(args).items():
71 > part.addparam(k, str(v))
71 > part.addparam(k, str(v))
72 > elif verb == 'changegroup':
72 > elif verb == 'changegroup':
73 > _common, heads = args.split()
73 > _common, heads = args.split()
74 > common.extend(repo.lookup(r) for r in repo.revs(_common))
74 > common.extend(repo[r].node() for r in repo.revs(_common))
75 > heads = [repo.lookup(r) for r in repo.revs(heads)]
75 > heads = [repo[r].node() for r in repo.revs(heads)]
76 > outgoing = discovery.outgoing(repo, common, heads)
76 > outgoing = discovery.outgoing(repo, common, heads)
77 > cg = changegroup.makechangegroup(repo, outgoing, '01',
77 > cg = changegroup.makechangegroup(repo, outgoing, '01',
78 > 'changegroup')
78 > 'changegroup')
79 > newpart('changegroup', cg.getchunks())
79 > newpart('changegroup', cg.getchunks())
80 > else:
80 > else:
81 > raise Exception('unknown verb')
81 > raise Exception('unknown verb')
82 >
82 >
83 > exchange.getbundle2partsmapping['changegroup'] = _getbundlechangegrouppart
83 > exchange.getbundle2partsmapping['changegroup'] = _getbundlechangegrouppart
84 > EOF
84 > EOF
85
85
86 Start a simple HTTP server to serve bundles
86 Start a simple HTTP server to serve bundles
87
87
88 $ $PYTHON "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid
88 $ $PYTHON "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid
89 $ cat dumb.pid >> $DAEMON_PIDS
89 $ cat dumb.pid >> $DAEMON_PIDS
90
90
91 $ cat >> $HGRCPATH << EOF
91 $ cat >> $HGRCPATH << EOF
92 > [ui]
92 > [ui]
93 > ssh=$PYTHON "$TESTDIR/dummyssh"
93 > ssh=$PYTHON "$TESTDIR/dummyssh"
94 > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline}
94 > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline}
95 > EOF
95 > EOF
96
96
97 $ hg init repo
97 $ hg init repo
98
98
99 $ hg -R repo unbundle $TESTDIR/bundles/rebase.hg
99 $ hg -R repo unbundle $TESTDIR/bundles/rebase.hg
100 adding changesets
100 adding changesets
101 adding manifests
101 adding manifests
102 adding file changes
102 adding file changes
103 added 8 changesets with 7 changes to 7 files (+2 heads)
103 added 8 changesets with 7 changes to 7 files (+2 heads)
104 new changesets cd010b8cd998:02de42196ebe
104 new changesets cd010b8cd998:02de42196ebe
105 (run 'hg heads' to see heads, 'hg merge' to merge)
105 (run 'hg heads' to see heads, 'hg merge' to merge)
106
106
107 $ hg -R repo log -G
107 $ hg -R repo log -G
108 o 7:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> H
108 o 7:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> H
109 |
109 |
110 | o 6:eea13746799a draft Nicolas Dumazet <nicdumz.commits@gmail.com> G
110 | o 6:eea13746799a draft Nicolas Dumazet <nicdumz.commits@gmail.com> G
111 |/|
111 |/|
112 o | 5:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F
112 o | 5:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F
113 | |
113 | |
114 | o 4:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
114 | o 4:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
115 |/
115 |/
116 | o 3:32af7686d403 draft Nicolas Dumazet <nicdumz.commits@gmail.com> D
116 | o 3:32af7686d403 draft Nicolas Dumazet <nicdumz.commits@gmail.com> D
117 | |
117 | |
118 | o 2:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> C
118 | o 2:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> C
119 | |
119 | |
120 | o 1:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> B
120 | o 1:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> B
121 |/
121 |/
122 o 0:cd010b8cd998 draft Nicolas Dumazet <nicdumz.commits@gmail.com> A
122 o 0:cd010b8cd998 draft Nicolas Dumazet <nicdumz.commits@gmail.com> A
123
123
124 $ hg clone repo orig
124 $ hg clone repo orig
125 updating to branch default
125 updating to branch default
126 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
126 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
127
127
128 $ cat > repo/.hg/hgrc << EOF
128 $ cat > repo/.hg/hgrc << EOF
129 > [extensions]
129 > [extensions]
130 > bundle2=$TESTTMP/bundle2.py
130 > bundle2=$TESTTMP/bundle2.py
131 > EOF
131 > EOF
132
132
133 Test a pull with an remote-changegroup
133 Test a pull with an remote-changegroup
134
134
135 $ hg bundle -R repo --type v1 --base '0:4' -r '5:7' bundle.hg
135 $ hg bundle -R repo --type v1 --base '0:4' -r '5:7' bundle.hg
136 3 changesets found
136 3 changesets found
137 $ cat > repo/.hg/bundle2maker << EOF
137 $ cat > repo/.hg/bundle2maker << EOF
138 > remote-changegroup http://localhost:$HGPORT/bundle.hg bundle.hg
138 > remote-changegroup http://localhost:$HGPORT/bundle.hg bundle.hg
139 > EOF
139 > EOF
140 $ hg clone orig clone -r 3 -r 4
140 $ hg clone orig clone -r 3 -r 4
141 adding changesets
141 adding changesets
142 adding manifests
142 adding manifests
143 adding file changes
143 adding file changes
144 added 5 changesets with 5 changes to 5 files (+1 heads)
144 added 5 changesets with 5 changes to 5 files (+1 heads)
145 new changesets cd010b8cd998:9520eea781bc
145 new changesets cd010b8cd998:9520eea781bc
146 updating to branch default
146 updating to branch default
147 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
147 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
148 $ hg pull -R clone ssh://user@dummy/repo
148 $ hg pull -R clone ssh://user@dummy/repo
149 pulling from ssh://user@dummy/repo
149 pulling from ssh://user@dummy/repo
150 searching for changes
150 searching for changes
151 remote: remote-changegroup
151 remote: remote-changegroup
152 adding changesets
152 adding changesets
153 adding manifests
153 adding manifests
154 adding file changes
154 adding file changes
155 added 3 changesets with 2 changes to 2 files (+1 heads)
155 added 3 changesets with 2 changes to 2 files (+1 heads)
156 new changesets 24b6387c8c8c:02de42196ebe
156 new changesets 24b6387c8c8c:02de42196ebe
157 (run 'hg heads .' to see heads, 'hg merge' to merge)
157 (run 'hg heads .' to see heads, 'hg merge' to merge)
158 $ hg -R clone log -G
158 $ hg -R clone log -G
159 o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H
159 o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H
160 |
160 |
161 | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G
161 | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G
162 |/|
162 |/|
163 o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
163 o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
164 | |
164 | |
165 | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
165 | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
166 |/
166 |/
167 | @ 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D
167 | @ 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D
168 | |
168 | |
169 | o 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C
169 | o 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C
170 | |
170 | |
171 | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B
171 | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B
172 |/
172 |/
173 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
173 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
174
174
175 $ rm -rf clone
175 $ rm -rf clone
176
176
177 Test a pull with an remote-changegroup and a following changegroup
177 Test a pull with an remote-changegroup and a following changegroup
178
178
179 $ hg bundle -R repo --type v1 --base 2 -r '3:4' bundle2.hg
179 $ hg bundle -R repo --type v1 --base 2 -r '3:4' bundle2.hg
180 2 changesets found
180 2 changesets found
181 $ cat > repo/.hg/bundle2maker << EOF
181 $ cat > repo/.hg/bundle2maker << EOF
182 > remote-changegroup http://localhost:$HGPORT/bundle2.hg bundle2.hg
182 > remote-changegroup http://localhost:$HGPORT/bundle2.hg bundle2.hg
183 > changegroup 0:4 5:7
183 > changegroup 0:4 5:7
184 > EOF
184 > EOF
185 $ hg clone orig clone -r 2
185 $ hg clone orig clone -r 2
186 adding changesets
186 adding changesets
187 adding manifests
187 adding manifests
188 adding file changes
188 adding file changes
189 added 3 changesets with 3 changes to 3 files
189 added 3 changesets with 3 changes to 3 files
190 new changesets cd010b8cd998:5fddd98957c8
190 new changesets cd010b8cd998:5fddd98957c8
191 updating to branch default
191 updating to branch default
192 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
192 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
193 $ hg pull -R clone ssh://user@dummy/repo
193 $ hg pull -R clone ssh://user@dummy/repo
194 pulling from ssh://user@dummy/repo
194 pulling from ssh://user@dummy/repo
195 searching for changes
195 searching for changes
196 remote: remote-changegroup
196 remote: remote-changegroup
197 adding changesets
197 adding changesets
198 adding manifests
198 adding manifests
199 adding file changes
199 adding file changes
200 added 2 changesets with 2 changes to 2 files (+1 heads)
200 added 2 changesets with 2 changes to 2 files (+1 heads)
201 remote: changegroup
201 remote: changegroup
202 adding changesets
202 adding changesets
203 adding manifests
203 adding manifests
204 adding file changes
204 adding file changes
205 added 3 changesets with 2 changes to 2 files (+1 heads)
205 added 3 changesets with 2 changes to 2 files (+1 heads)
206 new changesets 32af7686d403:02de42196ebe
206 new changesets 32af7686d403:02de42196ebe
207 (run 'hg heads' to see heads, 'hg merge' to merge)
207 (run 'hg heads' to see heads, 'hg merge' to merge)
208 $ hg -R clone log -G
208 $ hg -R clone log -G
209 o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H
209 o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H
210 |
210 |
211 | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G
211 | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G
212 |/|
212 |/|
213 o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
213 o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
214 | |
214 | |
215 | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
215 | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
216 |/
216 |/
217 | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D
217 | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D
218 | |
218 | |
219 | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C
219 | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C
220 | |
220 | |
221 | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B
221 | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B
222 |/
222 |/
223 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
223 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
224
224
225 $ rm -rf clone
225 $ rm -rf clone
226
226
227 Test a pull with a changegroup followed by an remote-changegroup
227 Test a pull with a changegroup followed by an remote-changegroup
228
228
229 $ hg bundle -R repo --type v1 --base '0:4' -r '5:7' bundle3.hg
229 $ hg bundle -R repo --type v1 --base '0:4' -r '5:7' bundle3.hg
230 3 changesets found
230 3 changesets found
231 $ cat > repo/.hg/bundle2maker << EOF
231 $ cat > repo/.hg/bundle2maker << EOF
232 > changegroup 000000000000 :4
232 > changegroup 000000000000 :4
233 > remote-changegroup http://localhost:$HGPORT/bundle3.hg bundle3.hg
233 > remote-changegroup http://localhost:$HGPORT/bundle3.hg bundle3.hg
234 > EOF
234 > EOF
235 $ hg clone orig clone -r 2
235 $ hg clone orig clone -r 2
236 adding changesets
236 adding changesets
237 adding manifests
237 adding manifests
238 adding file changes
238 adding file changes
239 added 3 changesets with 3 changes to 3 files
239 added 3 changesets with 3 changes to 3 files
240 new changesets cd010b8cd998:5fddd98957c8
240 new changesets cd010b8cd998:5fddd98957c8
241 updating to branch default
241 updating to branch default
242 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
242 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
243 $ hg pull -R clone ssh://user@dummy/repo
243 $ hg pull -R clone ssh://user@dummy/repo
244 pulling from ssh://user@dummy/repo
244 pulling from ssh://user@dummy/repo
245 searching for changes
245 searching for changes
246 remote: changegroup
246 remote: changegroup
247 adding changesets
247 adding changesets
248 adding manifests
248 adding manifests
249 adding file changes
249 adding file changes
250 added 2 changesets with 2 changes to 2 files (+1 heads)
250 added 2 changesets with 2 changes to 2 files (+1 heads)
251 remote: remote-changegroup
251 remote: remote-changegroup
252 adding changesets
252 adding changesets
253 adding manifests
253 adding manifests
254 adding file changes
254 adding file changes
255 added 3 changesets with 2 changes to 2 files (+1 heads)
255 added 3 changesets with 2 changes to 2 files (+1 heads)
256 new changesets 32af7686d403:02de42196ebe
256 new changesets 32af7686d403:02de42196ebe
257 (run 'hg heads' to see heads, 'hg merge' to merge)
257 (run 'hg heads' to see heads, 'hg merge' to merge)
258 $ hg -R clone log -G
258 $ hg -R clone log -G
259 o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H
259 o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H
260 |
260 |
261 | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G
261 | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G
262 |/|
262 |/|
263 o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
263 o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
264 | |
264 | |
265 | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
265 | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
266 |/
266 |/
267 | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D
267 | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D
268 | |
268 | |
269 | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C
269 | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C
270 | |
270 | |
271 | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B
271 | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B
272 |/
272 |/
273 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
273 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
274
274
275 $ rm -rf clone
275 $ rm -rf clone
276
276
277 Test a pull with two remote-changegroups and a changegroup
277 Test a pull with two remote-changegroups and a changegroup
278
278
279 $ hg bundle -R repo --type v1 --base 2 -r '3:4' bundle4.hg
279 $ hg bundle -R repo --type v1 --base 2 -r '3:4' bundle4.hg
280 2 changesets found
280 2 changesets found
281 $ hg bundle -R repo --type v1 --base '3:4' -r '5:6' bundle5.hg
281 $ hg bundle -R repo --type v1 --base '3:4' -r '5:6' bundle5.hg
282 2 changesets found
282 2 changesets found
283 $ cat > repo/.hg/bundle2maker << EOF
283 $ cat > repo/.hg/bundle2maker << EOF
284 > remote-changegroup http://localhost:$HGPORT/bundle4.hg bundle4.hg
284 > remote-changegroup http://localhost:$HGPORT/bundle4.hg bundle4.hg
285 > remote-changegroup http://localhost:$HGPORT/bundle5.hg bundle5.hg
285 > remote-changegroup http://localhost:$HGPORT/bundle5.hg bundle5.hg
286 > changegroup 0:6 7
286 > changegroup 0:6 7
287 > EOF
287 > EOF
288 $ hg clone orig clone -r 2
288 $ hg clone orig clone -r 2
289 adding changesets
289 adding changesets
290 adding manifests
290 adding manifests
291 adding file changes
291 adding file changes
292 added 3 changesets with 3 changes to 3 files
292 added 3 changesets with 3 changes to 3 files
293 new changesets cd010b8cd998:5fddd98957c8
293 new changesets cd010b8cd998:5fddd98957c8
294 updating to branch default
294 updating to branch default
295 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
295 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
296 $ hg pull -R clone ssh://user@dummy/repo
296 $ hg pull -R clone ssh://user@dummy/repo
297 pulling from ssh://user@dummy/repo
297 pulling from ssh://user@dummy/repo
298 searching for changes
298 searching for changes
299 remote: remote-changegroup
299 remote: remote-changegroup
300 adding changesets
300 adding changesets
301 adding manifests
301 adding manifests
302 adding file changes
302 adding file changes
303 added 2 changesets with 2 changes to 2 files (+1 heads)
303 added 2 changesets with 2 changes to 2 files (+1 heads)
304 remote: remote-changegroup
304 remote: remote-changegroup
305 adding changesets
305 adding changesets
306 adding manifests
306 adding manifests
307 adding file changes
307 adding file changes
308 added 2 changesets with 1 changes to 1 files
308 added 2 changesets with 1 changes to 1 files
309 remote: changegroup
309 remote: changegroup
310 adding changesets
310 adding changesets
311 adding manifests
311 adding manifests
312 adding file changes
312 adding file changes
313 added 1 changesets with 1 changes to 1 files (+1 heads)
313 added 1 changesets with 1 changes to 1 files (+1 heads)
314 new changesets 32af7686d403:02de42196ebe
314 new changesets 32af7686d403:02de42196ebe
315 (run 'hg heads' to see heads, 'hg merge' to merge)
315 (run 'hg heads' to see heads, 'hg merge' to merge)
316 $ hg -R clone log -G
316 $ hg -R clone log -G
317 o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H
317 o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H
318 |
318 |
319 | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G
319 | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G
320 |/|
320 |/|
321 o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
321 o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
322 | |
322 | |
323 | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
323 | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
324 |/
324 |/
325 | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D
325 | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D
326 | |
326 | |
327 | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C
327 | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C
328 | |
328 | |
329 | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B
329 | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B
330 |/
330 |/
331 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
331 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
332
332
333 $ rm -rf clone
333 $ rm -rf clone
334
334
335 Hash digest tests
335 Hash digest tests
336
336
337 $ hg bundle -R repo --type v1 -a bundle6.hg
337 $ hg bundle -R repo --type v1 -a bundle6.hg
338 8 changesets found
338 8 changesets found
339
339
340 $ cat > repo/.hg/bundle2maker << EOF
340 $ cat > repo/.hg/bundle2maker << EOF
341 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'sha1', 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'}
341 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'sha1', 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'}
342 > EOF
342 > EOF
343 $ hg clone ssh://user@dummy/repo clone
343 $ hg clone ssh://user@dummy/repo clone
344 requesting all changes
344 requesting all changes
345 remote: remote-changegroup
345 remote: remote-changegroup
346 adding changesets
346 adding changesets
347 adding manifests
347 adding manifests
348 adding file changes
348 adding file changes
349 added 8 changesets with 7 changes to 7 files (+2 heads)
349 added 8 changesets with 7 changes to 7 files (+2 heads)
350 new changesets cd010b8cd998:02de42196ebe
350 new changesets cd010b8cd998:02de42196ebe
351 updating to branch default
351 updating to branch default
352 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
352 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
353 $ rm -rf clone
353 $ rm -rf clone
354
354
355 $ cat > repo/.hg/bundle2maker << EOF
355 $ cat > repo/.hg/bundle2maker << EOF
356 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394'}
356 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394'}
357 > EOF
357 > EOF
358 $ hg clone ssh://user@dummy/repo clone
358 $ hg clone ssh://user@dummy/repo clone
359 requesting all changes
359 requesting all changes
360 remote: remote-changegroup
360 remote: remote-changegroup
361 adding changesets
361 adding changesets
362 adding manifests
362 adding manifests
363 adding file changes
363 adding file changes
364 added 8 changesets with 7 changes to 7 files (+2 heads)
364 added 8 changesets with 7 changes to 7 files (+2 heads)
365 new changesets cd010b8cd998:02de42196ebe
365 new changesets cd010b8cd998:02de42196ebe
366 updating to branch default
366 updating to branch default
367 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
367 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
368 $ rm -rf clone
368 $ rm -rf clone
369
369
370 Hash digest mismatch throws an error
370 Hash digest mismatch throws an error
371
371
372 $ cat > repo/.hg/bundle2maker << EOF
372 $ cat > repo/.hg/bundle2maker << EOF
373 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'sha1', 'digest:sha1': '0' * 40}
373 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'sha1', 'digest:sha1': '0' * 40}
374 > EOF
374 > EOF
375 $ hg clone ssh://user@dummy/repo clone
375 $ hg clone ssh://user@dummy/repo clone
376 requesting all changes
376 requesting all changes
377 remote: remote-changegroup
377 remote: remote-changegroup
378 adding changesets
378 adding changesets
379 adding manifests
379 adding manifests
380 adding file changes
380 adding file changes
381 added 8 changesets with 7 changes to 7 files (+2 heads)
381 added 8 changesets with 7 changes to 7 files (+2 heads)
382 transaction abort!
382 transaction abort!
383 rollback completed
383 rollback completed
384 abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted:
384 abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted:
385 sha1 mismatch: expected 0000000000000000000000000000000000000000, got 2c880cfec23cff7d8f80c2f12958d1563cbdaba6
385 sha1 mismatch: expected 0000000000000000000000000000000000000000, got 2c880cfec23cff7d8f80c2f12958d1563cbdaba6
386 [255]
386 [255]
387
387
388 Multiple hash digests can be given
388 Multiple hash digests can be given
389
389
390 $ cat > repo/.hg/bundle2maker << EOF
390 $ cat > repo/.hg/bundle2maker << EOF
391 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394', 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'}
391 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394', 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'}
392 > EOF
392 > EOF
393 $ hg clone ssh://user@dummy/repo clone
393 $ hg clone ssh://user@dummy/repo clone
394 requesting all changes
394 requesting all changes
395 remote: remote-changegroup
395 remote: remote-changegroup
396 adding changesets
396 adding changesets
397 adding manifests
397 adding manifests
398 adding file changes
398 adding file changes
399 added 8 changesets with 7 changes to 7 files (+2 heads)
399 added 8 changesets with 7 changes to 7 files (+2 heads)
400 new changesets cd010b8cd998:02de42196ebe
400 new changesets cd010b8cd998:02de42196ebe
401 updating to branch default
401 updating to branch default
402 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
402 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
403 $ rm -rf clone
403 $ rm -rf clone
404
404
405 If either of the multiple hash digests mismatches, an error is thrown
405 If either of the multiple hash digests mismatches, an error is thrown
406
406
407 $ cat > repo/.hg/bundle2maker << EOF
407 $ cat > repo/.hg/bundle2maker << EOF
408 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': '0' * 32, 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'}
408 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': '0' * 32, 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'}
409 > EOF
409 > EOF
410 $ hg clone ssh://user@dummy/repo clone
410 $ hg clone ssh://user@dummy/repo clone
411 requesting all changes
411 requesting all changes
412 remote: remote-changegroup
412 remote: remote-changegroup
413 adding changesets
413 adding changesets
414 adding manifests
414 adding manifests
415 adding file changes
415 adding file changes
416 added 8 changesets with 7 changes to 7 files (+2 heads)
416 added 8 changesets with 7 changes to 7 files (+2 heads)
417 transaction abort!
417 transaction abort!
418 rollback completed
418 rollback completed
419 abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted:
419 abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted:
420 md5 mismatch: expected 00000000000000000000000000000000, got e22172c2907ef88794b7bea6642c2394
420 md5 mismatch: expected 00000000000000000000000000000000, got e22172c2907ef88794b7bea6642c2394
421 [255]
421 [255]
422
422
423 $ cat > repo/.hg/bundle2maker << EOF
423 $ cat > repo/.hg/bundle2maker << EOF
424 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394', 'digest:sha1': '0' * 40}
424 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394', 'digest:sha1': '0' * 40}
425 > EOF
425 > EOF
426 $ hg clone ssh://user@dummy/repo clone
426 $ hg clone ssh://user@dummy/repo clone
427 requesting all changes
427 requesting all changes
428 remote: remote-changegroup
428 remote: remote-changegroup
429 adding changesets
429 adding changesets
430 adding manifests
430 adding manifests
431 adding file changes
431 adding file changes
432 added 8 changesets with 7 changes to 7 files (+2 heads)
432 added 8 changesets with 7 changes to 7 files (+2 heads)
433 transaction abort!
433 transaction abort!
434 rollback completed
434 rollback completed
435 abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted:
435 abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted:
436 sha1 mismatch: expected 0000000000000000000000000000000000000000, got 2c880cfec23cff7d8f80c2f12958d1563cbdaba6
436 sha1 mismatch: expected 0000000000000000000000000000000000000000, got 2c880cfec23cff7d8f80c2f12958d1563cbdaba6
437 [255]
437 [255]
438
438
439 Corruption tests
439 Corruption tests
440
440
441 $ hg clone orig clone -r 2
441 $ hg clone orig clone -r 2
442 adding changesets
442 adding changesets
443 adding manifests
443 adding manifests
444 adding file changes
444 adding file changes
445 added 3 changesets with 3 changes to 3 files
445 added 3 changesets with 3 changes to 3 files
446 new changesets cd010b8cd998:5fddd98957c8
446 new changesets cd010b8cd998:5fddd98957c8
447 updating to branch default
447 updating to branch default
448 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
448 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
449
449
450 $ cat > repo/.hg/bundle2maker << EOF
450 $ cat > repo/.hg/bundle2maker << EOF
451 > remote-changegroup http://localhost:$HGPORT/bundle4.hg bundle4.hg
451 > remote-changegroup http://localhost:$HGPORT/bundle4.hg bundle4.hg
452 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle5.hg', 'size': 578, 'digests': 'sha1', 'digest:sha1': '0' * 40}
452 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle5.hg', 'size': 578, 'digests': 'sha1', 'digest:sha1': '0' * 40}
453 > changegroup 0:6 7
453 > changegroup 0:6 7
454 > EOF
454 > EOF
455 $ hg pull -R clone ssh://user@dummy/repo
455 $ hg pull -R clone ssh://user@dummy/repo
456 pulling from ssh://user@dummy/repo
456 pulling from ssh://user@dummy/repo
457 searching for changes
457 searching for changes
458 remote: remote-changegroup
458 remote: remote-changegroup
459 adding changesets
459 adding changesets
460 adding manifests
460 adding manifests
461 adding file changes
461 adding file changes
462 added 2 changesets with 2 changes to 2 files (+1 heads)
462 added 2 changesets with 2 changes to 2 files (+1 heads)
463 remote: remote-changegroup
463 remote: remote-changegroup
464 adding changesets
464 adding changesets
465 adding manifests
465 adding manifests
466 adding file changes
466 adding file changes
467 added 2 changesets with 1 changes to 1 files
467 added 2 changesets with 1 changes to 1 files
468 transaction abort!
468 transaction abort!
469 rollback completed
469 rollback completed
470 abort: bundle at http://localhost:$HGPORT/bundle5.hg is corrupted:
470 abort: bundle at http://localhost:$HGPORT/bundle5.hg is corrupted:
471 sha1 mismatch: expected 0000000000000000000000000000000000000000, got f29485d6bfd37db99983cfc95ecb52f8ca396106
471 sha1 mismatch: expected 0000000000000000000000000000000000000000, got f29485d6bfd37db99983cfc95ecb52f8ca396106
472 [255]
472 [255]
473
473
474 The entire transaction has been rolled back in the pull above
474 The entire transaction has been rolled back in the pull above
475
475
476 $ hg -R clone log -G
476 $ hg -R clone log -G
477 @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C
477 @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C
478 |
478 |
479 o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B
479 o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B
480 |
480 |
481 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
481 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
482
482
483
483
484 No params
484 No params
485
485
486 $ cat > repo/.hg/bundle2maker << EOF
486 $ cat > repo/.hg/bundle2maker << EOF
487 > raw-remote-changegroup {}
487 > raw-remote-changegroup {}
488 > EOF
488 > EOF
489 $ hg pull -R clone ssh://user@dummy/repo
489 $ hg pull -R clone ssh://user@dummy/repo
490 pulling from ssh://user@dummy/repo
490 pulling from ssh://user@dummy/repo
491 searching for changes
491 searching for changes
492 remote: remote-changegroup
492 remote: remote-changegroup
493 abort: remote-changegroup: missing "url" param
493 abort: remote-changegroup: missing "url" param
494 [255]
494 [255]
495
495
496 Missing size
496 Missing size
497
497
498 $ cat > repo/.hg/bundle2maker << EOF
498 $ cat > repo/.hg/bundle2maker << EOF
499 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg'}
499 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg'}
500 > EOF
500 > EOF
501 $ hg pull -R clone ssh://user@dummy/repo
501 $ hg pull -R clone ssh://user@dummy/repo
502 pulling from ssh://user@dummy/repo
502 pulling from ssh://user@dummy/repo
503 searching for changes
503 searching for changes
504 remote: remote-changegroup
504 remote: remote-changegroup
505 abort: remote-changegroup: missing "size" param
505 abort: remote-changegroup: missing "size" param
506 [255]
506 [255]
507
507
508 Invalid size
508 Invalid size
509
509
510 $ cat > repo/.hg/bundle2maker << EOF
510 $ cat > repo/.hg/bundle2maker << EOF
511 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 'foo'}
511 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 'foo'}
512 > EOF
512 > EOF
513 $ hg pull -R clone ssh://user@dummy/repo
513 $ hg pull -R clone ssh://user@dummy/repo
514 pulling from ssh://user@dummy/repo
514 pulling from ssh://user@dummy/repo
515 searching for changes
515 searching for changes
516 remote: remote-changegroup
516 remote: remote-changegroup
517 abort: remote-changegroup: invalid value for param "size"
517 abort: remote-changegroup: invalid value for param "size"
518 [255]
518 [255]
519
519
520 Size mismatch
520 Size mismatch
521
521
522 $ cat > repo/.hg/bundle2maker << EOF
522 $ cat > repo/.hg/bundle2maker << EOF
523 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 42}
523 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 42}
524 > EOF
524 > EOF
525 $ hg pull -R clone ssh://user@dummy/repo
525 $ hg pull -R clone ssh://user@dummy/repo
526 pulling from ssh://user@dummy/repo
526 pulling from ssh://user@dummy/repo
527 searching for changes
527 searching for changes
528 remote: remote-changegroup
528 remote: remote-changegroup
529 adding changesets
529 adding changesets
530 adding manifests
530 adding manifests
531 adding file changes
531 adding file changes
532 added 2 changesets with 2 changes to 2 files (+1 heads)
532 added 2 changesets with 2 changes to 2 files (+1 heads)
533 transaction abort!
533 transaction abort!
534 rollback completed
534 rollback completed
535 abort: bundle at http://localhost:$HGPORT/bundle4.hg is corrupted:
535 abort: bundle at http://localhost:$HGPORT/bundle4.hg is corrupted:
536 size mismatch: expected 42, got 581
536 size mismatch: expected 42, got 581
537 [255]
537 [255]
538
538
539 Unknown digest
539 Unknown digest
540
540
541 $ cat > repo/.hg/bundle2maker << EOF
541 $ cat > repo/.hg/bundle2maker << EOF
542 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 581, 'digests': 'foo', 'digest:foo': 'bar'}
542 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 581, 'digests': 'foo', 'digest:foo': 'bar'}
543 > EOF
543 > EOF
544 $ hg pull -R clone ssh://user@dummy/repo
544 $ hg pull -R clone ssh://user@dummy/repo
545 pulling from ssh://user@dummy/repo
545 pulling from ssh://user@dummy/repo
546 searching for changes
546 searching for changes
547 remote: remote-changegroup
547 remote: remote-changegroup
548 abort: missing support for remote-changegroup - digest:foo
548 abort: missing support for remote-changegroup - digest:foo
549 [255]
549 [255]
550
550
551 Missing digest
551 Missing digest
552
552
553 $ cat > repo/.hg/bundle2maker << EOF
553 $ cat > repo/.hg/bundle2maker << EOF
554 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 581, 'digests': 'sha1'}
554 > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 581, 'digests': 'sha1'}
555 > EOF
555 > EOF
556 $ hg pull -R clone ssh://user@dummy/repo
556 $ hg pull -R clone ssh://user@dummy/repo
557 pulling from ssh://user@dummy/repo
557 pulling from ssh://user@dummy/repo
558 searching for changes
558 searching for changes
559 remote: remote-changegroup
559 remote: remote-changegroup
560 abort: remote-changegroup: missing "digest:sha1" param
560 abort: remote-changegroup: missing "digest:sha1" param
561 [255]
561 [255]
562
562
563 Not an HTTP url
563 Not an HTTP url
564
564
565 $ cat > repo/.hg/bundle2maker << EOF
565 $ cat > repo/.hg/bundle2maker << EOF
566 > raw-remote-changegroup {'url': 'ssh://localhost:$HGPORT/bundle4.hg', 'size': 581}
566 > raw-remote-changegroup {'url': 'ssh://localhost:$HGPORT/bundle4.hg', 'size': 581}
567 > EOF
567 > EOF
568 $ hg pull -R clone ssh://user@dummy/repo
568 $ hg pull -R clone ssh://user@dummy/repo
569 pulling from ssh://user@dummy/repo
569 pulling from ssh://user@dummy/repo
570 searching for changes
570 searching for changes
571 remote: remote-changegroup
571 remote: remote-changegroup
572 abort: remote-changegroup does not support ssh urls
572 abort: remote-changegroup does not support ssh urls
573 [255]
573 [255]
574
574
575 Not a bundle
575 Not a bundle
576
576
577 $ cat > notbundle.hg << EOF
577 $ cat > notbundle.hg << EOF
578 > foo
578 > foo
579 > EOF
579 > EOF
580 $ cat > repo/.hg/bundle2maker << EOF
580 $ cat > repo/.hg/bundle2maker << EOF
581 > remote-changegroup http://localhost:$HGPORT/notbundle.hg notbundle.hg
581 > remote-changegroup http://localhost:$HGPORT/notbundle.hg notbundle.hg
582 > EOF
582 > EOF
583 $ hg pull -R clone ssh://user@dummy/repo
583 $ hg pull -R clone ssh://user@dummy/repo
584 pulling from ssh://user@dummy/repo
584 pulling from ssh://user@dummy/repo
585 searching for changes
585 searching for changes
586 remote: remote-changegroup
586 remote: remote-changegroup
587 abort: http://localhost:$HGPORT/notbundle.hg: not a Mercurial bundle
587 abort: http://localhost:$HGPORT/notbundle.hg: not a Mercurial bundle
588 [255]
588 [255]
589
589
590 Not a bundle 1.0
590 Not a bundle 1.0
591
591
592 $ cat > notbundle10.hg << EOF
592 $ cat > notbundle10.hg << EOF
593 > HG20
593 > HG20
594 > EOF
594 > EOF
595 $ cat > repo/.hg/bundle2maker << EOF
595 $ cat > repo/.hg/bundle2maker << EOF
596 > remote-changegroup http://localhost:$HGPORT/notbundle10.hg notbundle10.hg
596 > remote-changegroup http://localhost:$HGPORT/notbundle10.hg notbundle10.hg
597 > EOF
597 > EOF
598 $ hg pull -R clone ssh://user@dummy/repo
598 $ hg pull -R clone ssh://user@dummy/repo
599 pulling from ssh://user@dummy/repo
599 pulling from ssh://user@dummy/repo
600 searching for changes
600 searching for changes
601 remote: remote-changegroup
601 remote: remote-changegroup
602 abort: http://localhost:$HGPORT/notbundle10.hg: not a bundle version 1.0
602 abort: http://localhost:$HGPORT/notbundle10.hg: not a bundle version 1.0
603 [255]
603 [255]
604
604
605 $ hg -R clone log -G
605 $ hg -R clone log -G
606 @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C
606 @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C
607 |
607 |
608 o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B
608 o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B
609 |
609 |
610 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
610 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
611
611
612 $ rm -rf clone
612 $ rm -rf clone
613
613
614 $ killdaemons.py
614 $ killdaemons.py
General Comments 0
You need to be logged in to leave comments. Login now