Show More
@@ -1,807 +1,807 b'' | |||||
1 | #require serve |
|
1 | #require serve | |
2 |
|
2 | |||
3 | $ cat << EOF >> $HGRCPATH |
|
3 | $ cat << EOF >> $HGRCPATH | |
4 | > [ui] |
|
4 | > [ui] | |
5 | > logtemplate={rev}:{node|short} {desc|firstline} |
|
5 | > logtemplate={rev}:{node|short} {desc|firstline} | |
6 | > [phases] |
|
6 | > [phases] | |
7 | > publish=False |
|
7 | > publish=False | |
8 | > [experimental] |
|
8 | > [experimental] | |
9 | > evolution=createmarkers,exchange |
|
9 | > evolution=createmarkers,exchange | |
10 | > # drop me once bundle2 is the default, |
|
10 | > # drop me once bundle2 is the default, | |
11 | > # added to get test change early. |
|
11 | > # added to get test change early. | |
12 | > bundle2-exp = True |
|
12 | > bundle2-exp = True | |
13 | > EOF |
|
13 | > EOF | |
14 |
|
14 | |||
15 | initialize |
|
15 | initialize | |
16 |
|
16 | |||
17 | $ hg init a |
|
17 | $ hg init a | |
18 | $ cd a |
|
18 | $ cd a | |
19 | $ echo 'test' > test |
|
19 | $ echo 'test' > test | |
20 | $ hg commit -Am'test' |
|
20 | $ hg commit -Am'test' | |
21 | adding test |
|
21 | adding test | |
22 |
|
22 | |||
23 | set bookmarks |
|
23 | set bookmarks | |
24 |
|
24 | |||
25 | $ hg bookmark X |
|
25 | $ hg bookmark X | |
26 | $ hg bookmark Y |
|
26 | $ hg bookmark Y | |
27 | $ hg bookmark Z |
|
27 | $ hg bookmark Z | |
28 |
|
28 | |||
29 | import bookmark by name |
|
29 | import bookmark by name | |
30 |
|
30 | |||
31 | $ hg init ../b |
|
31 | $ hg init ../b | |
32 | $ cd ../b |
|
32 | $ cd ../b | |
33 | $ hg book Y |
|
33 | $ hg book Y | |
34 | $ hg book |
|
34 | $ hg book | |
35 | * Y -1:000000000000 |
|
35 | * Y -1:000000000000 | |
36 | $ hg pull ../a |
|
36 | $ hg pull ../a | |
37 | pulling from ../a |
|
37 | pulling from ../a | |
38 | requesting all changes |
|
38 | requesting all changes | |
39 | adding changesets |
|
39 | adding changesets | |
40 | adding manifests |
|
40 | adding manifests | |
41 | adding file changes |
|
41 | adding file changes | |
42 | added 1 changesets with 1 changes to 1 files |
|
42 | added 1 changesets with 1 changes to 1 files | |
43 | adding remote bookmark X |
|
43 | adding remote bookmark X | |
44 | updating bookmark Y |
|
44 | updating bookmark Y | |
45 | adding remote bookmark Z |
|
45 | adding remote bookmark Z | |
46 | (run 'hg update' to get a working copy) |
|
46 | (run 'hg update' to get a working copy) | |
47 | $ hg bookmarks |
|
47 | $ hg bookmarks | |
48 | X 0:4e3505fd9583 |
|
48 | X 0:4e3505fd9583 | |
49 | * Y 0:4e3505fd9583 |
|
49 | * Y 0:4e3505fd9583 | |
50 | Z 0:4e3505fd9583 |
|
50 | Z 0:4e3505fd9583 | |
51 | $ hg debugpushkey ../a namespaces |
|
51 | $ hg debugpushkey ../a namespaces | |
52 | bookmarks |
|
52 | bookmarks | |
53 | namespaces |
|
53 | namespaces | |
54 | obsolete |
|
54 | obsolete | |
55 | phases |
|
55 | phases | |
56 | $ hg debugpushkey ../a bookmarks |
|
56 | $ hg debugpushkey ../a bookmarks | |
57 | X 4e3505fd95835d721066b76e75dbb8cc554d7f77 |
|
57 | X 4e3505fd95835d721066b76e75dbb8cc554d7f77 | |
58 | Y 4e3505fd95835d721066b76e75dbb8cc554d7f77 |
|
58 | Y 4e3505fd95835d721066b76e75dbb8cc554d7f77 | |
59 | Z 4e3505fd95835d721066b76e75dbb8cc554d7f77 |
|
59 | Z 4e3505fd95835d721066b76e75dbb8cc554d7f77 | |
60 |
|
60 | |||
61 | delete the bookmark to re-pull it |
|
61 | delete the bookmark to re-pull it | |
62 |
|
62 | |||
63 | $ hg book -d X |
|
63 | $ hg book -d X | |
64 | $ hg pull -B X ../a |
|
64 | $ hg pull -B X ../a | |
65 | pulling from ../a |
|
65 | pulling from ../a | |
66 | no changes found |
|
66 | no changes found | |
67 | adding remote bookmark X |
|
67 | adding remote bookmark X | |
68 |
|
68 | |||
69 | finally no-op pull |
|
69 | finally no-op pull | |
70 |
|
70 | |||
71 | $ hg pull -B X ../a |
|
71 | $ hg pull -B X ../a | |
72 | pulling from ../a |
|
72 | pulling from ../a | |
73 | no changes found |
|
73 | no changes found | |
74 | $ hg bookmark |
|
74 | $ hg bookmark | |
75 | X 0:4e3505fd9583 |
|
75 | X 0:4e3505fd9583 | |
76 | * Y 0:4e3505fd9583 |
|
76 | * Y 0:4e3505fd9583 | |
77 | Z 0:4e3505fd9583 |
|
77 | Z 0:4e3505fd9583 | |
78 |
|
78 | |||
79 | export bookmark by name |
|
79 | export bookmark by name | |
80 |
|
80 | |||
81 | $ hg bookmark W |
|
81 | $ hg bookmark W | |
82 | $ hg bookmark foo |
|
82 | $ hg bookmark foo | |
83 | $ hg bookmark foobar |
|
83 | $ hg bookmark foobar | |
84 | $ hg push -B W ../a |
|
84 | $ hg push -B W ../a | |
85 | pushing to ../a |
|
85 | pushing to ../a | |
86 | searching for changes |
|
86 | searching for changes | |
87 | no changes found |
|
87 | no changes found | |
88 | exporting bookmark W |
|
88 | exporting bookmark W | |
89 | [1] |
|
89 | [1] | |
90 | $ hg -R ../a bookmarks |
|
90 | $ hg -R ../a bookmarks | |
91 | W -1:000000000000 |
|
91 | W -1:000000000000 | |
92 | X 0:4e3505fd9583 |
|
92 | X 0:4e3505fd9583 | |
93 | Y 0:4e3505fd9583 |
|
93 | Y 0:4e3505fd9583 | |
94 | * Z 0:4e3505fd9583 |
|
94 | * Z 0:4e3505fd9583 | |
95 |
|
95 | |||
96 | delete a remote bookmark |
|
96 | delete a remote bookmark | |
97 |
|
97 | |||
98 | $ hg book -d W |
|
98 | $ hg book -d W | |
99 | $ hg push -B W ../a |
|
99 | $ hg push -B W ../a | |
100 | pushing to ../a |
|
100 | pushing to ../a | |
101 | searching for changes |
|
101 | searching for changes | |
102 | no changes found |
|
102 | no changes found | |
103 | deleting remote bookmark W |
|
103 | deleting remote bookmark W | |
104 | [1] |
|
104 | [1] | |
105 |
|
105 | |||
106 | push/pull name that doesn't exist |
|
106 | push/pull name that doesn't exist | |
107 |
|
107 | |||
108 | $ hg push -B badname ../a |
|
108 | $ hg push -B badname ../a | |
109 | pushing to ../a |
|
109 | pushing to ../a | |
110 | searching for changes |
|
110 | searching for changes | |
111 | bookmark badname does not exist on the local or remote repository! |
|
111 | bookmark badname does not exist on the local or remote repository! | |
112 | no changes found |
|
112 | no changes found | |
113 | [2] |
|
113 | [2] | |
114 | $ hg pull -B anotherbadname ../a |
|
114 | $ hg pull -B anotherbadname ../a | |
115 | pulling from ../a |
|
115 | pulling from ../a | |
116 | abort: remote bookmark anotherbadname not found! |
|
116 | abort: remote bookmark anotherbadname not found! | |
117 | [255] |
|
117 | [255] | |
118 |
|
118 | |||
119 | divergent bookmarks |
|
119 | divergent bookmarks | |
120 |
|
120 | |||
121 | $ cd ../a |
|
121 | $ cd ../a | |
122 | $ echo c1 > f1 |
|
122 | $ echo c1 > f1 | |
123 | $ hg ci -Am1 |
|
123 | $ hg ci -Am1 | |
124 | adding f1 |
|
124 | adding f1 | |
125 | $ hg book -f @ |
|
125 | $ hg book -f @ | |
126 | $ hg book -f X |
|
126 | $ hg book -f X | |
127 | $ hg book |
|
127 | $ hg book | |
128 | @ 1:0d2164f0ce0d |
|
128 | @ 1:0d2164f0ce0d | |
129 | * X 1:0d2164f0ce0d |
|
129 | * X 1:0d2164f0ce0d | |
130 | Y 0:4e3505fd9583 |
|
130 | Y 0:4e3505fd9583 | |
131 | Z 1:0d2164f0ce0d |
|
131 | Z 1:0d2164f0ce0d | |
132 |
|
132 | |||
133 | $ cd ../b |
|
133 | $ cd ../b | |
134 | $ hg up |
|
134 | $ hg up | |
135 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
135 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
136 | updating bookmark foobar |
|
136 | updating bookmark foobar | |
137 | $ echo c2 > f2 |
|
137 | $ echo c2 > f2 | |
138 | $ hg ci -Am2 |
|
138 | $ hg ci -Am2 | |
139 | adding f2 |
|
139 | adding f2 | |
140 | $ hg book -if @ |
|
140 | $ hg book -if @ | |
141 | $ hg book -if X |
|
141 | $ hg book -if X | |
142 | $ hg book |
|
142 | $ hg book | |
143 | @ 1:9b140be10808 |
|
143 | @ 1:9b140be10808 | |
144 | X 1:9b140be10808 |
|
144 | X 1:9b140be10808 | |
145 | Y 0:4e3505fd9583 |
|
145 | Y 0:4e3505fd9583 | |
146 | Z 0:4e3505fd9583 |
|
146 | Z 0:4e3505fd9583 | |
147 | foo -1:000000000000 |
|
147 | foo -1:000000000000 | |
148 | * foobar 1:9b140be10808 |
|
148 | * foobar 1:9b140be10808 | |
149 |
|
149 | |||
150 | $ hg pull --config paths.foo=../a foo |
|
150 | $ hg pull --config paths.foo=../a foo | |
151 | pulling from $TESTTMP/a (glob) |
|
151 | pulling from $TESTTMP/a (glob) | |
152 | searching for changes |
|
152 | searching for changes | |
153 | adding changesets |
|
153 | adding changesets | |
154 | adding manifests |
|
154 | adding manifests | |
155 | adding file changes |
|
155 | adding file changes | |
156 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
156 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
157 | divergent bookmark @ stored as @foo |
|
157 | divergent bookmark @ stored as @foo | |
158 | divergent bookmark X stored as X@foo |
|
158 | divergent bookmark X stored as X@foo | |
159 | updating bookmark Z |
|
159 | updating bookmark Z | |
160 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
160 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
161 | $ hg book |
|
161 | $ hg book | |
162 | @ 1:9b140be10808 |
|
162 | @ 1:9b140be10808 | |
163 | @foo 2:0d2164f0ce0d |
|
163 | @foo 2:0d2164f0ce0d | |
164 | X 1:9b140be10808 |
|
164 | X 1:9b140be10808 | |
165 | X@foo 2:0d2164f0ce0d |
|
165 | X@foo 2:0d2164f0ce0d | |
166 | Y 0:4e3505fd9583 |
|
166 | Y 0:4e3505fd9583 | |
167 | Z 2:0d2164f0ce0d |
|
167 | Z 2:0d2164f0ce0d | |
168 | foo -1:000000000000 |
|
168 | foo -1:000000000000 | |
169 | * foobar 1:9b140be10808 |
|
169 | * foobar 1:9b140be10808 | |
170 |
|
170 | |||
171 | (test that too many divergence of bookmark) |
|
171 | (test that too many divergence of bookmark) | |
172 |
|
172 | |||
173 | $ python $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -r 000000000000 "X@${i}"; done |
|
173 | $ python $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -r 000000000000 "X@${i}"; done | |
174 | $ hg pull ../a |
|
174 | $ hg pull ../a | |
175 | pulling from ../a |
|
175 | pulling from ../a | |
176 | searching for changes |
|
176 | searching for changes | |
177 | no changes found |
|
177 | no changes found | |
178 | warning: failed to assign numbered name to divergent bookmark X |
|
178 | warning: failed to assign numbered name to divergent bookmark X | |
179 | divergent bookmark @ stored as @1 |
|
179 | divergent bookmark @ stored as @1 | |
180 | $ hg bookmarks | grep '^ X' | grep -v ':000000000000' |
|
180 | $ hg bookmarks | grep '^ X' | grep -v ':000000000000' | |
181 | X 1:9b140be10808 |
|
181 | X 1:9b140be10808 | |
182 | X@foo 2:0d2164f0ce0d |
|
182 | X@foo 2:0d2164f0ce0d | |
183 |
|
183 | |||
184 | (test that remotely diverged bookmarks are reused if they aren't changed) |
|
184 | (test that remotely diverged bookmarks are reused if they aren't changed) | |
185 |
|
185 | |||
186 | $ hg bookmarks | grep '^ @' |
|
186 | $ hg bookmarks | grep '^ @' | |
187 | @ 1:9b140be10808 |
|
187 | @ 1:9b140be10808 | |
188 | @1 2:0d2164f0ce0d |
|
188 | @1 2:0d2164f0ce0d | |
189 | @foo 2:0d2164f0ce0d |
|
189 | @foo 2:0d2164f0ce0d | |
190 | $ hg pull ../a |
|
190 | $ hg pull ../a | |
191 | pulling from ../a |
|
191 | pulling from ../a | |
192 | searching for changes |
|
192 | searching for changes | |
193 | no changes found |
|
193 | no changes found | |
194 | warning: failed to assign numbered name to divergent bookmark X |
|
194 | warning: failed to assign numbered name to divergent bookmark X | |
195 | divergent bookmark @ stored as @1 |
|
195 | divergent bookmark @ stored as @1 | |
196 | $ hg bookmarks | grep '^ @' |
|
196 | $ hg bookmarks | grep '^ @' | |
197 | @ 1:9b140be10808 |
|
197 | @ 1:9b140be10808 | |
198 | @1 2:0d2164f0ce0d |
|
198 | @1 2:0d2164f0ce0d | |
199 | @foo 2:0d2164f0ce0d |
|
199 | @foo 2:0d2164f0ce0d | |
200 |
|
200 | |||
201 | $ python $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -d "X@${i}"; done |
|
201 | $ python $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -d "X@${i}"; done | |
202 | $ hg bookmarks -d "@1" |
|
202 | $ hg bookmarks -d "@1" | |
203 |
|
203 | |||
204 | $ hg push -f ../a |
|
204 | $ hg push -f ../a | |
205 | pushing to ../a |
|
205 | pushing to ../a | |
206 | searching for changes |
|
206 | searching for changes | |
207 | adding changesets |
|
207 | adding changesets | |
208 | adding manifests |
|
208 | adding manifests | |
209 | adding file changes |
|
209 | adding file changes | |
210 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
210 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
211 | $ hg -R ../a book |
|
211 | $ hg -R ../a book | |
212 | @ 1:0d2164f0ce0d |
|
212 | @ 1:0d2164f0ce0d | |
213 | * X 1:0d2164f0ce0d |
|
213 | * X 1:0d2164f0ce0d | |
214 | Y 0:4e3505fd9583 |
|
214 | Y 0:4e3505fd9583 | |
215 | Z 1:0d2164f0ce0d |
|
215 | Z 1:0d2164f0ce0d | |
216 |
|
216 | |||
217 | explicit pull should overwrite the local version (issue4439) |
|
217 | explicit pull should overwrite the local version (issue4439) | |
218 |
|
218 | |||
219 | $ hg pull --config paths.foo=../a foo -B X |
|
219 | $ hg pull --config paths.foo=../a foo -B X | |
220 | pulling from $TESTTMP/a (glob) |
|
220 | pulling from $TESTTMP/a (glob) | |
221 | no changes found |
|
221 | no changes found | |
222 | divergent bookmark @ stored as @foo |
|
222 | divergent bookmark @ stored as @foo | |
223 | importing bookmark X |
|
223 | importing bookmark X | |
224 |
|
224 | |||
225 | reinstall state for further testing: |
|
225 | reinstall state for further testing: | |
226 |
|
226 | |||
227 | $ hg book -fr 9b140be10808 X |
|
227 | $ hg book -fr 9b140be10808 X | |
228 |
|
228 | |||
229 | revsets should not ignore divergent bookmarks |
|
229 | revsets should not ignore divergent bookmarks | |
230 |
|
230 | |||
231 | $ hg bookmark -fr 1 Z |
|
231 | $ hg bookmark -fr 1 Z | |
232 | $ hg log -r 'bookmark()' --template '{rev}:{node|short} {bookmarks}\n' |
|
232 | $ hg log -r 'bookmark()' --template '{rev}:{node|short} {bookmarks}\n' | |
233 | 0:4e3505fd9583 Y |
|
233 | 0:4e3505fd9583 Y | |
234 | 1:9b140be10808 @ X Z foobar |
|
234 | 1:9b140be10808 @ X Z foobar | |
235 | 2:0d2164f0ce0d @foo X@foo |
|
235 | 2:0d2164f0ce0d @foo X@foo | |
236 | $ hg log -r 'bookmark("X@foo")' --template '{rev}:{node|short} {bookmarks}\n' |
|
236 | $ hg log -r 'bookmark("X@foo")' --template '{rev}:{node|short} {bookmarks}\n' | |
237 | 2:0d2164f0ce0d @foo X@foo |
|
237 | 2:0d2164f0ce0d @foo X@foo | |
238 | $ hg log -r 'bookmark("re:X@foo")' --template '{rev}:{node|short} {bookmarks}\n' |
|
238 | $ hg log -r 'bookmark("re:X@foo")' --template '{rev}:{node|short} {bookmarks}\n' | |
239 | 2:0d2164f0ce0d @foo X@foo |
|
239 | 2:0d2164f0ce0d @foo X@foo | |
240 |
|
240 | |||
241 | update a remote bookmark from a non-head to a head |
|
241 | update a remote bookmark from a non-head to a head | |
242 |
|
242 | |||
243 | $ hg up -q Y |
|
243 | $ hg up -q Y | |
244 | $ echo c3 > f2 |
|
244 | $ echo c3 > f2 | |
245 | $ hg ci -Am3 |
|
245 | $ hg ci -Am3 | |
246 | adding f2 |
|
246 | adding f2 | |
247 | created new head |
|
247 | created new head | |
248 | $ hg push ../a |
|
248 | $ hg push ../a | |
249 | pushing to ../a |
|
249 | pushing to ../a | |
250 | searching for changes |
|
250 | searching for changes | |
251 | adding changesets |
|
251 | adding changesets | |
252 | adding manifests |
|
252 | adding manifests | |
253 | adding file changes |
|
253 | adding file changes | |
254 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
254 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
255 | updating bookmark Y |
|
255 | updating bookmark Y | |
256 | $ hg -R ../a book |
|
256 | $ hg -R ../a book | |
257 | @ 1:0d2164f0ce0d |
|
257 | @ 1:0d2164f0ce0d | |
258 | * X 1:0d2164f0ce0d |
|
258 | * X 1:0d2164f0ce0d | |
259 | Y 3:f6fc62dde3c0 |
|
259 | Y 3:f6fc62dde3c0 | |
260 | Z 1:0d2164f0ce0d |
|
260 | Z 1:0d2164f0ce0d | |
261 |
|
261 | |||
262 | update a bookmark in the middle of a client pulling changes |
|
262 | update a bookmark in the middle of a client pulling changes | |
263 |
|
263 | |||
264 | $ cd .. |
|
264 | $ cd .. | |
265 | $ hg clone -q a pull-race |
|
265 | $ hg clone -q a pull-race | |
266 |
|
266 | |||
267 | We want to use http because it is stateless and therefore more susceptible to |
|
267 | We want to use http because it is stateless and therefore more susceptible to | |
268 | race conditions |
|
268 | race conditions | |
269 |
|
269 | |||
270 | $ hg -R pull-race serve -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log |
|
270 | $ hg -R pull-race serve -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log | |
271 | $ cat pull-race.pid >> $DAEMON_PIDS |
|
271 | $ cat pull-race.pid >> $DAEMON_PIDS | |
272 |
|
272 | |||
273 | $ hg clone -q http://localhost:$HGPORT/ pull-race2 |
|
273 | $ hg clone -q http://localhost:$HGPORT/ pull-race2 | |
274 | $ cd pull-race |
|
274 | $ cd pull-race | |
275 | $ hg up -q Y |
|
275 | $ hg up -q Y | |
276 | $ echo c4 > f2 |
|
276 | $ echo c4 > f2 | |
277 | $ hg ci -Am4 |
|
277 | $ hg ci -Am4 | |
278 | $ echo c5 > f3 |
|
278 | $ echo c5 > f3 | |
279 | $ cat <<EOF > .hg/hgrc |
|
279 | $ cat <<EOF > .hg/hgrc | |
280 | > [hooks] |
|
280 | > [hooks] | |
281 | > outgoing.makecommit = hg ci -Am5; echo committed in pull-race |
|
281 | > outgoing.makecommit = hg ci -Am5; echo committed in pull-race | |
282 | > EOF |
|
282 | > EOF | |
283 |
|
283 | |||
284 | (new config needs a server restart) |
|
284 | (new config needs a server restart) | |
285 |
|
285 | |||
286 | $ cd .. |
|
286 | $ cd .. | |
287 | $ killdaemons.py |
|
287 | $ killdaemons.py | |
288 | $ hg -R pull-race serve -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log |
|
288 | $ hg -R pull-race serve -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log | |
289 | $ cat pull-race.pid >> $DAEMON_PIDS |
|
289 | $ cat pull-race.pid >> $DAEMON_PIDS | |
290 | $ cd pull-race2 |
|
290 | $ cd pull-race2 | |
291 | $ hg -R $TESTTMP/pull-race book |
|
291 | $ hg -R $TESTTMP/pull-race book | |
292 | @ 1:0d2164f0ce0d |
|
292 | @ 1:0d2164f0ce0d | |
293 | X 1:0d2164f0ce0d |
|
293 | X 1:0d2164f0ce0d | |
294 | * Y 4:b0a5eff05604 |
|
294 | * Y 4:b0a5eff05604 | |
295 | Z 1:0d2164f0ce0d |
|
295 | Z 1:0d2164f0ce0d | |
296 | $ hg pull |
|
296 | $ hg pull | |
297 | pulling from http://localhost:$HGPORT/ |
|
297 | pulling from http://localhost:$HGPORT/ | |
298 | searching for changes |
|
298 | searching for changes | |
299 | adding changesets |
|
299 | adding changesets | |
300 | adding manifests |
|
300 | adding manifests | |
301 | adding file changes |
|
301 | adding file changes | |
302 | added 1 changesets with 1 changes to 1 files |
|
302 | added 1 changesets with 1 changes to 1 files | |
303 | updating bookmark Y |
|
303 | updating bookmark Y | |
304 | (run 'hg update' to get a working copy) |
|
304 | (run 'hg update' to get a working copy) | |
305 | $ hg book |
|
305 | $ hg book | |
306 | * @ 1:0d2164f0ce0d |
|
306 | * @ 1:0d2164f0ce0d | |
307 | X 1:0d2164f0ce0d |
|
307 | X 1:0d2164f0ce0d | |
308 | Y 4:b0a5eff05604 |
|
308 | Y 4:b0a5eff05604 | |
309 | Z 1:0d2164f0ce0d |
|
309 | Z 1:0d2164f0ce0d | |
310 |
|
310 | |||
311 | Update a bookmark right after the initial lookup -B (issue4689) |
|
311 | Update a bookmark right after the initial lookup -B (issue4689) | |
312 |
|
312 | |||
313 | $ echo c6 > ../pull-race/f3 # to be committed during the race |
|
313 | $ echo c6 > ../pull-race/f3 # to be committed during the race | |
314 | $ cat <<EOF > ../pull-race/.hg/hgrc |
|
314 | $ cat <<EOF > ../pull-race/.hg/hgrc | |
315 | > [hooks] |
|
315 | > [hooks] | |
316 | > # If anything to commit, commit it right after the first key listing used |
|
316 | > # If anything to commit, commit it right after the first key listing used | |
317 | > # during lookup. This makes the commit appear before the actual getbundle |
|
317 | > # during lookup. This makes the commit appear before the actual getbundle | |
318 | > # call. |
|
318 | > # call. | |
319 | > listkeys.makecommit= ((hg st | grep -q M) && (hg commit -m race; echo commited in pull-race)) || exit 0 |
|
319 | > listkeys.makecommit= ((hg st | grep -q M) && (hg commit -m race; echo commited in pull-race)) || exit 0 | |
320 | > EOF |
|
320 | > EOF | |
321 |
|
321 | |||
322 | (new config need server restart) |
|
322 | (new config need server restart) | |
323 |
|
323 | |||
324 | $ killdaemons.py |
|
324 | $ killdaemons.py | |
325 | $ hg -R ../pull-race serve -p $HGPORT -d --pid-file=../pull-race.pid -E main-error.log |
|
325 | $ hg -R ../pull-race serve -p $HGPORT -d --pid-file=../pull-race.pid -E main-error.log | |
326 | $ cat ../pull-race.pid >> $DAEMON_PIDS |
|
326 | $ cat ../pull-race.pid >> $DAEMON_PIDS | |
327 |
|
327 | |||
328 | $ hg -R $TESTTMP/pull-race book |
|
328 | $ hg -R $TESTTMP/pull-race book | |
329 | @ 1:0d2164f0ce0d |
|
329 | @ 1:0d2164f0ce0d | |
330 | X 1:0d2164f0ce0d |
|
330 | X 1:0d2164f0ce0d | |
331 | * Y 5:35d1ef0a8d1b |
|
331 | * Y 5:35d1ef0a8d1b | |
332 | Z 1:0d2164f0ce0d |
|
332 | Z 1:0d2164f0ce0d | |
333 | $ hg pull -B Y |
|
333 | $ hg pull -B Y | |
334 | pulling from http://localhost:$HGPORT/ |
|
334 | pulling from http://localhost:$HGPORT/ | |
335 | searching for changes |
|
335 | searching for changes | |
336 | adding changesets |
|
336 | adding changesets | |
337 | adding manifests |
|
337 | adding manifests | |
338 | adding file changes |
|
338 | adding file changes | |
339 | added 1 changesets with 1 changes to 1 files |
|
339 | added 1 changesets with 1 changes to 1 files | |
340 | updating bookmark Y |
|
340 | updating bookmark Y | |
341 | (run 'hg update' to get a working copy) |
|
341 | (run 'hg update' to get a working copy) | |
342 | $ hg book |
|
342 | $ hg book | |
343 | * @ 1:0d2164f0ce0d |
|
343 | * @ 1:0d2164f0ce0d | |
344 | X 1:0d2164f0ce0d |
|
344 | X 1:0d2164f0ce0d | |
345 | Y 5:35d1ef0a8d1b |
|
345 | Y 5:35d1ef0a8d1b | |
346 | Z 1:0d2164f0ce0d |
|
346 | Z 1:0d2164f0ce0d | |
347 |
|
347 | |||
348 | (done with this section of the test) |
|
348 | (done with this section of the test) | |
349 |
|
349 | |||
350 | $ killdaemons.py |
|
350 | $ killdaemons.py | |
351 | $ cd ../b |
|
351 | $ cd ../b | |
352 |
|
352 | |||
353 | diverging a remote bookmark fails |
|
353 | diverging a remote bookmark fails | |
354 |
|
354 | |||
355 | $ hg up -q 4e3505fd9583 |
|
355 | $ hg up -q 4e3505fd9583 | |
356 | $ echo c4 > f2 |
|
356 | $ echo c4 > f2 | |
357 | $ hg ci -Am4 |
|
357 | $ hg ci -Am4 | |
358 | adding f2 |
|
358 | adding f2 | |
359 | created new head |
|
359 | created new head | |
360 | $ echo c5 > f2 |
|
360 | $ echo c5 > f2 | |
361 | $ hg ci -Am5 |
|
361 | $ hg ci -Am5 | |
362 | $ hg log -G |
|
362 | $ hg log -G | |
363 | @ 5:c922c0139ca0 5 |
|
363 | @ 5:c922c0139ca0 5 | |
364 | | |
|
364 | | | |
365 | o 4:4efff6d98829 4 |
|
365 | o 4:4efff6d98829 4 | |
366 | | |
|
366 | | | |
367 | | o 3:f6fc62dde3c0 3 |
|
367 | | o 3:f6fc62dde3c0 3 | |
368 | |/ |
|
368 | |/ | |
369 | | o 2:0d2164f0ce0d 1 |
|
369 | | o 2:0d2164f0ce0d 1 | |
370 | |/ |
|
370 | |/ | |
371 | | o 1:9b140be10808 2 |
|
371 | | o 1:9b140be10808 2 | |
372 | |/ |
|
372 | |/ | |
373 | o 0:4e3505fd9583 test |
|
373 | o 0:4e3505fd9583 test | |
374 |
|
374 | |||
375 |
|
375 | |||
376 | $ hg book -f Y |
|
376 | $ hg book -f Y | |
377 |
|
377 | |||
378 | $ cat <<EOF > ../a/.hg/hgrc |
|
378 | $ cat <<EOF > ../a/.hg/hgrc | |
379 | > [web] |
|
379 | > [web] | |
380 | > push_ssl = false |
|
380 | > push_ssl = false | |
381 | > allow_push = * |
|
381 | > allow_push = * | |
382 | > EOF |
|
382 | > EOF | |
383 |
|
383 | |||
384 | $ hg -R ../a serve -p $HGPORT2 -d --pid-file=../hg2.pid |
|
384 | $ hg -R ../a serve -p $HGPORT2 -d --pid-file=../hg2.pid | |
385 | $ cat ../hg2.pid >> $DAEMON_PIDS |
|
385 | $ cat ../hg2.pid >> $DAEMON_PIDS | |
386 |
|
386 | |||
387 | $ hg push http://localhost:$HGPORT2/ |
|
387 | $ hg push http://localhost:$HGPORT2/ | |
388 | pushing to http://localhost:$HGPORT2/ |
|
388 | pushing to http://localhost:$HGPORT2/ | |
389 | searching for changes |
|
389 | searching for changes | |
390 | abort: push creates new remote head c922c0139ca0 with bookmark 'Y'! |
|
390 | abort: push creates new remote head c922c0139ca0 with bookmark 'Y'! | |
391 | (merge or see "hg help push" for details about pushing new heads) |
|
391 | (merge or see "hg help push" for details about pushing new heads) | |
392 | [255] |
|
392 | [255] | |
393 | $ hg -R ../a book |
|
393 | $ hg -R ../a book | |
394 | @ 1:0d2164f0ce0d |
|
394 | @ 1:0d2164f0ce0d | |
395 | * X 1:0d2164f0ce0d |
|
395 | * X 1:0d2164f0ce0d | |
396 | Y 3:f6fc62dde3c0 |
|
396 | Y 3:f6fc62dde3c0 | |
397 | Z 1:0d2164f0ce0d |
|
397 | Z 1:0d2164f0ce0d | |
398 |
|
398 | |||
399 |
|
399 | |||
400 | Unrelated marker does not alter the decision |
|
400 | Unrelated marker does not alter the decision | |
401 |
|
401 | |||
402 | $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
402 | $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb | |
403 | $ hg push http://localhost:$HGPORT2/ |
|
403 | $ hg push http://localhost:$HGPORT2/ | |
404 | pushing to http://localhost:$HGPORT2/ |
|
404 | pushing to http://localhost:$HGPORT2/ | |
405 | searching for changes |
|
405 | searching for changes | |
406 | abort: push creates new remote head c922c0139ca0 with bookmark 'Y'! |
|
406 | abort: push creates new remote head c922c0139ca0 with bookmark 'Y'! | |
407 | (merge or see "hg help push" for details about pushing new heads) |
|
407 | (merge or see "hg help push" for details about pushing new heads) | |
408 | [255] |
|
408 | [255] | |
409 | $ hg -R ../a book |
|
409 | $ hg -R ../a book | |
410 | @ 1:0d2164f0ce0d |
|
410 | @ 1:0d2164f0ce0d | |
411 | * X 1:0d2164f0ce0d |
|
411 | * X 1:0d2164f0ce0d | |
412 | Y 3:f6fc62dde3c0 |
|
412 | Y 3:f6fc62dde3c0 | |
413 | Z 1:0d2164f0ce0d |
|
413 | Z 1:0d2164f0ce0d | |
414 |
|
414 | |||
415 | Update to a successor works |
|
415 | Update to a successor works | |
416 |
|
416 | |||
417 | $ hg id --debug -r 3 |
|
417 | $ hg id --debug -r 3 | |
418 | f6fc62dde3c0771e29704af56ba4d8af77abcc2f |
|
418 | f6fc62dde3c0771e29704af56ba4d8af77abcc2f | |
419 | $ hg id --debug -r 4 |
|
419 | $ hg id --debug -r 4 | |
420 | 4efff6d98829d9c824c621afd6e3f01865f5439f |
|
420 | 4efff6d98829d9c824c621afd6e3f01865f5439f | |
421 | $ hg id --debug -r 5 |
|
421 | $ hg id --debug -r 5 | |
422 | c922c0139ca03858f655e4a2af4dd02796a63969 tip Y |
|
422 | c922c0139ca03858f655e4a2af4dd02796a63969 tip Y | |
423 | $ hg debugobsolete f6fc62dde3c0771e29704af56ba4d8af77abcc2f cccccccccccccccccccccccccccccccccccccccc |
|
423 | $ hg debugobsolete f6fc62dde3c0771e29704af56ba4d8af77abcc2f cccccccccccccccccccccccccccccccccccccccc | |
424 | $ hg debugobsolete cccccccccccccccccccccccccccccccccccccccc 4efff6d98829d9c824c621afd6e3f01865f5439f |
|
424 | $ hg debugobsolete cccccccccccccccccccccccccccccccccccccccc 4efff6d98829d9c824c621afd6e3f01865f5439f | |
425 | $ hg push http://localhost:$HGPORT2/ |
|
425 | $ hg push http://localhost:$HGPORT2/ | |
426 | pushing to http://localhost:$HGPORT2/ |
|
426 | pushing to http://localhost:$HGPORT2/ | |
427 | searching for changes |
|
427 | searching for changes | |
428 | remote: adding changesets |
|
428 | remote: adding changesets | |
429 | remote: adding manifests |
|
429 | remote: adding manifests | |
430 | remote: adding file changes |
|
430 | remote: adding file changes | |
431 | remote: added 2 changesets with 2 changes to 1 files (+1 heads) |
|
431 | remote: added 2 changesets with 2 changes to 1 files (+1 heads) | |
432 | remote: 2 new obsolescence markers |
|
432 | remote: 2 new obsolescence markers | |
433 | updating bookmark Y |
|
433 | updating bookmark Y | |
434 | $ hg -R ../a book |
|
434 | $ hg -R ../a book | |
435 | @ 1:0d2164f0ce0d |
|
435 | @ 1:0d2164f0ce0d | |
436 | * X 1:0d2164f0ce0d |
|
436 | * X 1:0d2164f0ce0d | |
437 | Y 5:c922c0139ca0 |
|
437 | Y 5:c922c0139ca0 | |
438 | Z 1:0d2164f0ce0d |
|
438 | Z 1:0d2164f0ce0d | |
439 |
|
439 | |||
440 | hgweb |
|
440 | hgweb | |
441 |
|
441 | |||
442 | $ cat <<EOF > .hg/hgrc |
|
442 | $ cat <<EOF > .hg/hgrc | |
443 | > [web] |
|
443 | > [web] | |
444 | > push_ssl = false |
|
444 | > push_ssl = false | |
445 | > allow_push = * |
|
445 | > allow_push = * | |
446 | > EOF |
|
446 | > EOF | |
447 |
|
447 | |||
448 | $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log |
|
448 | $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log | |
449 | $ cat ../hg.pid >> $DAEMON_PIDS |
|
449 | $ cat ../hg.pid >> $DAEMON_PIDS | |
450 | $ cd ../a |
|
450 | $ cd ../a | |
451 |
|
451 | |||
452 | $ hg debugpushkey http://localhost:$HGPORT/ namespaces |
|
452 | $ hg debugpushkey http://localhost:$HGPORT/ namespaces | |
453 | bookmarks |
|
453 | bookmarks | |
454 | namespaces |
|
454 | namespaces | |
455 | obsolete |
|
455 | obsolete | |
456 | phases |
|
456 | phases | |
457 | $ hg debugpushkey http://localhost:$HGPORT/ bookmarks |
|
457 | $ hg debugpushkey http://localhost:$HGPORT/ bookmarks | |
458 | @ 9b140be1080824d768c5a4691a564088eede71f9 |
|
458 | @ 9b140be1080824d768c5a4691a564088eede71f9 | |
459 | X 9b140be1080824d768c5a4691a564088eede71f9 |
|
459 | X 9b140be1080824d768c5a4691a564088eede71f9 | |
460 | Y c922c0139ca03858f655e4a2af4dd02796a63969 |
|
460 | Y c922c0139ca03858f655e4a2af4dd02796a63969 | |
461 | Z 9b140be1080824d768c5a4691a564088eede71f9 |
|
461 | Z 9b140be1080824d768c5a4691a564088eede71f9 | |
462 | foo 0000000000000000000000000000000000000000 |
|
462 | foo 0000000000000000000000000000000000000000 | |
463 | foobar 9b140be1080824d768c5a4691a564088eede71f9 |
|
463 | foobar 9b140be1080824d768c5a4691a564088eede71f9 | |
464 | $ hg out -B http://localhost:$HGPORT/ |
|
464 | $ hg out -B http://localhost:$HGPORT/ | |
465 | comparing with http://localhost:$HGPORT/ |
|
465 | comparing with http://localhost:$HGPORT/ | |
466 | searching for changed bookmarks |
|
466 | searching for changed bookmarks | |
467 | @ 0d2164f0ce0d |
|
467 | @ 0d2164f0ce0d | |
468 | X 0d2164f0ce0d |
|
468 | X 0d2164f0ce0d | |
469 | Z 0d2164f0ce0d |
|
469 | Z 0d2164f0ce0d | |
470 | foo |
|
470 | foo | |
471 | foobar |
|
471 | foobar | |
472 | $ hg push -B Z http://localhost:$HGPORT/ |
|
472 | $ hg push -B Z http://localhost:$HGPORT/ | |
473 | pushing to http://localhost:$HGPORT/ |
|
473 | pushing to http://localhost:$HGPORT/ | |
474 | searching for changes |
|
474 | searching for changes | |
475 | no changes found |
|
475 | no changes found | |
476 | updating bookmark Z |
|
476 | updating bookmark Z | |
477 | [1] |
|
477 | [1] | |
478 | $ hg book -d Z |
|
478 | $ hg book -d Z | |
479 | $ hg in -B http://localhost:$HGPORT/ |
|
479 | $ hg in -B http://localhost:$HGPORT/ | |
480 | comparing with http://localhost:$HGPORT/ |
|
480 | comparing with http://localhost:$HGPORT/ | |
481 | searching for changed bookmarks |
|
481 | searching for changed bookmarks | |
482 | @ 9b140be10808 |
|
482 | @ 9b140be10808 | |
483 | X 9b140be10808 |
|
483 | X 9b140be10808 | |
484 | Z 0d2164f0ce0d |
|
484 | Z 0d2164f0ce0d | |
485 | foo 000000000000 |
|
485 | foo 000000000000 | |
486 | foobar 9b140be10808 |
|
486 | foobar 9b140be10808 | |
487 | $ hg pull -B Z http://localhost:$HGPORT/ |
|
487 | $ hg pull -B Z http://localhost:$HGPORT/ | |
488 | pulling from http://localhost:$HGPORT/ |
|
488 | pulling from http://localhost:$HGPORT/ | |
489 | no changes found |
|
489 | no changes found | |
490 | divergent bookmark @ stored as @1 |
|
490 | divergent bookmark @ stored as @1 | |
491 | divergent bookmark X stored as X@1 |
|
491 | divergent bookmark X stored as X@1 | |
492 | adding remote bookmark Z |
|
492 | adding remote bookmark Z | |
493 | adding remote bookmark foo |
|
493 | adding remote bookmark foo | |
494 | adding remote bookmark foobar |
|
494 | adding remote bookmark foobar | |
495 | $ hg clone http://localhost:$HGPORT/ cloned-bookmarks |
|
495 | $ hg clone http://localhost:$HGPORT/ cloned-bookmarks | |
496 | requesting all changes |
|
496 | requesting all changes | |
497 | adding changesets |
|
497 | adding changesets | |
498 | adding manifests |
|
498 | adding manifests | |
499 | adding file changes |
|
499 | adding file changes | |
500 | added 5 changesets with 5 changes to 3 files (+2 heads) |
|
500 | added 5 changesets with 5 changes to 3 files (+2 heads) | |
501 | 2 new obsolescence markers |
|
501 | 2 new obsolescence markers | |
502 | updating to bookmark @ |
|
502 | updating to bookmark @ | |
503 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
503 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
504 | $ hg -R cloned-bookmarks bookmarks |
|
504 | $ hg -R cloned-bookmarks bookmarks | |
505 | * @ 1:9b140be10808 |
|
505 | * @ 1:9b140be10808 | |
506 | X 1:9b140be10808 |
|
506 | X 1:9b140be10808 | |
507 | Y 4:c922c0139ca0 |
|
507 | Y 4:c922c0139ca0 | |
508 | Z 2:0d2164f0ce0d |
|
508 | Z 2:0d2164f0ce0d | |
509 | foo -1:000000000000 |
|
509 | foo -1:000000000000 | |
510 | foobar 1:9b140be10808 |
|
510 | foobar 1:9b140be10808 | |
511 |
|
511 | |||
512 | $ cd .. |
|
512 | $ cd .. | |
513 |
|
513 | |||
514 | Test to show result of bookmarks comparision |
|
514 | Test to show result of bookmarks comparision | |
515 |
|
515 | |||
516 | $ mkdir bmcomparison |
|
516 | $ mkdir bmcomparison | |
517 | $ cd bmcomparison |
|
517 | $ cd bmcomparison | |
518 |
|
518 | |||
519 | $ hg init source |
|
519 | $ hg init source | |
520 | $ hg -R source debugbuilddag '+2*2*3*4' |
|
520 | $ hg -R source debugbuilddag '+2*2*3*4' | |
521 | $ hg -R source log -G --template '{rev}:{node|short}' |
|
521 | $ hg -R source log -G --template '{rev}:{node|short}' | |
522 | o 4:e7bd5218ca15 |
|
522 | o 4:e7bd5218ca15 | |
523 | | |
|
523 | | | |
524 | | o 3:6100d3090acf |
|
524 | | o 3:6100d3090acf | |
525 | |/ |
|
525 | |/ | |
526 | | o 2:fa942426a6fd |
|
526 | | o 2:fa942426a6fd | |
527 | |/ |
|
527 | |/ | |
528 | | o 1:66f7d451a68b |
|
528 | | o 1:66f7d451a68b | |
529 | |/ |
|
529 | |/ | |
530 | o 0:1ea73414a91b |
|
530 | o 0:1ea73414a91b | |
531 |
|
531 | |||
532 | $ hg -R source bookmarks -r 0 SAME |
|
532 | $ hg -R source bookmarks -r 0 SAME | |
533 | $ hg -R source bookmarks -r 0 ADV_ON_REPO1 |
|
533 | $ hg -R source bookmarks -r 0 ADV_ON_REPO1 | |
534 | $ hg -R source bookmarks -r 0 ADV_ON_REPO2 |
|
534 | $ hg -R source bookmarks -r 0 ADV_ON_REPO2 | |
535 | $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO1 |
|
535 | $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO1 | |
536 | $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO2 |
|
536 | $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO2 | |
537 | $ hg -R source bookmarks -r 1 DIVERGED |
|
537 | $ hg -R source bookmarks -r 1 DIVERGED | |
538 |
|
538 | |||
539 | $ hg clone -U source repo1 |
|
539 | $ hg clone -U source repo1 | |
540 |
|
540 | |||
541 | (test that incoming/outgoing exit with 1, if there is no bookmark to |
|
541 | (test that incoming/outgoing exit with 1, if there is no bookmark to | |
542 | be excahnged) |
|
542 | be excahnged) | |
543 |
|
543 | |||
544 | $ hg -R repo1 incoming -B |
|
544 | $ hg -R repo1 incoming -B | |
545 | comparing with $TESTTMP/bmcomparison/source |
|
545 | comparing with $TESTTMP/bmcomparison/source | |
546 | searching for changed bookmarks |
|
546 | searching for changed bookmarks | |
547 | no changed bookmarks found |
|
547 | no changed bookmarks found | |
548 | [1] |
|
548 | [1] | |
549 | $ hg -R repo1 outgoing -B |
|
549 | $ hg -R repo1 outgoing -B | |
550 | comparing with $TESTTMP/bmcomparison/source |
|
550 | comparing with $TESTTMP/bmcomparison/source | |
551 | searching for changed bookmarks |
|
551 | searching for changed bookmarks | |
552 | no changed bookmarks found |
|
552 | no changed bookmarks found | |
553 | [1] |
|
553 | [1] | |
554 |
|
554 | |||
555 | $ hg -R repo1 bookmarks -f -r 1 ADD_ON_REPO1 |
|
555 | $ hg -R repo1 bookmarks -f -r 1 ADD_ON_REPO1 | |
556 | $ hg -R repo1 bookmarks -f -r 2 ADV_ON_REPO1 |
|
556 | $ hg -R repo1 bookmarks -f -r 2 ADV_ON_REPO1 | |
557 | $ hg -R repo1 bookmarks -f -r 3 DIFF_ADV_ON_REPO1 |
|
557 | $ hg -R repo1 bookmarks -f -r 3 DIFF_ADV_ON_REPO1 | |
558 | $ hg -R repo1 bookmarks -f -r 3 DIFF_DIVERGED |
|
558 | $ hg -R repo1 bookmarks -f -r 3 DIFF_DIVERGED | |
559 | $ hg -R repo1 -q --config extensions.mq= strip 4 |
|
559 | $ hg -R repo1 -q --config extensions.mq= strip 4 | |
560 | $ hg -R repo1 log -G --template '{node|short} ({bookmarks})' |
|
560 | $ hg -R repo1 log -G --template '{node|short} ({bookmarks})' | |
561 | o 6100d3090acf (DIFF_ADV_ON_REPO1 DIFF_DIVERGED) |
|
561 | o 6100d3090acf (DIFF_ADV_ON_REPO1 DIFF_DIVERGED) | |
562 | | |
|
562 | | | |
563 | | o fa942426a6fd (ADV_ON_REPO1) |
|
563 | | o fa942426a6fd (ADV_ON_REPO1) | |
564 | |/ |
|
564 | |/ | |
565 | | o 66f7d451a68b (ADD_ON_REPO1 DIVERGED) |
|
565 | | o 66f7d451a68b (ADD_ON_REPO1 DIVERGED) | |
566 | |/ |
|
566 | |/ | |
567 | o 1ea73414a91b (ADV_ON_REPO2 DIFF_ADV_ON_REPO2 SAME) |
|
567 | o 1ea73414a91b (ADV_ON_REPO2 DIFF_ADV_ON_REPO2 SAME) | |
568 |
|
568 | |||
569 |
|
569 | |||
570 | $ hg clone -U source repo2 |
|
570 | $ hg clone -U source repo2 | |
571 | $ hg -R repo2 bookmarks -f -r 1 ADD_ON_REPO2 |
|
571 | $ hg -R repo2 bookmarks -f -r 1 ADD_ON_REPO2 | |
572 | $ hg -R repo2 bookmarks -f -r 1 ADV_ON_REPO2 |
|
572 | $ hg -R repo2 bookmarks -f -r 1 ADV_ON_REPO2 | |
573 | $ hg -R repo2 bookmarks -f -r 2 DIVERGED |
|
573 | $ hg -R repo2 bookmarks -f -r 2 DIVERGED | |
574 | $ hg -R repo2 bookmarks -f -r 4 DIFF_ADV_ON_REPO2 |
|
574 | $ hg -R repo2 bookmarks -f -r 4 DIFF_ADV_ON_REPO2 | |
575 | $ hg -R repo2 bookmarks -f -r 4 DIFF_DIVERGED |
|
575 | $ hg -R repo2 bookmarks -f -r 4 DIFF_DIVERGED | |
576 | $ hg -R repo2 -q --config extensions.mq= strip 3 |
|
576 | $ hg -R repo2 -q --config extensions.mq= strip 3 | |
577 | $ hg -R repo2 log -G --template '{node|short} ({bookmarks})' |
|
577 | $ hg -R repo2 log -G --template '{node|short} ({bookmarks})' | |
578 | o e7bd5218ca15 (DIFF_ADV_ON_REPO2 DIFF_DIVERGED) |
|
578 | o e7bd5218ca15 (DIFF_ADV_ON_REPO2 DIFF_DIVERGED) | |
579 | | |
|
579 | | | |
580 | | o fa942426a6fd (DIVERGED) |
|
580 | | o fa942426a6fd (DIVERGED) | |
581 | |/ |
|
581 | |/ | |
582 | | o 66f7d451a68b (ADD_ON_REPO2 ADV_ON_REPO2) |
|
582 | | o 66f7d451a68b (ADD_ON_REPO2 ADV_ON_REPO2) | |
583 | |/ |
|
583 | |/ | |
584 | o 1ea73414a91b (ADV_ON_REPO1 DIFF_ADV_ON_REPO1 SAME) |
|
584 | o 1ea73414a91b (ADV_ON_REPO1 DIFF_ADV_ON_REPO1 SAME) | |
585 |
|
585 | |||
586 |
|
586 | |||
587 | (test that difference of bookmarks between repositories are fully shown) |
|
587 | (test that difference of bookmarks between repositories are fully shown) | |
588 |
|
588 | |||
589 | $ hg -R repo1 incoming -B repo2 -v |
|
589 | $ hg -R repo1 incoming -B repo2 -v | |
590 | comparing with repo2 |
|
590 | comparing with repo2 | |
591 | searching for changed bookmarks |
|
591 | searching for changed bookmarks | |
592 | ADD_ON_REPO2 66f7d451a68b added |
|
592 | ADD_ON_REPO2 66f7d451a68b added | |
593 | ADV_ON_REPO2 66f7d451a68b advanced |
|
593 | ADV_ON_REPO2 66f7d451a68b advanced | |
594 | DIFF_ADV_ON_REPO2 e7bd5218ca15 changed |
|
594 | DIFF_ADV_ON_REPO2 e7bd5218ca15 changed | |
595 | DIFF_DIVERGED e7bd5218ca15 changed |
|
595 | DIFF_DIVERGED e7bd5218ca15 changed | |
596 | DIVERGED fa942426a6fd diverged |
|
596 | DIVERGED fa942426a6fd diverged | |
597 | $ hg -R repo1 outgoing -B repo2 -v |
|
597 | $ hg -R repo1 outgoing -B repo2 -v | |
598 | comparing with repo2 |
|
598 | comparing with repo2 | |
599 | searching for changed bookmarks |
|
599 | searching for changed bookmarks | |
600 | ADD_ON_REPO1 66f7d451a68b added |
|
600 | ADD_ON_REPO1 66f7d451a68b added | |
601 | ADD_ON_REPO2 deleted |
|
601 | ADD_ON_REPO2 deleted | |
602 | ADV_ON_REPO1 fa942426a6fd advanced |
|
602 | ADV_ON_REPO1 fa942426a6fd advanced | |
603 | DIFF_ADV_ON_REPO1 6100d3090acf advanced |
|
603 | DIFF_ADV_ON_REPO1 6100d3090acf advanced | |
604 | DIFF_ADV_ON_REPO2 1ea73414a91b changed |
|
604 | DIFF_ADV_ON_REPO2 1ea73414a91b changed | |
605 | DIFF_DIVERGED 6100d3090acf changed |
|
605 | DIFF_DIVERGED 6100d3090acf changed | |
606 | DIVERGED 66f7d451a68b diverged |
|
606 | DIVERGED 66f7d451a68b diverged | |
607 |
|
607 | |||
608 | $ hg -R repo2 incoming -B repo1 -v |
|
608 | $ hg -R repo2 incoming -B repo1 -v | |
609 | comparing with repo1 |
|
609 | comparing with repo1 | |
610 | searching for changed bookmarks |
|
610 | searching for changed bookmarks | |
611 | ADD_ON_REPO1 66f7d451a68b added |
|
611 | ADD_ON_REPO1 66f7d451a68b added | |
612 | ADV_ON_REPO1 fa942426a6fd advanced |
|
612 | ADV_ON_REPO1 fa942426a6fd advanced | |
613 | DIFF_ADV_ON_REPO1 6100d3090acf changed |
|
613 | DIFF_ADV_ON_REPO1 6100d3090acf changed | |
614 | DIFF_DIVERGED 6100d3090acf changed |
|
614 | DIFF_DIVERGED 6100d3090acf changed | |
615 | DIVERGED 66f7d451a68b diverged |
|
615 | DIVERGED 66f7d451a68b diverged | |
616 | $ hg -R repo2 outgoing -B repo1 -v |
|
616 | $ hg -R repo2 outgoing -B repo1 -v | |
617 | comparing with repo1 |
|
617 | comparing with repo1 | |
618 | searching for changed bookmarks |
|
618 | searching for changed bookmarks | |
619 | ADD_ON_REPO1 deleted |
|
619 | ADD_ON_REPO1 deleted | |
620 | ADD_ON_REPO2 66f7d451a68b added |
|
620 | ADD_ON_REPO2 66f7d451a68b added | |
621 | ADV_ON_REPO2 66f7d451a68b advanced |
|
621 | ADV_ON_REPO2 66f7d451a68b advanced | |
622 | DIFF_ADV_ON_REPO1 1ea73414a91b changed |
|
622 | DIFF_ADV_ON_REPO1 1ea73414a91b changed | |
623 | DIFF_ADV_ON_REPO2 e7bd5218ca15 advanced |
|
623 | DIFF_ADV_ON_REPO2 e7bd5218ca15 advanced | |
624 | DIFF_DIVERGED e7bd5218ca15 changed |
|
624 | DIFF_DIVERGED e7bd5218ca15 changed | |
625 | DIVERGED fa942426a6fd diverged |
|
625 | DIVERGED fa942426a6fd diverged | |
626 |
|
626 | |||
627 | $ cd .. |
|
627 | $ cd .. | |
628 |
|
628 | |||
629 | Pushing a bookmark should only push the changes required by that |
|
629 | Pushing a bookmark should only push the changes required by that | |
630 | bookmark, not all outgoing changes: |
|
630 | bookmark, not all outgoing changes: | |
631 | $ hg clone http://localhost:$HGPORT/ addmarks |
|
631 | $ hg clone http://localhost:$HGPORT/ addmarks | |
632 | requesting all changes |
|
632 | requesting all changes | |
633 | adding changesets |
|
633 | adding changesets | |
634 | adding manifests |
|
634 | adding manifests | |
635 | adding file changes |
|
635 | adding file changes | |
636 | added 5 changesets with 5 changes to 3 files (+2 heads) |
|
636 | added 5 changesets with 5 changes to 3 files (+2 heads) | |
637 | 2 new obsolescence markers |
|
637 | 2 new obsolescence markers | |
638 | updating to bookmark @ |
|
638 | updating to bookmark @ | |
639 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
639 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
640 | $ cd addmarks |
|
640 | $ cd addmarks | |
641 | $ echo foo > foo |
|
641 | $ echo foo > foo | |
642 | $ hg add foo |
|
642 | $ hg add foo | |
643 | $ hg commit -m 'add foo' |
|
643 | $ hg commit -m 'add foo' | |
644 | $ echo bar > bar |
|
644 | $ echo bar > bar | |
645 | $ hg add bar |
|
645 | $ hg add bar | |
646 | $ hg commit -m 'add bar' |
|
646 | $ hg commit -m 'add bar' | |
647 | $ hg co "tip^" |
|
647 | $ hg co "tip^" | |
648 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
648 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
649 | (leaving bookmark @) |
|
649 | (leaving bookmark @) | |
650 | $ hg book add-foo |
|
650 | $ hg book add-foo | |
651 | $ hg book -r tip add-bar |
|
651 | $ hg book -r tip add-bar | |
652 | Note: this push *must* push only a single changeset, as that's the point |
|
652 | Note: this push *must* push only a single changeset, as that's the point | |
653 | of this test. |
|
653 | of this test. | |
654 | $ hg push -B add-foo --traceback |
|
654 | $ hg push -B add-foo --traceback | |
655 | pushing to http://localhost:$HGPORT/ |
|
655 | pushing to http://localhost:$HGPORT/ | |
656 | searching for changes |
|
656 | searching for changes | |
657 | remote: adding changesets |
|
657 | remote: adding changesets | |
658 | remote: adding manifests |
|
658 | remote: adding manifests | |
659 | remote: adding file changes |
|
659 | remote: adding file changes | |
660 | remote: added 1 changesets with 1 changes to 1 files |
|
660 | remote: added 1 changesets with 1 changes to 1 files | |
661 | exporting bookmark add-foo |
|
661 | exporting bookmark add-foo | |
662 |
|
662 | |||
663 | pushing a new bookmark on a new head does not require -f if -B is specified |
|
663 | pushing a new bookmark on a new head does not require -f if -B is specified | |
664 |
|
664 | |||
665 | $ hg up -q X |
|
665 | $ hg up -q X | |
666 | $ hg book W |
|
666 | $ hg book W | |
667 | $ echo c5 > f2 |
|
667 | $ echo c5 > f2 | |
668 | $ hg ci -Am5 |
|
668 | $ hg ci -Am5 | |
669 | created new head |
|
669 | created new head | |
670 | $ hg push -B W |
|
670 | $ hg push -B W | |
671 | pushing to http://localhost:$HGPORT/ |
|
671 | pushing to http://localhost:$HGPORT/ | |
672 | searching for changes |
|
672 | searching for changes | |
673 | remote: adding changesets |
|
673 | remote: adding changesets | |
674 | remote: adding manifests |
|
674 | remote: adding manifests | |
675 | remote: adding file changes |
|
675 | remote: adding file changes | |
676 | remote: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
676 | remote: added 1 changesets with 1 changes to 1 files (+1 heads) | |
677 | exporting bookmark W |
|
677 | exporting bookmark W | |
678 | $ hg -R ../b id -r W |
|
678 | $ hg -R ../b id -r W | |
679 | cc978a373a53 tip W |
|
679 | cc978a373a53 tip W | |
680 |
|
680 | |||
681 | Check summary output for incoming/outgoing bookmarks |
|
681 | Check summary output for incoming/outgoing bookmarks | |
682 |
|
682 | |||
683 | $ hg bookmarks -d X |
|
683 | $ hg bookmarks -d X | |
684 | $ hg bookmarks -d Y |
|
684 | $ hg bookmarks -d Y | |
685 | $ hg summary --remote | grep '^remote:' |
|
685 | $ hg summary --remote | grep '^remote:' | |
686 | remote: *, 2 incoming bookmarks, 1 outgoing bookmarks (glob) |
|
686 | remote: *, 2 incoming bookmarks, 1 outgoing bookmarks (glob) | |
687 |
|
687 | |||
688 | $ cd .. |
|
688 | $ cd .. | |
689 |
|
689 | |||
690 | pushing an unchanged bookmark should result in no changes |
|
690 | pushing an unchanged bookmark should result in no changes | |
691 |
|
691 | |||
692 | $ hg init unchanged-a |
|
692 | $ hg init unchanged-a | |
693 | $ hg init unchanged-b |
|
693 | $ hg init unchanged-b | |
694 | $ cd unchanged-a |
|
694 | $ cd unchanged-a | |
695 | $ echo initial > foo |
|
695 | $ echo initial > foo | |
696 | $ hg commit -A -m initial |
|
696 | $ hg commit -A -m initial | |
697 | adding foo |
|
697 | adding foo | |
698 | $ hg bookmark @ |
|
698 | $ hg bookmark @ | |
699 | $ hg push -B @ ../unchanged-b |
|
699 | $ hg push -B @ ../unchanged-b | |
700 | pushing to ../unchanged-b |
|
700 | pushing to ../unchanged-b | |
701 | searching for changes |
|
701 | searching for changes | |
702 | adding changesets |
|
702 | adding changesets | |
703 | adding manifests |
|
703 | adding manifests | |
704 | adding file changes |
|
704 | adding file changes | |
705 | added 1 changesets with 1 changes to 1 files |
|
705 | added 1 changesets with 1 changes to 1 files | |
706 | exporting bookmark @ |
|
706 | exporting bookmark @ | |
707 |
|
707 | |||
708 | $ hg push -B @ ../unchanged-b |
|
708 | $ hg push -B @ ../unchanged-b | |
709 | pushing to ../unchanged-b |
|
709 | pushing to ../unchanged-b | |
710 | searching for changes |
|
710 | searching for changes | |
711 | no changes found |
|
711 | no changes found | |
712 | [1] |
|
712 | [1] | |
713 |
|
713 | |||
714 |
|
714 | |||
715 | Check hook preventing push (issue4455) |
|
715 | Check hook preventing push (issue4455) | |
716 | ====================================== |
|
716 | ====================================== | |
717 |
|
717 | |||
718 | $ hg bookmarks |
|
718 | $ hg bookmarks | |
719 | * @ 0:55482a6fb4b1 |
|
719 | * @ 0:55482a6fb4b1 | |
720 | $ hg log -G |
|
720 | $ hg log -G | |
721 | @ 0:55482a6fb4b1 initial |
|
721 | @ 0:55482a6fb4b1 initial | |
722 |
|
722 | |||
723 | $ hg init ../issue4455-dest |
|
723 | $ hg init ../issue4455-dest | |
724 | $ hg push ../issue4455-dest # changesets only |
|
724 | $ hg push ../issue4455-dest # changesets only | |
725 | pushing to ../issue4455-dest |
|
725 | pushing to ../issue4455-dest | |
726 | searching for changes |
|
726 | searching for changes | |
727 | adding changesets |
|
727 | adding changesets | |
728 | adding manifests |
|
728 | adding manifests | |
729 | adding file changes |
|
729 | adding file changes | |
730 | added 1 changesets with 1 changes to 1 files |
|
730 | added 1 changesets with 1 changes to 1 files | |
731 | $ cat >> .hg/hgrc << EOF |
|
731 | $ cat >> .hg/hgrc << EOF | |
732 | > [paths] |
|
732 | > [paths] | |
733 | > local=../issue4455-dest/ |
|
733 | > local=../issue4455-dest/ | |
734 | > ssh=ssh://user@dummy/issue4455-dest |
|
734 | > ssh=ssh://user@dummy/issue4455-dest | |
735 | > http=http://localhost:$HGPORT/ |
|
735 | > http=http://localhost:$HGPORT/ | |
736 | > [ui] |
|
736 | > [ui] | |
737 |
> ssh= |
|
737 | > ssh=dummyssh | |
738 | > EOF |
|
738 | > EOF | |
739 | $ cat >> ../issue4455-dest/.hg/hgrc << EOF |
|
739 | $ cat >> ../issue4455-dest/.hg/hgrc << EOF | |
740 | > [hooks] |
|
740 | > [hooks] | |
741 | > prepushkey=false |
|
741 | > prepushkey=false | |
742 | > [web] |
|
742 | > [web] | |
743 | > push_ssl = false |
|
743 | > push_ssl = false | |
744 | > allow_push = * |
|
744 | > allow_push = * | |
745 | > EOF |
|
745 | > EOF | |
746 | $ killdaemons.py |
|
746 | $ killdaemons.py | |
747 | $ hg -R ../issue4455-dest serve -p $HGPORT -d --pid-file=../issue4455.pid -E ../issue4455-error.log |
|
747 | $ hg -R ../issue4455-dest serve -p $HGPORT -d --pid-file=../issue4455.pid -E ../issue4455-error.log | |
748 | $ cat ../issue4455.pid >> $DAEMON_PIDS |
|
748 | $ cat ../issue4455.pid >> $DAEMON_PIDS | |
749 |
|
749 | |||
750 | Local push |
|
750 | Local push | |
751 | ---------- |
|
751 | ---------- | |
752 |
|
752 | |||
753 | $ hg push -B @ local |
|
753 | $ hg push -B @ local | |
754 | pushing to $TESTTMP/issue4455-dest (glob) |
|
754 | pushing to $TESTTMP/issue4455-dest (glob) | |
755 | searching for changes |
|
755 | searching for changes | |
756 | no changes found |
|
756 | no changes found | |
757 | pushkey-abort: prepushkey hook exited with status 1 |
|
757 | pushkey-abort: prepushkey hook exited with status 1 | |
758 | exporting bookmark @ failed! |
|
758 | exporting bookmark @ failed! | |
759 | [1] |
|
759 | [1] | |
760 | $ hg -R ../issue4455-dest/ bookmarks |
|
760 | $ hg -R ../issue4455-dest/ bookmarks | |
761 | no bookmarks set |
|
761 | no bookmarks set | |
762 |
|
762 | |||
763 | Using ssh |
|
763 | Using ssh | |
764 | --------- |
|
764 | --------- | |
765 |
|
765 | |||
766 | $ hg push -B @ ssh --config experimental.bundle2-exp=True |
|
766 | $ hg push -B @ ssh --config experimental.bundle2-exp=True | |
767 | pushing to ssh://user@dummy/issue4455-dest |
|
767 | pushing to ssh://user@dummy/issue4455-dest | |
768 | searching for changes |
|
768 | searching for changes | |
769 | no changes found |
|
769 | no changes found | |
770 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
770 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
771 | exporting bookmark @ failed! |
|
771 | exporting bookmark @ failed! | |
772 | [1] |
|
772 | [1] | |
773 | $ hg -R ../issue4455-dest/ bookmarks |
|
773 | $ hg -R ../issue4455-dest/ bookmarks | |
774 | no bookmarks set |
|
774 | no bookmarks set | |
775 |
|
775 | |||
776 | $ hg push -B @ ssh --config experimental.bundle2-exp=False |
|
776 | $ hg push -B @ ssh --config experimental.bundle2-exp=False | |
777 | pushing to ssh://user@dummy/issue4455-dest |
|
777 | pushing to ssh://user@dummy/issue4455-dest | |
778 | searching for changes |
|
778 | searching for changes | |
779 | no changes found |
|
779 | no changes found | |
780 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
780 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
781 | exporting bookmark @ failed! |
|
781 | exporting bookmark @ failed! | |
782 | [1] |
|
782 | [1] | |
783 | $ hg -R ../issue4455-dest/ bookmarks |
|
783 | $ hg -R ../issue4455-dest/ bookmarks | |
784 | no bookmarks set |
|
784 | no bookmarks set | |
785 |
|
785 | |||
786 | Using http |
|
786 | Using http | |
787 | ---------- |
|
787 | ---------- | |
788 |
|
788 | |||
789 | $ hg push -B @ http --config experimental.bundle2-exp=True |
|
789 | $ hg push -B @ http --config experimental.bundle2-exp=True | |
790 | pushing to http://localhost:$HGPORT/ |
|
790 | pushing to http://localhost:$HGPORT/ | |
791 | searching for changes |
|
791 | searching for changes | |
792 | no changes found |
|
792 | no changes found | |
793 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
793 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
794 | exporting bookmark @ failed! |
|
794 | exporting bookmark @ failed! | |
795 | [1] |
|
795 | [1] | |
796 | $ hg -R ../issue4455-dest/ bookmarks |
|
796 | $ hg -R ../issue4455-dest/ bookmarks | |
797 | no bookmarks set |
|
797 | no bookmarks set | |
798 |
|
798 | |||
799 | $ hg push -B @ http --config experimental.bundle2-exp=False |
|
799 | $ hg push -B @ http --config experimental.bundle2-exp=False | |
800 | pushing to http://localhost:$HGPORT/ |
|
800 | pushing to http://localhost:$HGPORT/ | |
801 | searching for changes |
|
801 | searching for changes | |
802 | no changes found |
|
802 | no changes found | |
803 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
803 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
804 | exporting bookmark @ failed! |
|
804 | exporting bookmark @ failed! | |
805 | [1] |
|
805 | [1] | |
806 | $ hg -R ../issue4455-dest/ bookmarks |
|
806 | $ hg -R ../issue4455-dest/ bookmarks | |
807 | no bookmarks set |
|
807 | no bookmarks set |
@@ -1,719 +1,719 b'' | |||||
1 | Test exchange of common information using bundle2 |
|
1 | Test exchange of common information using bundle2 | |
2 |
|
2 | |||
3 |
|
3 | |||
4 | $ getmainid() { |
|
4 | $ getmainid() { | |
5 | > hg -R main log --template '{node}\n' --rev "$1" |
|
5 | > hg -R main log --template '{node}\n' --rev "$1" | |
6 | > } |
|
6 | > } | |
7 |
|
7 | |||
8 | enable obsolescence |
|
8 | enable obsolescence | |
9 |
|
9 | |||
10 | $ cat > $TESTTMP/bundle2-pushkey-hook.sh << EOF |
|
10 | $ cat > $TESTTMP/bundle2-pushkey-hook.sh << EOF | |
11 | > echo pushkey: lock state after \"\$HG_NAMESPACE\" |
|
11 | > echo pushkey: lock state after \"\$HG_NAMESPACE\" | |
12 | > hg debuglock |
|
12 | > hg debuglock | |
13 | > EOF |
|
13 | > EOF | |
14 |
|
14 | |||
15 | $ cat >> $HGRCPATH << EOF |
|
15 | $ cat >> $HGRCPATH << EOF | |
16 | > [experimental] |
|
16 | > [experimental] | |
17 | > evolution=createmarkers,exchange |
|
17 | > evolution=createmarkers,exchange | |
18 | > bundle2-exp=True |
|
18 | > bundle2-exp=True | |
19 | > bundle2-output-capture=True |
|
19 | > bundle2-output-capture=True | |
20 | > [ui] |
|
20 | > [ui] | |
21 |
> ssh= |
|
21 | > ssh=dummyssh | |
22 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} |
|
22 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} | |
23 | > [web] |
|
23 | > [web] | |
24 | > push_ssl = false |
|
24 | > push_ssl = false | |
25 | > allow_push = * |
|
25 | > allow_push = * | |
26 | > [phases] |
|
26 | > [phases] | |
27 | > publish=False |
|
27 | > publish=False | |
28 | > [hooks] |
|
28 | > [hooks] | |
29 | > pretxnclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n" |
|
29 | > pretxnclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n" | |
30 | > txnclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n" |
|
30 | > txnclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n" | |
31 | > txnclose.env = sh -c "HG_LOCAL= python \"$TESTDIR/printenv.py\" txnclose" |
|
31 | > txnclose.env = sh -c "HG_LOCAL= python \"$TESTDIR/printenv.py\" txnclose" | |
32 | > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh" |
|
32 | > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh" | |
33 | > EOF |
|
33 | > EOF | |
34 |
|
34 | |||
35 | The extension requires a repo (currently unused) |
|
35 | The extension requires a repo (currently unused) | |
36 |
|
36 | |||
37 | $ hg init main |
|
37 | $ hg init main | |
38 | $ cd main |
|
38 | $ cd main | |
39 | $ touch a |
|
39 | $ touch a | |
40 | $ hg add a |
|
40 | $ hg add a | |
41 | $ hg commit -m 'a' |
|
41 | $ hg commit -m 'a' | |
42 | pre-close-tip:3903775176ed draft |
|
42 | pre-close-tip:3903775176ed draft | |
43 | postclose-tip:3903775176ed draft |
|
43 | postclose-tip:3903775176ed draft | |
44 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
44 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
45 |
|
45 | |||
46 | $ hg unbundle $TESTDIR/bundles/rebase.hg |
|
46 | $ hg unbundle $TESTDIR/bundles/rebase.hg | |
47 | adding changesets |
|
47 | adding changesets | |
48 | adding manifests |
|
48 | adding manifests | |
49 | adding file changes |
|
49 | adding file changes | |
50 | added 8 changesets with 7 changes to 7 files (+3 heads) |
|
50 | added 8 changesets with 7 changes to 7 files (+3 heads) | |
51 | pre-close-tip:02de42196ebe draft |
|
51 | pre-close-tip:02de42196ebe draft | |
52 | postclose-tip:02de42196ebe draft |
|
52 | postclose-tip:02de42196ebe draft | |
53 | txnclose hook: HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_PHASES_MOVED=1 HG_SOURCE=unbundle HG_TXNID=TXN:* HG_TXNNAME=unbundle (glob) |
|
53 | txnclose hook: HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_PHASES_MOVED=1 HG_SOURCE=unbundle HG_TXNID=TXN:* HG_TXNNAME=unbundle (glob) | |
54 | bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob) |
|
54 | bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob) | |
55 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
55 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
56 |
|
56 | |||
57 | $ cd .. |
|
57 | $ cd .. | |
58 |
|
58 | |||
59 | Real world exchange |
|
59 | Real world exchange | |
60 | ===================== |
|
60 | ===================== | |
61 |
|
61 | |||
62 | Add more obsolescence information |
|
62 | Add more obsolescence information | |
63 |
|
63 | |||
64 | $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc` |
|
64 | $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc` | |
65 | pre-close-tip:02de42196ebe draft |
|
65 | pre-close-tip:02de42196ebe draft | |
66 | postclose-tip:02de42196ebe draft |
|
66 | postclose-tip:02de42196ebe draft | |
67 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) |
|
67 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) | |
68 | $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c` |
|
68 | $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c` | |
69 | pre-close-tip:02de42196ebe draft |
|
69 | pre-close-tip:02de42196ebe draft | |
70 | postclose-tip:02de42196ebe draft |
|
70 | postclose-tip:02de42196ebe draft | |
71 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) |
|
71 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) | |
72 |
|
72 | |||
73 | clone --pull |
|
73 | clone --pull | |
74 |
|
74 | |||
75 | $ hg -R main phase --public cd010b8cd998 |
|
75 | $ hg -R main phase --public cd010b8cd998 | |
76 | pre-close-tip:02de42196ebe draft |
|
76 | pre-close-tip:02de42196ebe draft | |
77 | postclose-tip:02de42196ebe draft |
|
77 | postclose-tip:02de42196ebe draft | |
78 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) |
|
78 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) | |
79 | $ hg clone main other --pull --rev 9520eea781bc |
|
79 | $ hg clone main other --pull --rev 9520eea781bc | |
80 | adding changesets |
|
80 | adding changesets | |
81 | adding manifests |
|
81 | adding manifests | |
82 | adding file changes |
|
82 | adding file changes | |
83 | added 2 changesets with 2 changes to 2 files |
|
83 | added 2 changesets with 2 changes to 2 files | |
84 | 1 new obsolescence markers |
|
84 | 1 new obsolescence markers | |
85 | pre-close-tip:9520eea781bc draft |
|
85 | pre-close-tip:9520eea781bc draft | |
86 | postclose-tip:9520eea781bc draft |
|
86 | postclose-tip:9520eea781bc draft | |
87 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) |
|
87 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) | |
88 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
88 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
89 | updating to branch default |
|
89 | updating to branch default | |
90 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
90 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
91 | $ hg -R other log -G |
|
91 | $ hg -R other log -G | |
92 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
92 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
93 | | |
|
93 | | | |
94 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
94 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
95 |
|
95 | |||
96 | $ hg -R other debugobsolete |
|
96 | $ hg -R other debugobsolete | |
97 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
97 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
98 |
|
98 | |||
99 | pull |
|
99 | pull | |
100 |
|
100 | |||
101 | $ hg -R main phase --public 9520eea781bc |
|
101 | $ hg -R main phase --public 9520eea781bc | |
102 | pre-close-tip:02de42196ebe draft |
|
102 | pre-close-tip:02de42196ebe draft | |
103 | postclose-tip:02de42196ebe draft |
|
103 | postclose-tip:02de42196ebe draft | |
104 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) |
|
104 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) | |
105 | $ hg -R other pull -r 24b6387c8c8c |
|
105 | $ hg -R other pull -r 24b6387c8c8c | |
106 | pulling from $TESTTMP/main (glob) |
|
106 | pulling from $TESTTMP/main (glob) | |
107 | searching for changes |
|
107 | searching for changes | |
108 | adding changesets |
|
108 | adding changesets | |
109 | adding manifests |
|
109 | adding manifests | |
110 | adding file changes |
|
110 | adding file changes | |
111 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
111 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
112 | 1 new obsolescence markers |
|
112 | 1 new obsolescence markers | |
113 | pre-close-tip:24b6387c8c8c draft |
|
113 | pre-close-tip:24b6387c8c8c draft | |
114 | postclose-tip:24b6387c8c8c draft |
|
114 | postclose-tip:24b6387c8c8c draft | |
115 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) |
|
115 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) | |
116 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
116 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
117 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
117 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
118 | $ hg -R other log -G |
|
118 | $ hg -R other log -G | |
119 | o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
119 | o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
120 | | |
|
120 | | | |
121 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
121 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
122 | |/ |
|
122 | |/ | |
123 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
123 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
124 |
|
124 | |||
125 | $ hg -R other debugobsolete |
|
125 | $ hg -R other debugobsolete | |
126 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
126 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
127 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
127 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
128 |
|
128 | |||
129 | pull empty (with phase movement) |
|
129 | pull empty (with phase movement) | |
130 |
|
130 | |||
131 | $ hg -R main phase --public 24b6387c8c8c |
|
131 | $ hg -R main phase --public 24b6387c8c8c | |
132 | pre-close-tip:02de42196ebe draft |
|
132 | pre-close-tip:02de42196ebe draft | |
133 | postclose-tip:02de42196ebe draft |
|
133 | postclose-tip:02de42196ebe draft | |
134 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) |
|
134 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) | |
135 | $ hg -R other pull -r 24b6387c8c8c |
|
135 | $ hg -R other pull -r 24b6387c8c8c | |
136 | pulling from $TESTTMP/main (glob) |
|
136 | pulling from $TESTTMP/main (glob) | |
137 | no changes found |
|
137 | no changes found | |
138 | pre-close-tip:24b6387c8c8c public |
|
138 | pre-close-tip:24b6387c8c8c public | |
139 | postclose-tip:24b6387c8c8c public |
|
139 | postclose-tip:24b6387c8c8c public | |
140 | txnclose hook: HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) |
|
140 | txnclose hook: HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) | |
141 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
141 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
142 | $ hg -R other log -G |
|
142 | $ hg -R other log -G | |
143 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
143 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
144 | | |
|
144 | | | |
145 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
145 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
146 | |/ |
|
146 | |/ | |
147 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
147 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
148 |
|
148 | |||
149 | $ hg -R other debugobsolete |
|
149 | $ hg -R other debugobsolete | |
150 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
150 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
151 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
151 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
152 |
|
152 | |||
153 | pull empty |
|
153 | pull empty | |
154 |
|
154 | |||
155 | $ hg -R other pull -r 24b6387c8c8c |
|
155 | $ hg -R other pull -r 24b6387c8c8c | |
156 | pulling from $TESTTMP/main (glob) |
|
156 | pulling from $TESTTMP/main (glob) | |
157 | no changes found |
|
157 | no changes found | |
158 | pre-close-tip:24b6387c8c8c public |
|
158 | pre-close-tip:24b6387c8c8c public | |
159 | postclose-tip:24b6387c8c8c public |
|
159 | postclose-tip:24b6387c8c8c public | |
160 | txnclose hook: HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) |
|
160 | txnclose hook: HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) | |
161 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
161 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
162 | $ hg -R other log -G |
|
162 | $ hg -R other log -G | |
163 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
163 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
164 | | |
|
164 | | | |
165 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
165 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
166 | |/ |
|
166 | |/ | |
167 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
167 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
168 |
|
168 | |||
169 | $ hg -R other debugobsolete |
|
169 | $ hg -R other debugobsolete | |
170 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
170 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
171 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
171 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
172 |
|
172 | |||
173 | add extra data to test their exchange during push |
|
173 | add extra data to test their exchange during push | |
174 |
|
174 | |||
175 | $ hg -R main bookmark --rev eea13746799a book_eea1 |
|
175 | $ hg -R main bookmark --rev eea13746799a book_eea1 | |
176 | $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a` |
|
176 | $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a` | |
177 | pre-close-tip:02de42196ebe draft |
|
177 | pre-close-tip:02de42196ebe draft | |
178 | postclose-tip:02de42196ebe draft |
|
178 | postclose-tip:02de42196ebe draft | |
179 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) |
|
179 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) | |
180 | $ hg -R main bookmark --rev 02de42196ebe book_02de |
|
180 | $ hg -R main bookmark --rev 02de42196ebe book_02de | |
181 | $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe` |
|
181 | $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe` | |
182 | pre-close-tip:02de42196ebe draft book_02de |
|
182 | pre-close-tip:02de42196ebe draft book_02de | |
183 | postclose-tip:02de42196ebe draft book_02de |
|
183 | postclose-tip:02de42196ebe draft book_02de | |
184 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) |
|
184 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) | |
185 | $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc |
|
185 | $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc | |
186 | $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16` |
|
186 | $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16` | |
187 | pre-close-tip:02de42196ebe draft book_02de |
|
187 | pre-close-tip:02de42196ebe draft book_02de | |
188 | postclose-tip:02de42196ebe draft book_02de |
|
188 | postclose-tip:02de42196ebe draft book_02de | |
189 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) |
|
189 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) | |
190 | $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd |
|
190 | $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd | |
191 | $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8` |
|
191 | $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8` | |
192 | pre-close-tip:02de42196ebe draft book_02de |
|
192 | pre-close-tip:02de42196ebe draft book_02de | |
193 | postclose-tip:02de42196ebe draft book_02de |
|
193 | postclose-tip:02de42196ebe draft book_02de | |
194 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) |
|
194 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) | |
195 | $ hg -R main bookmark --rev 32af7686d403 book_32af |
|
195 | $ hg -R main bookmark --rev 32af7686d403 book_32af | |
196 | $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403` |
|
196 | $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403` | |
197 | pre-close-tip:02de42196ebe draft book_02de |
|
197 | pre-close-tip:02de42196ebe draft book_02de | |
198 | postclose-tip:02de42196ebe draft book_02de |
|
198 | postclose-tip:02de42196ebe draft book_02de | |
199 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) |
|
199 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) | |
200 |
|
200 | |||
201 | $ hg -R other bookmark --rev cd010b8cd998 book_eea1 |
|
201 | $ hg -R other bookmark --rev cd010b8cd998 book_eea1 | |
202 | $ hg -R other bookmark --rev cd010b8cd998 book_02de |
|
202 | $ hg -R other bookmark --rev cd010b8cd998 book_02de | |
203 | $ hg -R other bookmark --rev cd010b8cd998 book_42cc |
|
203 | $ hg -R other bookmark --rev cd010b8cd998 book_42cc | |
204 | $ hg -R other bookmark --rev cd010b8cd998 book_5fdd |
|
204 | $ hg -R other bookmark --rev cd010b8cd998 book_5fdd | |
205 | $ hg -R other bookmark --rev cd010b8cd998 book_32af |
|
205 | $ hg -R other bookmark --rev cd010b8cd998 book_32af | |
206 |
|
206 | |||
207 | $ hg -R main phase --public eea13746799a |
|
207 | $ hg -R main phase --public eea13746799a | |
208 | pre-close-tip:02de42196ebe draft book_02de |
|
208 | pre-close-tip:02de42196ebe draft book_02de | |
209 | postclose-tip:02de42196ebe draft book_02de |
|
209 | postclose-tip:02de42196ebe draft book_02de | |
210 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) |
|
210 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) | |
211 |
|
211 | |||
212 | push |
|
212 | push | |
213 | $ hg -R main push other --rev eea13746799a --bookmark book_eea1 |
|
213 | $ hg -R main push other --rev eea13746799a --bookmark book_eea1 | |
214 | pushing to other |
|
214 | pushing to other | |
215 | searching for changes |
|
215 | searching for changes | |
216 | remote: adding changesets |
|
216 | remote: adding changesets | |
217 | remote: adding manifests |
|
217 | remote: adding manifests | |
218 | remote: adding file changes |
|
218 | remote: adding file changes | |
219 | remote: added 1 changesets with 0 changes to 0 files (-1 heads) |
|
219 | remote: added 1 changesets with 0 changes to 0 files (-1 heads) | |
220 | remote: 1 new obsolescence markers |
|
220 | remote: 1 new obsolescence markers | |
221 | remote: pre-close-tip:eea13746799a public book_eea1 |
|
221 | remote: pre-close-tip:eea13746799a public book_eea1 | |
222 | remote: pushkey: lock state after "phases" |
|
222 | remote: pushkey: lock state after "phases" | |
223 | remote: lock: free |
|
223 | remote: lock: free | |
224 | remote: wlock: free |
|
224 | remote: wlock: free | |
225 | remote: pushkey: lock state after "bookmarks" |
|
225 | remote: pushkey: lock state after "bookmarks" | |
226 | remote: lock: free |
|
226 | remote: lock: free | |
227 | remote: wlock: free |
|
227 | remote: wlock: free | |
228 | remote: postclose-tip:eea13746799a public book_eea1 |
|
228 | remote: postclose-tip:eea13746799a public book_eea1 | |
229 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) |
|
229 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) | |
230 | updating bookmark book_eea1 |
|
230 | updating bookmark book_eea1 | |
231 | pre-close-tip:02de42196ebe draft book_02de |
|
231 | pre-close-tip:02de42196ebe draft book_02de | |
232 | postclose-tip:02de42196ebe draft book_02de |
|
232 | postclose-tip:02de42196ebe draft book_02de | |
233 | txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob) |
|
233 | txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob) | |
234 | file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob) |
|
234 | file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob) | |
235 | $ hg -R other log -G |
|
235 | $ hg -R other log -G | |
236 | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
|
236 | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G | |
237 | |\ |
|
237 | |\ | |
238 | | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
238 | | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
239 | | | |
|
239 | | | | |
240 | @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
240 | @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
241 | |/ |
|
241 | |/ | |
242 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A |
|
242 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A | |
243 |
|
243 | |||
244 | $ hg -R other debugobsolete |
|
244 | $ hg -R other debugobsolete | |
245 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
245 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
246 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
246 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
247 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
247 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
248 |
|
248 | |||
249 | pull over ssh |
|
249 | pull over ssh | |
250 |
|
250 | |||
251 | $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de |
|
251 | $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de | |
252 | pulling from ssh://user@dummy/main |
|
252 | pulling from ssh://user@dummy/main | |
253 | searching for changes |
|
253 | searching for changes | |
254 | adding changesets |
|
254 | adding changesets | |
255 | adding manifests |
|
255 | adding manifests | |
256 | adding file changes |
|
256 | adding file changes | |
257 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
257 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
258 | 1 new obsolescence markers |
|
258 | 1 new obsolescence markers | |
259 | updating bookmark book_02de |
|
259 | updating bookmark book_02de | |
260 | pre-close-tip:02de42196ebe draft book_02de |
|
260 | pre-close-tip:02de42196ebe draft book_02de | |
261 | postclose-tip:02de42196ebe draft book_02de |
|
261 | postclose-tip:02de42196ebe draft book_02de | |
262 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) |
|
262 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) | |
263 | ssh://user@dummy/main HG_URL=ssh://user@dummy/main |
|
263 | ssh://user@dummy/main HG_URL=ssh://user@dummy/main | |
264 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
264 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
265 | $ hg -R other debugobsolete |
|
265 | $ hg -R other debugobsolete | |
266 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
266 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
267 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
267 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
268 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
268 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
269 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
269 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
270 |
|
270 | |||
271 | pull over http |
|
271 | pull over http | |
272 |
|
272 | |||
273 | $ hg -R main serve -p $HGPORT -d --pid-file=main.pid -E main-error.log |
|
273 | $ hg -R main serve -p $HGPORT -d --pid-file=main.pid -E main-error.log | |
274 | $ cat main.pid >> $DAEMON_PIDS |
|
274 | $ cat main.pid >> $DAEMON_PIDS | |
275 |
|
275 | |||
276 | $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc |
|
276 | $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc | |
277 | pulling from http://localhost:$HGPORT/ |
|
277 | pulling from http://localhost:$HGPORT/ | |
278 | searching for changes |
|
278 | searching for changes | |
279 | adding changesets |
|
279 | adding changesets | |
280 | adding manifests |
|
280 | adding manifests | |
281 | adding file changes |
|
281 | adding file changes | |
282 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
282 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
283 | 1 new obsolescence markers |
|
283 | 1 new obsolescence markers | |
284 | updating bookmark book_42cc |
|
284 | updating bookmark book_42cc | |
285 | pre-close-tip:42ccdea3bb16 draft book_42cc |
|
285 | pre-close-tip:42ccdea3bb16 draft book_42cc | |
286 | postclose-tip:42ccdea3bb16 draft book_42cc |
|
286 | postclose-tip:42ccdea3bb16 draft book_42cc | |
287 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) |
|
287 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) | |
288 | http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/ |
|
288 | http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/ | |
289 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
289 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
290 | $ cat main-error.log |
|
290 | $ cat main-error.log | |
291 | $ hg -R other debugobsolete |
|
291 | $ hg -R other debugobsolete | |
292 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
292 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
293 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
293 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
294 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
294 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
295 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
295 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
296 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
296 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
297 |
|
297 | |||
298 | push over ssh |
|
298 | push over ssh | |
299 |
|
299 | |||
300 | $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd |
|
300 | $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd | |
301 | pushing to ssh://user@dummy/other |
|
301 | pushing to ssh://user@dummy/other | |
302 | searching for changes |
|
302 | searching for changes | |
303 | remote: adding changesets |
|
303 | remote: adding changesets | |
304 | remote: adding manifests |
|
304 | remote: adding manifests | |
305 | remote: adding file changes |
|
305 | remote: adding file changes | |
306 | remote: added 1 changesets with 1 changes to 1 files |
|
306 | remote: added 1 changesets with 1 changes to 1 files | |
307 | remote: 1 new obsolescence markers |
|
307 | remote: 1 new obsolescence markers | |
308 | remote: pre-close-tip:5fddd98957c8 draft book_5fdd |
|
308 | remote: pre-close-tip:5fddd98957c8 draft book_5fdd | |
309 | remote: pushkey: lock state after "bookmarks" |
|
309 | remote: pushkey: lock state after "bookmarks" | |
310 | remote: lock: free |
|
310 | remote: lock: free | |
311 | remote: wlock: free |
|
311 | remote: wlock: free | |
312 | remote: postclose-tip:5fddd98957c8 draft book_5fdd |
|
312 | remote: postclose-tip:5fddd98957c8 draft book_5fdd | |
313 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_TXNID=TXN:* HG_TXNNAME=serve HG_URL=remote:ssh:127.0.0.1 (glob) |
|
313 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_TXNID=TXN:* HG_TXNNAME=serve HG_URL=remote:ssh:127.0.0.1 (glob) | |
314 | updating bookmark book_5fdd |
|
314 | updating bookmark book_5fdd | |
315 | pre-close-tip:02de42196ebe draft book_02de |
|
315 | pre-close-tip:02de42196ebe draft book_02de | |
316 | postclose-tip:02de42196ebe draft book_02de |
|
316 | postclose-tip:02de42196ebe draft book_02de | |
317 | txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob) |
|
317 | txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob) | |
318 | ssh://user@dummy/other HG_URL=ssh://user@dummy/other |
|
318 | ssh://user@dummy/other HG_URL=ssh://user@dummy/other | |
319 | $ hg -R other log -G |
|
319 | $ hg -R other log -G | |
320 | o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C |
|
320 | o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C | |
321 | | |
|
321 | | | |
322 | o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B |
|
322 | o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B | |
323 | | |
|
323 | | | |
324 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H |
|
324 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H | |
325 | | | |
|
325 | | | | |
326 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
|
326 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G | |
327 | | |/| |
|
327 | | |/| | |
328 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
328 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
329 | |/ / |
|
329 | |/ / | |
330 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
330 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
331 | |/ |
|
331 | |/ | |
332 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A |
|
332 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A | |
333 |
|
333 | |||
334 | $ hg -R other debugobsolete |
|
334 | $ hg -R other debugobsolete | |
335 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
335 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
336 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
336 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
337 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
337 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
338 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
338 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
339 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
339 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
340 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
340 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
341 |
|
341 | |||
342 | push over http |
|
342 | push over http | |
343 |
|
343 | |||
344 | $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
344 | $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
345 | $ cat other.pid >> $DAEMON_PIDS |
|
345 | $ cat other.pid >> $DAEMON_PIDS | |
346 |
|
346 | |||
347 | $ hg -R main phase --public 32af7686d403 |
|
347 | $ hg -R main phase --public 32af7686d403 | |
348 | pre-close-tip:02de42196ebe draft book_02de |
|
348 | pre-close-tip:02de42196ebe draft book_02de | |
349 | postclose-tip:02de42196ebe draft book_02de |
|
349 | postclose-tip:02de42196ebe draft book_02de | |
350 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) |
|
350 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) | |
351 | $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af |
|
351 | $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af | |
352 | pushing to http://localhost:$HGPORT2/ |
|
352 | pushing to http://localhost:$HGPORT2/ | |
353 | searching for changes |
|
353 | searching for changes | |
354 | remote: adding changesets |
|
354 | remote: adding changesets | |
355 | remote: adding manifests |
|
355 | remote: adding manifests | |
356 | remote: adding file changes |
|
356 | remote: adding file changes | |
357 | remote: added 1 changesets with 1 changes to 1 files |
|
357 | remote: added 1 changesets with 1 changes to 1 files | |
358 | remote: 1 new obsolescence markers |
|
358 | remote: 1 new obsolescence markers | |
359 | remote: pre-close-tip:32af7686d403 public book_32af |
|
359 | remote: pre-close-tip:32af7686d403 public book_32af | |
360 | remote: pushkey: lock state after "phases" |
|
360 | remote: pushkey: lock state after "phases" | |
361 | remote: lock: free |
|
361 | remote: lock: free | |
362 | remote: wlock: free |
|
362 | remote: wlock: free | |
363 | remote: pushkey: lock state after "bookmarks" |
|
363 | remote: pushkey: lock state after "bookmarks" | |
364 | remote: lock: free |
|
364 | remote: lock: free | |
365 | remote: wlock: free |
|
365 | remote: wlock: free | |
366 | remote: postclose-tip:32af7686d403 public book_32af |
|
366 | remote: postclose-tip:32af7686d403 public book_32af | |
367 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=32af7686d403cf45b5d95f2d70cebea587ac806a HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:* HG_TXNNAME=serve HG_URL=remote:http:127.0.0.1: (glob) |
|
367 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=32af7686d403cf45b5d95f2d70cebea587ac806a HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:* HG_TXNNAME=serve HG_URL=remote:http:127.0.0.1: (glob) | |
368 | updating bookmark book_32af |
|
368 | updating bookmark book_32af | |
369 | pre-close-tip:02de42196ebe draft book_02de |
|
369 | pre-close-tip:02de42196ebe draft book_02de | |
370 | postclose-tip:02de42196ebe draft book_02de |
|
370 | postclose-tip:02de42196ebe draft book_02de | |
371 | txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob) |
|
371 | txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob) | |
372 | http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/ |
|
372 | http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/ | |
373 | $ cat other-error.log |
|
373 | $ cat other-error.log | |
374 |
|
374 | |||
375 | Check final content. |
|
375 | Check final content. | |
376 |
|
376 | |||
377 | $ hg -R other log -G |
|
377 | $ hg -R other log -G | |
378 | o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D |
|
378 | o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D | |
379 | | |
|
379 | | | |
380 | o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C |
|
380 | o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C | |
381 | | |
|
381 | | | |
382 | o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B |
|
382 | o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B | |
383 | | |
|
383 | | | |
384 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H |
|
384 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H | |
385 | | | |
|
385 | | | | |
386 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
|
386 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G | |
387 | | |/| |
|
387 | | |/| | |
388 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
388 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
389 | |/ / |
|
389 | |/ / | |
390 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
390 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
391 | |/ |
|
391 | |/ | |
392 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
392 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
393 |
|
393 | |||
394 | $ hg -R other debugobsolete |
|
394 | $ hg -R other debugobsolete | |
395 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
395 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
396 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
396 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
397 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
397 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
398 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
398 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
399 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
399 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
400 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
400 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
401 | 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
401 | 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
402 |
|
402 | |||
403 | (check that no 'pending' files remain) |
|
403 | (check that no 'pending' files remain) | |
404 |
|
404 | |||
405 | $ ls -1 other/.hg/bookmarks* |
|
405 | $ ls -1 other/.hg/bookmarks* | |
406 | other/.hg/bookmarks |
|
406 | other/.hg/bookmarks | |
407 | $ ls -1 other/.hg/store/phaseroots* |
|
407 | $ ls -1 other/.hg/store/phaseroots* | |
408 | other/.hg/store/phaseroots |
|
408 | other/.hg/store/phaseroots | |
409 | $ ls -1 other/.hg/store/00changelog.i* |
|
409 | $ ls -1 other/.hg/store/00changelog.i* | |
410 | other/.hg/store/00changelog.i |
|
410 | other/.hg/store/00changelog.i | |
411 |
|
411 | |||
412 | Error Handling |
|
412 | Error Handling | |
413 | ============== |
|
413 | ============== | |
414 |
|
414 | |||
415 | Check that errors are properly returned to the client during push. |
|
415 | Check that errors are properly returned to the client during push. | |
416 |
|
416 | |||
417 | Setting up |
|
417 | Setting up | |
418 |
|
418 | |||
419 | $ cat > failpush.py << EOF |
|
419 | $ cat > failpush.py << EOF | |
420 | > """A small extension that makes push fails when using bundle2 |
|
420 | > """A small extension that makes push fails when using bundle2 | |
421 | > |
|
421 | > | |
422 | > used to test error handling in bundle2 |
|
422 | > used to test error handling in bundle2 | |
423 | > """ |
|
423 | > """ | |
424 | > |
|
424 | > | |
425 | > from mercurial import util |
|
425 | > from mercurial import util | |
426 | > from mercurial import bundle2 |
|
426 | > from mercurial import bundle2 | |
427 | > from mercurial import exchange |
|
427 | > from mercurial import exchange | |
428 | > from mercurial import extensions |
|
428 | > from mercurial import extensions | |
429 | > |
|
429 | > | |
430 | > def _pushbundle2failpart(pushop, bundler): |
|
430 | > def _pushbundle2failpart(pushop, bundler): | |
431 | > reason = pushop.ui.config('failpush', 'reason', None) |
|
431 | > reason = pushop.ui.config('failpush', 'reason', None) | |
432 | > part = None |
|
432 | > part = None | |
433 | > if reason == 'abort': |
|
433 | > if reason == 'abort': | |
434 | > bundler.newpart('test:abort') |
|
434 | > bundler.newpart('test:abort') | |
435 | > if reason == 'unknown': |
|
435 | > if reason == 'unknown': | |
436 | > bundler.newpart('test:unknown') |
|
436 | > bundler.newpart('test:unknown') | |
437 | > if reason == 'race': |
|
437 | > if reason == 'race': | |
438 | > # 20 Bytes of crap |
|
438 | > # 20 Bytes of crap | |
439 | > bundler.newpart('check:heads', data='01234567890123456789') |
|
439 | > bundler.newpart('check:heads', data='01234567890123456789') | |
440 | > |
|
440 | > | |
441 | > @bundle2.parthandler("test:abort") |
|
441 | > @bundle2.parthandler("test:abort") | |
442 | > def handleabort(op, part): |
|
442 | > def handleabort(op, part): | |
443 | > raise util.Abort('Abandon ship!', hint="don't panic") |
|
443 | > raise util.Abort('Abandon ship!', hint="don't panic") | |
444 | > |
|
444 | > | |
445 | > def uisetup(ui): |
|
445 | > def uisetup(ui): | |
446 | > exchange.b2partsgenmapping['failpart'] = _pushbundle2failpart |
|
446 | > exchange.b2partsgenmapping['failpart'] = _pushbundle2failpart | |
447 | > exchange.b2partsgenorder.insert(0, 'failpart') |
|
447 | > exchange.b2partsgenorder.insert(0, 'failpart') | |
448 | > |
|
448 | > | |
449 | > EOF |
|
449 | > EOF | |
450 |
|
450 | |||
451 | $ cd main |
|
451 | $ cd main | |
452 | $ hg up tip |
|
452 | $ hg up tip | |
453 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
453 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
454 | $ echo 'I' > I |
|
454 | $ echo 'I' > I | |
455 | $ hg add I |
|
455 | $ hg add I | |
456 | $ hg ci -m 'I' |
|
456 | $ hg ci -m 'I' | |
457 | pre-close-tip:e7ec4e813ba6 draft |
|
457 | pre-close-tip:e7ec4e813ba6 draft | |
458 | postclose-tip:e7ec4e813ba6 draft |
|
458 | postclose-tip:e7ec4e813ba6 draft | |
459 | txnclose hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
459 | txnclose hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
460 | $ hg id |
|
460 | $ hg id | |
461 | e7ec4e813ba6 tip |
|
461 | e7ec4e813ba6 tip | |
462 | $ cd .. |
|
462 | $ cd .. | |
463 |
|
463 | |||
464 | $ cat << EOF >> $HGRCPATH |
|
464 | $ cat << EOF >> $HGRCPATH | |
465 | > [extensions] |
|
465 | > [extensions] | |
466 | > failpush=$TESTTMP/failpush.py |
|
466 | > failpush=$TESTTMP/failpush.py | |
467 | > EOF |
|
467 | > EOF | |
468 |
|
468 | |||
469 | $ killdaemons.py |
|
469 | $ killdaemons.py | |
470 | $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
470 | $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
471 | $ cat other.pid >> $DAEMON_PIDS |
|
471 | $ cat other.pid >> $DAEMON_PIDS | |
472 |
|
472 | |||
473 | Doing the actual push: Abort error |
|
473 | Doing the actual push: Abort error | |
474 |
|
474 | |||
475 | $ cat << EOF >> $HGRCPATH |
|
475 | $ cat << EOF >> $HGRCPATH | |
476 | > [failpush] |
|
476 | > [failpush] | |
477 | > reason = abort |
|
477 | > reason = abort | |
478 | > EOF |
|
478 | > EOF | |
479 |
|
479 | |||
480 | $ hg -R main push other -r e7ec4e813ba6 |
|
480 | $ hg -R main push other -r e7ec4e813ba6 | |
481 | pushing to other |
|
481 | pushing to other | |
482 | searching for changes |
|
482 | searching for changes | |
483 | abort: Abandon ship! |
|
483 | abort: Abandon ship! | |
484 | (don't panic) |
|
484 | (don't panic) | |
485 | [255] |
|
485 | [255] | |
486 |
|
486 | |||
487 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
487 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
488 | pushing to ssh://user@dummy/other |
|
488 | pushing to ssh://user@dummy/other | |
489 | searching for changes |
|
489 | searching for changes | |
490 | abort: Abandon ship! |
|
490 | abort: Abandon ship! | |
491 | (don't panic) |
|
491 | (don't panic) | |
492 | [255] |
|
492 | [255] | |
493 |
|
493 | |||
494 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
494 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
495 | pushing to http://localhost:$HGPORT2/ |
|
495 | pushing to http://localhost:$HGPORT2/ | |
496 | searching for changes |
|
496 | searching for changes | |
497 | abort: Abandon ship! |
|
497 | abort: Abandon ship! | |
498 | (don't panic) |
|
498 | (don't panic) | |
499 | [255] |
|
499 | [255] | |
500 |
|
500 | |||
501 |
|
501 | |||
502 | Doing the actual push: unknown mandatory parts |
|
502 | Doing the actual push: unknown mandatory parts | |
503 |
|
503 | |||
504 | $ cat << EOF >> $HGRCPATH |
|
504 | $ cat << EOF >> $HGRCPATH | |
505 | > [failpush] |
|
505 | > [failpush] | |
506 | > reason = unknown |
|
506 | > reason = unknown | |
507 | > EOF |
|
507 | > EOF | |
508 |
|
508 | |||
509 | $ hg -R main push other -r e7ec4e813ba6 |
|
509 | $ hg -R main push other -r e7ec4e813ba6 | |
510 | pushing to other |
|
510 | pushing to other | |
511 | searching for changes |
|
511 | searching for changes | |
512 | abort: missing support for test:unknown |
|
512 | abort: missing support for test:unknown | |
513 | [255] |
|
513 | [255] | |
514 |
|
514 | |||
515 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
515 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
516 | pushing to ssh://user@dummy/other |
|
516 | pushing to ssh://user@dummy/other | |
517 | searching for changes |
|
517 | searching for changes | |
518 | abort: missing support for test:unknown |
|
518 | abort: missing support for test:unknown | |
519 | [255] |
|
519 | [255] | |
520 |
|
520 | |||
521 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
521 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
522 | pushing to http://localhost:$HGPORT2/ |
|
522 | pushing to http://localhost:$HGPORT2/ | |
523 | searching for changes |
|
523 | searching for changes | |
524 | abort: missing support for test:unknown |
|
524 | abort: missing support for test:unknown | |
525 | [255] |
|
525 | [255] | |
526 |
|
526 | |||
527 | Doing the actual push: race |
|
527 | Doing the actual push: race | |
528 |
|
528 | |||
529 | $ cat << EOF >> $HGRCPATH |
|
529 | $ cat << EOF >> $HGRCPATH | |
530 | > [failpush] |
|
530 | > [failpush] | |
531 | > reason = race |
|
531 | > reason = race | |
532 | > EOF |
|
532 | > EOF | |
533 |
|
533 | |||
534 | $ hg -R main push other -r e7ec4e813ba6 |
|
534 | $ hg -R main push other -r e7ec4e813ba6 | |
535 | pushing to other |
|
535 | pushing to other | |
536 | searching for changes |
|
536 | searching for changes | |
537 | abort: push failed: |
|
537 | abort: push failed: | |
538 | 'repository changed while pushing - please try again' |
|
538 | 'repository changed while pushing - please try again' | |
539 | [255] |
|
539 | [255] | |
540 |
|
540 | |||
541 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
541 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
542 | pushing to ssh://user@dummy/other |
|
542 | pushing to ssh://user@dummy/other | |
543 | searching for changes |
|
543 | searching for changes | |
544 | abort: push failed: |
|
544 | abort: push failed: | |
545 | 'repository changed while pushing - please try again' |
|
545 | 'repository changed while pushing - please try again' | |
546 | [255] |
|
546 | [255] | |
547 |
|
547 | |||
548 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
548 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
549 | pushing to http://localhost:$HGPORT2/ |
|
549 | pushing to http://localhost:$HGPORT2/ | |
550 | searching for changes |
|
550 | searching for changes | |
551 | abort: push failed: |
|
551 | abort: push failed: | |
552 | 'repository changed while pushing - please try again' |
|
552 | 'repository changed while pushing - please try again' | |
553 | [255] |
|
553 | [255] | |
554 |
|
554 | |||
555 | Doing the actual push: hook abort |
|
555 | Doing the actual push: hook abort | |
556 |
|
556 | |||
557 | $ cat << EOF >> $HGRCPATH |
|
557 | $ cat << EOF >> $HGRCPATH | |
558 | > [failpush] |
|
558 | > [failpush] | |
559 | > reason = |
|
559 | > reason = | |
560 | > [hooks] |
|
560 | > [hooks] | |
561 | > pretxnclose.failpush = sh -c "echo 'You shall not pass!'; false" |
|
561 | > pretxnclose.failpush = sh -c "echo 'You shall not pass!'; false" | |
562 | > txnabort.failpush = sh -c "echo 'Cleaning up the mess...'" |
|
562 | > txnabort.failpush = sh -c "echo 'Cleaning up the mess...'" | |
563 | > EOF |
|
563 | > EOF | |
564 |
|
564 | |||
565 | $ killdaemons.py |
|
565 | $ killdaemons.py | |
566 | $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
566 | $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
567 | $ cat other.pid >> $DAEMON_PIDS |
|
567 | $ cat other.pid >> $DAEMON_PIDS | |
568 |
|
568 | |||
569 | $ hg -R main push other -r e7ec4e813ba6 |
|
569 | $ hg -R main push other -r e7ec4e813ba6 | |
570 | pushing to other |
|
570 | pushing to other | |
571 | searching for changes |
|
571 | searching for changes | |
572 | remote: adding changesets |
|
572 | remote: adding changesets | |
573 | remote: adding manifests |
|
573 | remote: adding manifests | |
574 | remote: adding file changes |
|
574 | remote: adding file changes | |
575 | remote: added 1 changesets with 1 changes to 1 files |
|
575 | remote: added 1 changesets with 1 changes to 1 files | |
576 | remote: pre-close-tip:e7ec4e813ba6 draft |
|
576 | remote: pre-close-tip:e7ec4e813ba6 draft | |
577 | remote: You shall not pass! |
|
577 | remote: You shall not pass! | |
578 | remote: transaction abort! |
|
578 | remote: transaction abort! | |
579 | remote: Cleaning up the mess... |
|
579 | remote: Cleaning up the mess... | |
580 | remote: rollback completed |
|
580 | remote: rollback completed | |
581 | abort: pretxnclose.failpush hook exited with status 1 |
|
581 | abort: pretxnclose.failpush hook exited with status 1 | |
582 | [255] |
|
582 | [255] | |
583 |
|
583 | |||
584 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
584 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
585 | pushing to ssh://user@dummy/other |
|
585 | pushing to ssh://user@dummy/other | |
586 | searching for changes |
|
586 | searching for changes | |
587 | remote: adding changesets |
|
587 | remote: adding changesets | |
588 | remote: adding manifests |
|
588 | remote: adding manifests | |
589 | remote: adding file changes |
|
589 | remote: adding file changes | |
590 | remote: added 1 changesets with 1 changes to 1 files |
|
590 | remote: added 1 changesets with 1 changes to 1 files | |
591 | remote: pre-close-tip:e7ec4e813ba6 draft |
|
591 | remote: pre-close-tip:e7ec4e813ba6 draft | |
592 | remote: You shall not pass! |
|
592 | remote: You shall not pass! | |
593 | remote: transaction abort! |
|
593 | remote: transaction abort! | |
594 | remote: Cleaning up the mess... |
|
594 | remote: Cleaning up the mess... | |
595 | remote: rollback completed |
|
595 | remote: rollback completed | |
596 | abort: pretxnclose.failpush hook exited with status 1 |
|
596 | abort: pretxnclose.failpush hook exited with status 1 | |
597 | [255] |
|
597 | [255] | |
598 |
|
598 | |||
599 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
599 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
600 | pushing to http://localhost:$HGPORT2/ |
|
600 | pushing to http://localhost:$HGPORT2/ | |
601 | searching for changes |
|
601 | searching for changes | |
602 | remote: adding changesets |
|
602 | remote: adding changesets | |
603 | remote: adding manifests |
|
603 | remote: adding manifests | |
604 | remote: adding file changes |
|
604 | remote: adding file changes | |
605 | remote: added 1 changesets with 1 changes to 1 files |
|
605 | remote: added 1 changesets with 1 changes to 1 files | |
606 | remote: pre-close-tip:e7ec4e813ba6 draft |
|
606 | remote: pre-close-tip:e7ec4e813ba6 draft | |
607 | remote: You shall not pass! |
|
607 | remote: You shall not pass! | |
608 | remote: transaction abort! |
|
608 | remote: transaction abort! | |
609 | remote: Cleaning up the mess... |
|
609 | remote: Cleaning up the mess... | |
610 | remote: rollback completed |
|
610 | remote: rollback completed | |
611 | abort: pretxnclose.failpush hook exited with status 1 |
|
611 | abort: pretxnclose.failpush hook exited with status 1 | |
612 | [255] |
|
612 | [255] | |
613 |
|
613 | |||
614 | (check that no 'pending' files remain) |
|
614 | (check that no 'pending' files remain) | |
615 |
|
615 | |||
616 | $ ls -1 other/.hg/bookmarks* |
|
616 | $ ls -1 other/.hg/bookmarks* | |
617 | other/.hg/bookmarks |
|
617 | other/.hg/bookmarks | |
618 | $ ls -1 other/.hg/store/phaseroots* |
|
618 | $ ls -1 other/.hg/store/phaseroots* | |
619 | other/.hg/store/phaseroots |
|
619 | other/.hg/store/phaseroots | |
620 | $ ls -1 other/.hg/store/00changelog.i* |
|
620 | $ ls -1 other/.hg/store/00changelog.i* | |
621 | other/.hg/store/00changelog.i |
|
621 | other/.hg/store/00changelog.i | |
622 |
|
622 | |||
623 | Check error from hook during the unbundling process itself |
|
623 | Check error from hook during the unbundling process itself | |
624 |
|
624 | |||
625 | $ cat << EOF >> $HGRCPATH |
|
625 | $ cat << EOF >> $HGRCPATH | |
626 | > pretxnchangegroup = sh -c "echo 'Fail early!'; false" |
|
626 | > pretxnchangegroup = sh -c "echo 'Fail early!'; false" | |
627 | > EOF |
|
627 | > EOF | |
628 | $ killdaemons.py # reload http config |
|
628 | $ killdaemons.py # reload http config | |
629 | $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
629 | $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
630 | $ cat other.pid >> $DAEMON_PIDS |
|
630 | $ cat other.pid >> $DAEMON_PIDS | |
631 |
|
631 | |||
632 | $ hg -R main push other -r e7ec4e813ba6 |
|
632 | $ hg -R main push other -r e7ec4e813ba6 | |
633 | pushing to other |
|
633 | pushing to other | |
634 | searching for changes |
|
634 | searching for changes | |
635 | remote: adding changesets |
|
635 | remote: adding changesets | |
636 | remote: adding manifests |
|
636 | remote: adding manifests | |
637 | remote: adding file changes |
|
637 | remote: adding file changes | |
638 | remote: added 1 changesets with 1 changes to 1 files |
|
638 | remote: added 1 changesets with 1 changes to 1 files | |
639 | remote: Fail early! |
|
639 | remote: Fail early! | |
640 | remote: transaction abort! |
|
640 | remote: transaction abort! | |
641 | remote: Cleaning up the mess... |
|
641 | remote: Cleaning up the mess... | |
642 | remote: rollback completed |
|
642 | remote: rollback completed | |
643 | abort: pretxnchangegroup hook exited with status 1 |
|
643 | abort: pretxnchangegroup hook exited with status 1 | |
644 | [255] |
|
644 | [255] | |
645 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
645 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
646 | pushing to ssh://user@dummy/other |
|
646 | pushing to ssh://user@dummy/other | |
647 | searching for changes |
|
647 | searching for changes | |
648 | remote: adding changesets |
|
648 | remote: adding changesets | |
649 | remote: adding manifests |
|
649 | remote: adding manifests | |
650 | remote: adding file changes |
|
650 | remote: adding file changes | |
651 | remote: added 1 changesets with 1 changes to 1 files |
|
651 | remote: added 1 changesets with 1 changes to 1 files | |
652 | remote: Fail early! |
|
652 | remote: Fail early! | |
653 | remote: transaction abort! |
|
653 | remote: transaction abort! | |
654 | remote: Cleaning up the mess... |
|
654 | remote: Cleaning up the mess... | |
655 | remote: rollback completed |
|
655 | remote: rollback completed | |
656 | abort: pretxnchangegroup hook exited with status 1 |
|
656 | abort: pretxnchangegroup hook exited with status 1 | |
657 | [255] |
|
657 | [255] | |
658 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
658 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
659 | pushing to http://localhost:$HGPORT2/ |
|
659 | pushing to http://localhost:$HGPORT2/ | |
660 | searching for changes |
|
660 | searching for changes | |
661 | remote: adding changesets |
|
661 | remote: adding changesets | |
662 | remote: adding manifests |
|
662 | remote: adding manifests | |
663 | remote: adding file changes |
|
663 | remote: adding file changes | |
664 | remote: added 1 changesets with 1 changes to 1 files |
|
664 | remote: added 1 changesets with 1 changes to 1 files | |
665 | remote: Fail early! |
|
665 | remote: Fail early! | |
666 | remote: transaction abort! |
|
666 | remote: transaction abort! | |
667 | remote: Cleaning up the mess... |
|
667 | remote: Cleaning up the mess... | |
668 | remote: rollback completed |
|
668 | remote: rollback completed | |
669 | abort: pretxnchangegroup hook exited with status 1 |
|
669 | abort: pretxnchangegroup hook exited with status 1 | |
670 | [255] |
|
670 | [255] | |
671 |
|
671 | |||
672 | Check output capture control. |
|
672 | Check output capture control. | |
673 |
|
673 | |||
674 | (should be still forced for http, disabled for local and ssh) |
|
674 | (should be still forced for http, disabled for local and ssh) | |
675 |
|
675 | |||
676 | $ cat >> $HGRCPATH << EOF |
|
676 | $ cat >> $HGRCPATH << EOF | |
677 | > [experimental] |
|
677 | > [experimental] | |
678 | > bundle2-output-capture=False |
|
678 | > bundle2-output-capture=False | |
679 | > EOF |
|
679 | > EOF | |
680 |
|
680 | |||
681 | $ hg -R main push other -r e7ec4e813ba6 |
|
681 | $ hg -R main push other -r e7ec4e813ba6 | |
682 | pushing to other |
|
682 | pushing to other | |
683 | searching for changes |
|
683 | searching for changes | |
684 | adding changesets |
|
684 | adding changesets | |
685 | adding manifests |
|
685 | adding manifests | |
686 | adding file changes |
|
686 | adding file changes | |
687 | added 1 changesets with 1 changes to 1 files |
|
687 | added 1 changesets with 1 changes to 1 files | |
688 | Fail early! |
|
688 | Fail early! | |
689 | transaction abort! |
|
689 | transaction abort! | |
690 | Cleaning up the mess... |
|
690 | Cleaning up the mess... | |
691 | rollback completed |
|
691 | rollback completed | |
692 | abort: pretxnchangegroup hook exited with status 1 |
|
692 | abort: pretxnchangegroup hook exited with status 1 | |
693 | [255] |
|
693 | [255] | |
694 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
694 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
695 | pushing to ssh://user@dummy/other |
|
695 | pushing to ssh://user@dummy/other | |
696 | searching for changes |
|
696 | searching for changes | |
697 | remote: adding changesets |
|
697 | remote: adding changesets | |
698 | remote: adding manifests |
|
698 | remote: adding manifests | |
699 | remote: adding file changes |
|
699 | remote: adding file changes | |
700 | remote: added 1 changesets with 1 changes to 1 files |
|
700 | remote: added 1 changesets with 1 changes to 1 files | |
701 | remote: Fail early! |
|
701 | remote: Fail early! | |
702 | remote: transaction abort! |
|
702 | remote: transaction abort! | |
703 | remote: Cleaning up the mess... |
|
703 | remote: Cleaning up the mess... | |
704 | remote: rollback completed |
|
704 | remote: rollback completed | |
705 | abort: pretxnchangegroup hook exited with status 1 |
|
705 | abort: pretxnchangegroup hook exited with status 1 | |
706 | [255] |
|
706 | [255] | |
707 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
707 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
708 | pushing to http://localhost:$HGPORT2/ |
|
708 | pushing to http://localhost:$HGPORT2/ | |
709 | searching for changes |
|
709 | searching for changes | |
710 | remote: adding changesets |
|
710 | remote: adding changesets | |
711 | remote: adding manifests |
|
711 | remote: adding manifests | |
712 | remote: adding file changes |
|
712 | remote: adding file changes | |
713 | remote: added 1 changesets with 1 changes to 1 files |
|
713 | remote: added 1 changesets with 1 changes to 1 files | |
714 | remote: Fail early! |
|
714 | remote: Fail early! | |
715 | remote: transaction abort! |
|
715 | remote: transaction abort! | |
716 | remote: Cleaning up the mess... |
|
716 | remote: Cleaning up the mess... | |
717 | remote: rollback completed |
|
717 | remote: rollback completed | |
718 | abort: pretxnchangegroup hook exited with status 1 |
|
718 | abort: pretxnchangegroup hook exited with status 1 | |
719 | [255] |
|
719 | [255] |
@@ -1,854 +1,854 b'' | |||||
1 | This test is dedicated to test the bundle2 container format |
|
1 | This test is dedicated to test the bundle2 container format | |
2 |
|
2 | |||
3 | It test multiple existing parts to test different feature of the container. You |
|
3 | It test multiple existing parts to test different feature of the container. You | |
4 | probably do not need to touch this test unless you change the binary encoding |
|
4 | probably do not need to touch this test unless you change the binary encoding | |
5 | of the bundle2 format itself. |
|
5 | of the bundle2 format itself. | |
6 |
|
6 | |||
7 | Create an extension to test bundle2 API |
|
7 | Create an extension to test bundle2 API | |
8 |
|
8 | |||
9 | $ cat > bundle2.py << EOF |
|
9 | $ cat > bundle2.py << EOF | |
10 | > """A small extension to test bundle2 implementation |
|
10 | > """A small extension to test bundle2 implementation | |
11 | > |
|
11 | > | |
12 | > Current bundle2 implementation is far too limited to be used in any core |
|
12 | > Current bundle2 implementation is far too limited to be used in any core | |
13 | > code. We still need to be able to test it while it grow up. |
|
13 | > code. We still need to be able to test it while it grow up. | |
14 | > """ |
|
14 | > """ | |
15 | > |
|
15 | > | |
16 | > import sys, os |
|
16 | > import sys, os | |
17 | > from mercurial import cmdutil |
|
17 | > from mercurial import cmdutil | |
18 | > from mercurial import util |
|
18 | > from mercurial import util | |
19 | > from mercurial import bundle2 |
|
19 | > from mercurial import bundle2 | |
20 | > from mercurial import scmutil |
|
20 | > from mercurial import scmutil | |
21 | > from mercurial import discovery |
|
21 | > from mercurial import discovery | |
22 | > from mercurial import changegroup |
|
22 | > from mercurial import changegroup | |
23 | > from mercurial import error |
|
23 | > from mercurial import error | |
24 | > from mercurial import obsolete |
|
24 | > from mercurial import obsolete | |
25 | > |
|
25 | > | |
26 | > |
|
26 | > | |
27 | > try: |
|
27 | > try: | |
28 | > import msvcrt |
|
28 | > import msvcrt | |
29 | > msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY) |
|
29 | > msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY) | |
30 | > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) |
|
30 | > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) | |
31 | > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY) |
|
31 | > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY) | |
32 | > except ImportError: |
|
32 | > except ImportError: | |
33 | > pass |
|
33 | > pass | |
34 | > |
|
34 | > | |
35 | > cmdtable = {} |
|
35 | > cmdtable = {} | |
36 | > command = cmdutil.command(cmdtable) |
|
36 | > command = cmdutil.command(cmdtable) | |
37 | > |
|
37 | > | |
38 | > ELEPHANTSSONG = """Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko |
|
38 | > ELEPHANTSSONG = """Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko | |
39 | > Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko |
|
39 | > Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko | |
40 | > Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.""" |
|
40 | > Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.""" | |
41 | > assert len(ELEPHANTSSONG) == 178 # future test say 178 bytes, trust it. |
|
41 | > assert len(ELEPHANTSSONG) == 178 # future test say 178 bytes, trust it. | |
42 | > |
|
42 | > | |
43 | > @bundle2.parthandler('test:song') |
|
43 | > @bundle2.parthandler('test:song') | |
44 | > def songhandler(op, part): |
|
44 | > def songhandler(op, part): | |
45 | > """handle a "test:song" bundle2 part, printing the lyrics on stdin""" |
|
45 | > """handle a "test:song" bundle2 part, printing the lyrics on stdin""" | |
46 | > op.ui.write('The choir starts singing:\n') |
|
46 | > op.ui.write('The choir starts singing:\n') | |
47 | > verses = 0 |
|
47 | > verses = 0 | |
48 | > for line in part.read().split('\n'): |
|
48 | > for line in part.read().split('\n'): | |
49 | > op.ui.write(' %s\n' % line) |
|
49 | > op.ui.write(' %s\n' % line) | |
50 | > verses += 1 |
|
50 | > verses += 1 | |
51 | > op.records.add('song', {'verses': verses}) |
|
51 | > op.records.add('song', {'verses': verses}) | |
52 | > |
|
52 | > | |
53 | > @bundle2.parthandler('test:ping') |
|
53 | > @bundle2.parthandler('test:ping') | |
54 | > def pinghandler(op, part): |
|
54 | > def pinghandler(op, part): | |
55 | > op.ui.write('received ping request (id %i)\n' % part.id) |
|
55 | > op.ui.write('received ping request (id %i)\n' % part.id) | |
56 | > if op.reply is not None and 'ping-pong' in op.reply.capabilities: |
|
56 | > if op.reply is not None and 'ping-pong' in op.reply.capabilities: | |
57 | > op.ui.write_err('replying to ping request (id %i)\n' % part.id) |
|
57 | > op.ui.write_err('replying to ping request (id %i)\n' % part.id) | |
58 | > op.reply.newpart('test:pong', [('in-reply-to', str(part.id))], |
|
58 | > op.reply.newpart('test:pong', [('in-reply-to', str(part.id))], | |
59 | > mandatory=False) |
|
59 | > mandatory=False) | |
60 | > |
|
60 | > | |
61 | > @bundle2.parthandler('test:debugreply') |
|
61 | > @bundle2.parthandler('test:debugreply') | |
62 | > def debugreply(op, part): |
|
62 | > def debugreply(op, part): | |
63 | > """print data about the capacity of the bundle reply""" |
|
63 | > """print data about the capacity of the bundle reply""" | |
64 | > if op.reply is None: |
|
64 | > if op.reply is None: | |
65 | > op.ui.write('debugreply: no reply\n') |
|
65 | > op.ui.write('debugreply: no reply\n') | |
66 | > else: |
|
66 | > else: | |
67 | > op.ui.write('debugreply: capabilities:\n') |
|
67 | > op.ui.write('debugreply: capabilities:\n') | |
68 | > for cap in sorted(op.reply.capabilities): |
|
68 | > for cap in sorted(op.reply.capabilities): | |
69 | > op.ui.write('debugreply: %r\n' % cap) |
|
69 | > op.ui.write('debugreply: %r\n' % cap) | |
70 | > for val in op.reply.capabilities[cap]: |
|
70 | > for val in op.reply.capabilities[cap]: | |
71 | > op.ui.write('debugreply: %r\n' % val) |
|
71 | > op.ui.write('debugreply: %r\n' % val) | |
72 | > |
|
72 | > | |
73 | > @command('bundle2', |
|
73 | > @command('bundle2', | |
74 | > [('', 'param', [], 'stream level parameter'), |
|
74 | > [('', 'param', [], 'stream level parameter'), | |
75 | > ('', 'unknown', False, 'include an unknown mandatory part in the bundle'), |
|
75 | > ('', 'unknown', False, 'include an unknown mandatory part in the bundle'), | |
76 | > ('', 'unknownparams', False, 'include an unknown part parameters in the bundle'), |
|
76 | > ('', 'unknownparams', False, 'include an unknown part parameters in the bundle'), | |
77 | > ('', 'parts', False, 'include some arbitrary parts to the bundle'), |
|
77 | > ('', 'parts', False, 'include some arbitrary parts to the bundle'), | |
78 | > ('', 'reply', False, 'produce a reply bundle'), |
|
78 | > ('', 'reply', False, 'produce a reply bundle'), | |
79 | > ('', 'pushrace', False, 'includes a check:head part with unknown nodes'), |
|
79 | > ('', 'pushrace', False, 'includes a check:head part with unknown nodes'), | |
80 | > ('', 'genraise', False, 'includes a part that raise an exception during generation'), |
|
80 | > ('', 'genraise', False, 'includes a part that raise an exception during generation'), | |
81 | > ('r', 'rev', [], 'includes those changeset in the bundle'),], |
|
81 | > ('r', 'rev', [], 'includes those changeset in the bundle'),], | |
82 | > '[OUTPUTFILE]') |
|
82 | > '[OUTPUTFILE]') | |
83 | > def cmdbundle2(ui, repo, path=None, **opts): |
|
83 | > def cmdbundle2(ui, repo, path=None, **opts): | |
84 | > """write a bundle2 container on standard output""" |
|
84 | > """write a bundle2 container on standard output""" | |
85 | > bundler = bundle2.bundle20(ui) |
|
85 | > bundler = bundle2.bundle20(ui) | |
86 | > for p in opts['param']: |
|
86 | > for p in opts['param']: | |
87 | > p = p.split('=', 1) |
|
87 | > p = p.split('=', 1) | |
88 | > try: |
|
88 | > try: | |
89 | > bundler.addparam(*p) |
|
89 | > bundler.addparam(*p) | |
90 | > except ValueError, exc: |
|
90 | > except ValueError, exc: | |
91 | > raise util.Abort('%s' % exc) |
|
91 | > raise util.Abort('%s' % exc) | |
92 | > |
|
92 | > | |
93 | > if opts['reply']: |
|
93 | > if opts['reply']: | |
94 | > capsstring = 'ping-pong\nelephants=babar,celeste\ncity%3D%21=celeste%2Cville' |
|
94 | > capsstring = 'ping-pong\nelephants=babar,celeste\ncity%3D%21=celeste%2Cville' | |
95 | > bundler.newpart('replycaps', data=capsstring) |
|
95 | > bundler.newpart('replycaps', data=capsstring) | |
96 | > |
|
96 | > | |
97 | > if opts['pushrace']: |
|
97 | > if opts['pushrace']: | |
98 | > # also serve to test the assignement of data outside of init |
|
98 | > # also serve to test the assignement of data outside of init | |
99 | > part = bundler.newpart('check:heads') |
|
99 | > part = bundler.newpart('check:heads') | |
100 | > part.data = '01234567890123456789' |
|
100 | > part.data = '01234567890123456789' | |
101 | > |
|
101 | > | |
102 | > revs = opts['rev'] |
|
102 | > revs = opts['rev'] | |
103 | > if 'rev' in opts: |
|
103 | > if 'rev' in opts: | |
104 | > revs = scmutil.revrange(repo, opts['rev']) |
|
104 | > revs = scmutil.revrange(repo, opts['rev']) | |
105 | > if revs: |
|
105 | > if revs: | |
106 | > # very crude version of a changegroup part creation |
|
106 | > # very crude version of a changegroup part creation | |
107 | > bundled = repo.revs('%ld::%ld', revs, revs) |
|
107 | > bundled = repo.revs('%ld::%ld', revs, revs) | |
108 | > headmissing = [c.node() for c in repo.set('heads(%ld)', revs)] |
|
108 | > headmissing = [c.node() for c in repo.set('heads(%ld)', revs)] | |
109 | > headcommon = [c.node() for c in repo.set('parents(%ld) - %ld', revs, revs)] |
|
109 | > headcommon = [c.node() for c in repo.set('parents(%ld) - %ld', revs, revs)] | |
110 | > outgoing = discovery.outgoing(repo.changelog, headcommon, headmissing) |
|
110 | > outgoing = discovery.outgoing(repo.changelog, headcommon, headmissing) | |
111 | > cg = changegroup.getlocalchangegroup(repo, 'test:bundle2', outgoing, None) |
|
111 | > cg = changegroup.getlocalchangegroup(repo, 'test:bundle2', outgoing, None) | |
112 | > bundler.newpart('changegroup', data=cg.getchunks(), |
|
112 | > bundler.newpart('changegroup', data=cg.getchunks(), | |
113 | > mandatory=False) |
|
113 | > mandatory=False) | |
114 | > |
|
114 | > | |
115 | > if opts['parts']: |
|
115 | > if opts['parts']: | |
116 | > bundler.newpart('test:empty', mandatory=False) |
|
116 | > bundler.newpart('test:empty', mandatory=False) | |
117 | > # add a second one to make sure we handle multiple parts |
|
117 | > # add a second one to make sure we handle multiple parts | |
118 | > bundler.newpart('test:empty', mandatory=False) |
|
118 | > bundler.newpart('test:empty', mandatory=False) | |
119 | > bundler.newpart('test:song', data=ELEPHANTSSONG, mandatory=False) |
|
119 | > bundler.newpart('test:song', data=ELEPHANTSSONG, mandatory=False) | |
120 | > bundler.newpart('test:debugreply', mandatory=False) |
|
120 | > bundler.newpart('test:debugreply', mandatory=False) | |
121 | > mathpart = bundler.newpart('test:math') |
|
121 | > mathpart = bundler.newpart('test:math') | |
122 | > mathpart.addparam('pi', '3.14') |
|
122 | > mathpart.addparam('pi', '3.14') | |
123 | > mathpart.addparam('e', '2.72') |
|
123 | > mathpart.addparam('e', '2.72') | |
124 | > mathpart.addparam('cooking', 'raw', mandatory=False) |
|
124 | > mathpart.addparam('cooking', 'raw', mandatory=False) | |
125 | > mathpart.data = '42' |
|
125 | > mathpart.data = '42' | |
126 | > mathpart.mandatory = False |
|
126 | > mathpart.mandatory = False | |
127 | > # advisory known part with unknown mandatory param |
|
127 | > # advisory known part with unknown mandatory param | |
128 | > bundler.newpart('test:song', [('randomparam','')], mandatory=False) |
|
128 | > bundler.newpart('test:song', [('randomparam','')], mandatory=False) | |
129 | > if opts['unknown']: |
|
129 | > if opts['unknown']: | |
130 | > bundler.newpart('test:unknown', data='some random content') |
|
130 | > bundler.newpart('test:unknown', data='some random content') | |
131 | > if opts['unknownparams']: |
|
131 | > if opts['unknownparams']: | |
132 | > bundler.newpart('test:song', [('randomparams', '')]) |
|
132 | > bundler.newpart('test:song', [('randomparams', '')]) | |
133 | > if opts['parts']: |
|
133 | > if opts['parts']: | |
134 | > bundler.newpart('test:ping', mandatory=False) |
|
134 | > bundler.newpart('test:ping', mandatory=False) | |
135 | > if opts['genraise']: |
|
135 | > if opts['genraise']: | |
136 | > def genraise(): |
|
136 | > def genraise(): | |
137 | > yield 'first line\n' |
|
137 | > yield 'first line\n' | |
138 | > raise RuntimeError('Someone set up us the bomb!') |
|
138 | > raise RuntimeError('Someone set up us the bomb!') | |
139 | > bundler.newpart('output', data=genraise(), mandatory=False) |
|
139 | > bundler.newpart('output', data=genraise(), mandatory=False) | |
140 | > |
|
140 | > | |
141 | > if path is None: |
|
141 | > if path is None: | |
142 | > file = sys.stdout |
|
142 | > file = sys.stdout | |
143 | > else: |
|
143 | > else: | |
144 | > file = open(path, 'wb') |
|
144 | > file = open(path, 'wb') | |
145 | > |
|
145 | > | |
146 | > try: |
|
146 | > try: | |
147 | > for chunk in bundler.getchunks(): |
|
147 | > for chunk in bundler.getchunks(): | |
148 | > file.write(chunk) |
|
148 | > file.write(chunk) | |
149 | > except RuntimeError, exc: |
|
149 | > except RuntimeError, exc: | |
150 | > raise util.Abort(exc) |
|
150 | > raise util.Abort(exc) | |
151 | > |
|
151 | > | |
152 | > @command('unbundle2', [], '') |
|
152 | > @command('unbundle2', [], '') | |
153 | > def cmdunbundle2(ui, repo, replypath=None): |
|
153 | > def cmdunbundle2(ui, repo, replypath=None): | |
154 | > """process a bundle2 stream from stdin on the current repo""" |
|
154 | > """process a bundle2 stream from stdin on the current repo""" | |
155 | > try: |
|
155 | > try: | |
156 | > tr = None |
|
156 | > tr = None | |
157 | > lock = repo.lock() |
|
157 | > lock = repo.lock() | |
158 | > tr = repo.transaction('processbundle') |
|
158 | > tr = repo.transaction('processbundle') | |
159 | > try: |
|
159 | > try: | |
160 | > unbundler = bundle2.getunbundler(ui, sys.stdin) |
|
160 | > unbundler = bundle2.getunbundler(ui, sys.stdin) | |
161 | > op = bundle2.processbundle(repo, unbundler, lambda: tr) |
|
161 | > op = bundle2.processbundle(repo, unbundler, lambda: tr) | |
162 | > tr.close() |
|
162 | > tr.close() | |
163 | > except error.BundleValueError, exc: |
|
163 | > except error.BundleValueError, exc: | |
164 | > raise util.Abort('missing support for %s' % exc) |
|
164 | > raise util.Abort('missing support for %s' % exc) | |
165 | > except error.PushRaced, exc: |
|
165 | > except error.PushRaced, exc: | |
166 | > raise util.Abort('push race: %s' % exc) |
|
166 | > raise util.Abort('push race: %s' % exc) | |
167 | > finally: |
|
167 | > finally: | |
168 | > if tr is not None: |
|
168 | > if tr is not None: | |
169 | > tr.release() |
|
169 | > tr.release() | |
170 | > lock.release() |
|
170 | > lock.release() | |
171 | > remains = sys.stdin.read() |
|
171 | > remains = sys.stdin.read() | |
172 | > ui.write('%i unread bytes\n' % len(remains)) |
|
172 | > ui.write('%i unread bytes\n' % len(remains)) | |
173 | > if op.records['song']: |
|
173 | > if op.records['song']: | |
174 | > totalverses = sum(r['verses'] for r in op.records['song']) |
|
174 | > totalverses = sum(r['verses'] for r in op.records['song']) | |
175 | > ui.write('%i total verses sung\n' % totalverses) |
|
175 | > ui.write('%i total verses sung\n' % totalverses) | |
176 | > for rec in op.records['changegroup']: |
|
176 | > for rec in op.records['changegroup']: | |
177 | > ui.write('addchangegroup return: %i\n' % rec['return']) |
|
177 | > ui.write('addchangegroup return: %i\n' % rec['return']) | |
178 | > if op.reply is not None and replypath is not None: |
|
178 | > if op.reply is not None and replypath is not None: | |
179 | > file = open(replypath, 'wb') |
|
179 | > file = open(replypath, 'wb') | |
180 | > for chunk in op.reply.getchunks(): |
|
180 | > for chunk in op.reply.getchunks(): | |
181 | > file.write(chunk) |
|
181 | > file.write(chunk) | |
182 | > |
|
182 | > | |
183 | > @command('statbundle2', [], '') |
|
183 | > @command('statbundle2', [], '') | |
184 | > def cmdstatbundle2(ui, repo): |
|
184 | > def cmdstatbundle2(ui, repo): | |
185 | > """print statistic on the bundle2 container read from stdin""" |
|
185 | > """print statistic on the bundle2 container read from stdin""" | |
186 | > unbundler = bundle2.getunbundler(ui, sys.stdin) |
|
186 | > unbundler = bundle2.getunbundler(ui, sys.stdin) | |
187 | > try: |
|
187 | > try: | |
188 | > params = unbundler.params |
|
188 | > params = unbundler.params | |
189 | > except error.BundleValueError, exc: |
|
189 | > except error.BundleValueError, exc: | |
190 | > raise util.Abort('unknown parameters: %s' % exc) |
|
190 | > raise util.Abort('unknown parameters: %s' % exc) | |
191 | > ui.write('options count: %i\n' % len(params)) |
|
191 | > ui.write('options count: %i\n' % len(params)) | |
192 | > for key in sorted(params): |
|
192 | > for key in sorted(params): | |
193 | > ui.write('- %s\n' % key) |
|
193 | > ui.write('- %s\n' % key) | |
194 | > value = params[key] |
|
194 | > value = params[key] | |
195 | > if value is not None: |
|
195 | > if value is not None: | |
196 | > ui.write(' %s\n' % value) |
|
196 | > ui.write(' %s\n' % value) | |
197 | > count = 0 |
|
197 | > count = 0 | |
198 | > for p in unbundler.iterparts(): |
|
198 | > for p in unbundler.iterparts(): | |
199 | > count += 1 |
|
199 | > count += 1 | |
200 | > ui.write(' :%s:\n' % p.type) |
|
200 | > ui.write(' :%s:\n' % p.type) | |
201 | > ui.write(' mandatory: %i\n' % len(p.mandatoryparams)) |
|
201 | > ui.write(' mandatory: %i\n' % len(p.mandatoryparams)) | |
202 | > ui.write(' advisory: %i\n' % len(p.advisoryparams)) |
|
202 | > ui.write(' advisory: %i\n' % len(p.advisoryparams)) | |
203 | > ui.write(' payload: %i bytes\n' % len(p.read())) |
|
203 | > ui.write(' payload: %i bytes\n' % len(p.read())) | |
204 | > ui.write('parts count: %i\n' % count) |
|
204 | > ui.write('parts count: %i\n' % count) | |
205 | > EOF |
|
205 | > EOF | |
206 | $ cat >> $HGRCPATH << EOF |
|
206 | $ cat >> $HGRCPATH << EOF | |
207 | > [extensions] |
|
207 | > [extensions] | |
208 | > bundle2=$TESTTMP/bundle2.py |
|
208 | > bundle2=$TESTTMP/bundle2.py | |
209 | > [experimental] |
|
209 | > [experimental] | |
210 | > bundle2-exp=True |
|
210 | > bundle2-exp=True | |
211 | > evolution=createmarkers |
|
211 | > evolution=createmarkers | |
212 | > [ui] |
|
212 | > [ui] | |
213 |
> ssh= |
|
213 | > ssh=dummyssh | |
214 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} |
|
214 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} | |
215 | > [web] |
|
215 | > [web] | |
216 | > push_ssl = false |
|
216 | > push_ssl = false | |
217 | > allow_push = * |
|
217 | > allow_push = * | |
218 | > [phases] |
|
218 | > [phases] | |
219 | > publish=False |
|
219 | > publish=False | |
220 | > EOF |
|
220 | > EOF | |
221 |
|
221 | |||
222 | The extension requires a repo (currently unused) |
|
222 | The extension requires a repo (currently unused) | |
223 |
|
223 | |||
224 | $ hg init main |
|
224 | $ hg init main | |
225 | $ cd main |
|
225 | $ cd main | |
226 | $ touch a |
|
226 | $ touch a | |
227 | $ hg add a |
|
227 | $ hg add a | |
228 | $ hg commit -m 'a' |
|
228 | $ hg commit -m 'a' | |
229 |
|
229 | |||
230 |
|
230 | |||
231 | Empty bundle |
|
231 | Empty bundle | |
232 | ================= |
|
232 | ================= | |
233 |
|
233 | |||
234 | - no option |
|
234 | - no option | |
235 | - no parts |
|
235 | - no parts | |
236 |
|
236 | |||
237 | Test bundling |
|
237 | Test bundling | |
238 |
|
238 | |||
239 | $ hg bundle2 |
|
239 | $ hg bundle2 | |
240 | HG20\x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc) |
|
240 | HG20\x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc) | |
241 |
|
241 | |||
242 | Test unbundling |
|
242 | Test unbundling | |
243 |
|
243 | |||
244 | $ hg bundle2 | hg statbundle2 |
|
244 | $ hg bundle2 | hg statbundle2 | |
245 | options count: 0 |
|
245 | options count: 0 | |
246 | parts count: 0 |
|
246 | parts count: 0 | |
247 |
|
247 | |||
248 | Test old style bundle are detected and refused |
|
248 | Test old style bundle are detected and refused | |
249 |
|
249 | |||
250 | $ hg bundle --all ../bundle.hg |
|
250 | $ hg bundle --all ../bundle.hg | |
251 | 1 changesets found |
|
251 | 1 changesets found | |
252 | $ hg statbundle2 < ../bundle.hg |
|
252 | $ hg statbundle2 < ../bundle.hg | |
253 | abort: unknown bundle version 10 |
|
253 | abort: unknown bundle version 10 | |
254 | [255] |
|
254 | [255] | |
255 |
|
255 | |||
256 | Test parameters |
|
256 | Test parameters | |
257 | ================= |
|
257 | ================= | |
258 |
|
258 | |||
259 | - some options |
|
259 | - some options | |
260 | - no parts |
|
260 | - no parts | |
261 |
|
261 | |||
262 | advisory parameters, no value |
|
262 | advisory parameters, no value | |
263 | ------------------------------- |
|
263 | ------------------------------- | |
264 |
|
264 | |||
265 | Simplest possible parameters form |
|
265 | Simplest possible parameters form | |
266 |
|
266 | |||
267 | Test generation simple option |
|
267 | Test generation simple option | |
268 |
|
268 | |||
269 | $ hg bundle2 --param 'caution' |
|
269 | $ hg bundle2 --param 'caution' | |
270 | HG20\x00\x00\x00\x07caution\x00\x00\x00\x00 (no-eol) (esc) |
|
270 | HG20\x00\x00\x00\x07caution\x00\x00\x00\x00 (no-eol) (esc) | |
271 |
|
271 | |||
272 | Test unbundling |
|
272 | Test unbundling | |
273 |
|
273 | |||
274 | $ hg bundle2 --param 'caution' | hg statbundle2 |
|
274 | $ hg bundle2 --param 'caution' | hg statbundle2 | |
275 | options count: 1 |
|
275 | options count: 1 | |
276 | - caution |
|
276 | - caution | |
277 | parts count: 0 |
|
277 | parts count: 0 | |
278 |
|
278 | |||
279 | Test generation multiple option |
|
279 | Test generation multiple option | |
280 |
|
280 | |||
281 | $ hg bundle2 --param 'caution' --param 'meal' |
|
281 | $ hg bundle2 --param 'caution' --param 'meal' | |
282 | HG20\x00\x00\x00\x0ccaution meal\x00\x00\x00\x00 (no-eol) (esc) |
|
282 | HG20\x00\x00\x00\x0ccaution meal\x00\x00\x00\x00 (no-eol) (esc) | |
283 |
|
283 | |||
284 | Test unbundling |
|
284 | Test unbundling | |
285 |
|
285 | |||
286 | $ hg bundle2 --param 'caution' --param 'meal' | hg statbundle2 |
|
286 | $ hg bundle2 --param 'caution' --param 'meal' | hg statbundle2 | |
287 | options count: 2 |
|
287 | options count: 2 | |
288 | - caution |
|
288 | - caution | |
289 | - meal |
|
289 | - meal | |
290 | parts count: 0 |
|
290 | parts count: 0 | |
291 |
|
291 | |||
292 | advisory parameters, with value |
|
292 | advisory parameters, with value | |
293 | ------------------------------- |
|
293 | ------------------------------- | |
294 |
|
294 | |||
295 | Test generation |
|
295 | Test generation | |
296 |
|
296 | |||
297 | $ hg bundle2 --param 'caution' --param 'meal=vegan' --param 'elephants' |
|
297 | $ hg bundle2 --param 'caution' --param 'meal=vegan' --param 'elephants' | |
298 | HG20\x00\x00\x00\x1ccaution meal=vegan elephants\x00\x00\x00\x00 (no-eol) (esc) |
|
298 | HG20\x00\x00\x00\x1ccaution meal=vegan elephants\x00\x00\x00\x00 (no-eol) (esc) | |
299 |
|
299 | |||
300 | Test unbundling |
|
300 | Test unbundling | |
301 |
|
301 | |||
302 | $ hg bundle2 --param 'caution' --param 'meal=vegan' --param 'elephants' | hg statbundle2 |
|
302 | $ hg bundle2 --param 'caution' --param 'meal=vegan' --param 'elephants' | hg statbundle2 | |
303 | options count: 3 |
|
303 | options count: 3 | |
304 | - caution |
|
304 | - caution | |
305 | - elephants |
|
305 | - elephants | |
306 | - meal |
|
306 | - meal | |
307 | vegan |
|
307 | vegan | |
308 | parts count: 0 |
|
308 | parts count: 0 | |
309 |
|
309 | |||
310 | parameter with special char in value |
|
310 | parameter with special char in value | |
311 | --------------------------------------------------- |
|
311 | --------------------------------------------------- | |
312 |
|
312 | |||
313 | Test generation |
|
313 | Test generation | |
314 |
|
314 | |||
315 | $ hg bundle2 --param 'e|! 7/=babar%#==tutu' --param simple |
|
315 | $ hg bundle2 --param 'e|! 7/=babar%#==tutu' --param simple | |
316 | HG20\x00\x00\x00)e%7C%21%207/=babar%25%23%3D%3Dtutu simple\x00\x00\x00\x00 (no-eol) (esc) |
|
316 | HG20\x00\x00\x00)e%7C%21%207/=babar%25%23%3D%3Dtutu simple\x00\x00\x00\x00 (no-eol) (esc) | |
317 |
|
317 | |||
318 | Test unbundling |
|
318 | Test unbundling | |
319 |
|
319 | |||
320 | $ hg bundle2 --param 'e|! 7/=babar%#==tutu' --param simple | hg statbundle2 |
|
320 | $ hg bundle2 --param 'e|! 7/=babar%#==tutu' --param simple | hg statbundle2 | |
321 | options count: 2 |
|
321 | options count: 2 | |
322 | - e|! 7/ |
|
322 | - e|! 7/ | |
323 | babar%#==tutu |
|
323 | babar%#==tutu | |
324 | - simple |
|
324 | - simple | |
325 | parts count: 0 |
|
325 | parts count: 0 | |
326 |
|
326 | |||
327 | Test unknown mandatory option |
|
327 | Test unknown mandatory option | |
328 | --------------------------------------------------- |
|
328 | --------------------------------------------------- | |
329 |
|
329 | |||
330 | $ hg bundle2 --param 'Gravity' | hg statbundle2 |
|
330 | $ hg bundle2 --param 'Gravity' | hg statbundle2 | |
331 | abort: unknown parameters: Stream Parameter - Gravity |
|
331 | abort: unknown parameters: Stream Parameter - Gravity | |
332 | [255] |
|
332 | [255] | |
333 |
|
333 | |||
334 | Test debug output |
|
334 | Test debug output | |
335 | --------------------------------------------------- |
|
335 | --------------------------------------------------- | |
336 |
|
336 | |||
337 | bundling debug |
|
337 | bundling debug | |
338 |
|
338 | |||
339 | $ hg bundle2 --debug --param 'e|! 7/=babar%#==tutu' --param simple ../out.hg2 --config progress.debug=true --config devel.bundle2.debug=true |
|
339 | $ hg bundle2 --debug --param 'e|! 7/=babar%#==tutu' --param simple ../out.hg2 --config progress.debug=true --config devel.bundle2.debug=true | |
340 | bundle2-output-bundle: "HG20", (2 params) 0 parts total |
|
340 | bundle2-output-bundle: "HG20", (2 params) 0 parts total | |
341 | bundle2-output: start emission of HG20 stream |
|
341 | bundle2-output: start emission of HG20 stream | |
342 | bundle2-output: bundle parameter: e%7C%21%207/=babar%25%23%3D%3Dtutu simple |
|
342 | bundle2-output: bundle parameter: e%7C%21%207/=babar%25%23%3D%3Dtutu simple | |
343 | bundle2-output: start of parts |
|
343 | bundle2-output: start of parts | |
344 | bundle2-output: end of bundle |
|
344 | bundle2-output: end of bundle | |
345 |
|
345 | |||
346 | file content is ok |
|
346 | file content is ok | |
347 |
|
347 | |||
348 | $ cat ../out.hg2 |
|
348 | $ cat ../out.hg2 | |
349 | HG20\x00\x00\x00)e%7C%21%207/=babar%25%23%3D%3Dtutu simple\x00\x00\x00\x00 (no-eol) (esc) |
|
349 | HG20\x00\x00\x00)e%7C%21%207/=babar%25%23%3D%3Dtutu simple\x00\x00\x00\x00 (no-eol) (esc) | |
350 |
|
350 | |||
351 | unbundling debug |
|
351 | unbundling debug | |
352 |
|
352 | |||
353 | $ hg statbundle2 --debug --config progress.debug=true --config devel.bundle2.debug=true < ../out.hg2 |
|
353 | $ hg statbundle2 --debug --config progress.debug=true --config devel.bundle2.debug=true < ../out.hg2 | |
354 | bundle2-input: start processing of HG20 stream |
|
354 | bundle2-input: start processing of HG20 stream | |
355 | bundle2-input: reading bundle2 stream parameters |
|
355 | bundle2-input: reading bundle2 stream parameters | |
356 | bundle2-input: ignoring unknown parameter 'e|! 7/' |
|
356 | bundle2-input: ignoring unknown parameter 'e|! 7/' | |
357 | bundle2-input: ignoring unknown parameter 'simple' |
|
357 | bundle2-input: ignoring unknown parameter 'simple' | |
358 | options count: 2 |
|
358 | options count: 2 | |
359 | - e|! 7/ |
|
359 | - e|! 7/ | |
360 | babar%#==tutu |
|
360 | babar%#==tutu | |
361 | - simple |
|
361 | - simple | |
362 | bundle2-input: start extraction of bundle2 parts |
|
362 | bundle2-input: start extraction of bundle2 parts | |
363 | bundle2-input: part header size: 0 |
|
363 | bundle2-input: part header size: 0 | |
364 | bundle2-input: end of bundle2 stream |
|
364 | bundle2-input: end of bundle2 stream | |
365 | parts count: 0 |
|
365 | parts count: 0 | |
366 |
|
366 | |||
367 |
|
367 | |||
368 | Test buggy input |
|
368 | Test buggy input | |
369 | --------------------------------------------------- |
|
369 | --------------------------------------------------- | |
370 |
|
370 | |||
371 | empty parameter name |
|
371 | empty parameter name | |
372 |
|
372 | |||
373 | $ hg bundle2 --param '' --quiet |
|
373 | $ hg bundle2 --param '' --quiet | |
374 | abort: empty parameter name |
|
374 | abort: empty parameter name | |
375 | [255] |
|
375 | [255] | |
376 |
|
376 | |||
377 | bad parameter name |
|
377 | bad parameter name | |
378 |
|
378 | |||
379 | $ hg bundle2 --param 42babar |
|
379 | $ hg bundle2 --param 42babar | |
380 | abort: non letter first character: '42babar' |
|
380 | abort: non letter first character: '42babar' | |
381 | [255] |
|
381 | [255] | |
382 |
|
382 | |||
383 |
|
383 | |||
384 | Test part |
|
384 | Test part | |
385 | ================= |
|
385 | ================= | |
386 |
|
386 | |||
387 | $ hg bundle2 --parts ../parts.hg2 --debug --config progress.debug=true --config devel.bundle2.debug=true |
|
387 | $ hg bundle2 --parts ../parts.hg2 --debug --config progress.debug=true --config devel.bundle2.debug=true | |
388 | bundle2-output-bundle: "HG20", 7 parts total |
|
388 | bundle2-output-bundle: "HG20", 7 parts total | |
389 | bundle2-output: start emission of HG20 stream |
|
389 | bundle2-output: start emission of HG20 stream | |
390 | bundle2-output: bundle parameter: |
|
390 | bundle2-output: bundle parameter: | |
391 | bundle2-output: start of parts |
|
391 | bundle2-output: start of parts | |
392 | bundle2-output: bundle part: "test:empty" |
|
392 | bundle2-output: bundle part: "test:empty" | |
393 | bundle2-output-part: "test:empty" (advisory) empty payload |
|
393 | bundle2-output-part: "test:empty" (advisory) empty payload | |
394 | bundle2-output: part 0: "test:empty" |
|
394 | bundle2-output: part 0: "test:empty" | |
395 | bundle2-output: header chunk size: 17 |
|
395 | bundle2-output: header chunk size: 17 | |
396 | bundle2-output: closing payload chunk |
|
396 | bundle2-output: closing payload chunk | |
397 | bundle2-output: bundle part: "test:empty" |
|
397 | bundle2-output: bundle part: "test:empty" | |
398 | bundle2-output-part: "test:empty" (advisory) empty payload |
|
398 | bundle2-output-part: "test:empty" (advisory) empty payload | |
399 | bundle2-output: part 1: "test:empty" |
|
399 | bundle2-output: part 1: "test:empty" | |
400 | bundle2-output: header chunk size: 17 |
|
400 | bundle2-output: header chunk size: 17 | |
401 | bundle2-output: closing payload chunk |
|
401 | bundle2-output: closing payload chunk | |
402 | bundle2-output: bundle part: "test:song" |
|
402 | bundle2-output: bundle part: "test:song" | |
403 | bundle2-output-part: "test:song" (advisory) 178 bytes payload |
|
403 | bundle2-output-part: "test:song" (advisory) 178 bytes payload | |
404 | bundle2-output: part 2: "test:song" |
|
404 | bundle2-output: part 2: "test:song" | |
405 | bundle2-output: header chunk size: 16 |
|
405 | bundle2-output: header chunk size: 16 | |
406 | bundle2-output: payload chunk size: 178 |
|
406 | bundle2-output: payload chunk size: 178 | |
407 | bundle2-output: closing payload chunk |
|
407 | bundle2-output: closing payload chunk | |
408 | bundle2-output: bundle part: "test:debugreply" |
|
408 | bundle2-output: bundle part: "test:debugreply" | |
409 | bundle2-output-part: "test:debugreply" (advisory) empty payload |
|
409 | bundle2-output-part: "test:debugreply" (advisory) empty payload | |
410 | bundle2-output: part 3: "test:debugreply" |
|
410 | bundle2-output: part 3: "test:debugreply" | |
411 | bundle2-output: header chunk size: 22 |
|
411 | bundle2-output: header chunk size: 22 | |
412 | bundle2-output: closing payload chunk |
|
412 | bundle2-output: closing payload chunk | |
413 | bundle2-output: bundle part: "test:math" |
|
413 | bundle2-output: bundle part: "test:math" | |
414 | bundle2-output-part: "test:math" (advisory) (params: 2 mandatory 2 advisory) 2 bytes payload |
|
414 | bundle2-output-part: "test:math" (advisory) (params: 2 mandatory 2 advisory) 2 bytes payload | |
415 | bundle2-output: part 4: "test:math" |
|
415 | bundle2-output: part 4: "test:math" | |
416 | bundle2-output: header chunk size: 43 |
|
416 | bundle2-output: header chunk size: 43 | |
417 | bundle2-output: payload chunk size: 2 |
|
417 | bundle2-output: payload chunk size: 2 | |
418 | bundle2-output: closing payload chunk |
|
418 | bundle2-output: closing payload chunk | |
419 | bundle2-output: bundle part: "test:song" |
|
419 | bundle2-output: bundle part: "test:song" | |
420 | bundle2-output-part: "test:song" (advisory) (params: 1 mandatory) empty payload |
|
420 | bundle2-output-part: "test:song" (advisory) (params: 1 mandatory) empty payload | |
421 | bundle2-output: part 5: "test:song" |
|
421 | bundle2-output: part 5: "test:song" | |
422 | bundle2-output: header chunk size: 29 |
|
422 | bundle2-output: header chunk size: 29 | |
423 | bundle2-output: closing payload chunk |
|
423 | bundle2-output: closing payload chunk | |
424 | bundle2-output: bundle part: "test:ping" |
|
424 | bundle2-output: bundle part: "test:ping" | |
425 | bundle2-output-part: "test:ping" (advisory) empty payload |
|
425 | bundle2-output-part: "test:ping" (advisory) empty payload | |
426 | bundle2-output: part 6: "test:ping" |
|
426 | bundle2-output: part 6: "test:ping" | |
427 | bundle2-output: header chunk size: 16 |
|
427 | bundle2-output: header chunk size: 16 | |
428 | bundle2-output: closing payload chunk |
|
428 | bundle2-output: closing payload chunk | |
429 | bundle2-output: end of bundle |
|
429 | bundle2-output: end of bundle | |
430 |
|
430 | |||
431 | $ cat ../parts.hg2 |
|
431 | $ cat ../parts.hg2 | |
432 | HG20\x00\x00\x00\x00\x00\x00\x00\x11 (esc) |
|
432 | HG20\x00\x00\x00\x00\x00\x00\x00\x11 (esc) | |
433 | test:empty\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11 (esc) |
|
433 | test:empty\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11 (esc) | |
434 | test:empty\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10 test:song\x00\x00\x00\x02\x00\x00\x00\x00\x00\xb2Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko (esc) |
|
434 | test:empty\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10 test:song\x00\x00\x00\x02\x00\x00\x00\x00\x00\xb2Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko (esc) | |
435 | Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko |
|
435 | Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko | |
436 | Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.\x00\x00\x00\x00\x00\x00\x00\x16\x0ftest:debugreply\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00+ test:math\x00\x00\x00\x04\x02\x01\x02\x04\x01\x04\x07\x03pi3.14e2.72cookingraw\x00\x00\x00\x0242\x00\x00\x00\x00\x00\x00\x00\x1d test:song\x00\x00\x00\x05\x01\x00\x0b\x00randomparam\x00\x00\x00\x00\x00\x00\x00\x10 test:ping\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc) |
|
436 | Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.\x00\x00\x00\x00\x00\x00\x00\x16\x0ftest:debugreply\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00+ test:math\x00\x00\x00\x04\x02\x01\x02\x04\x01\x04\x07\x03pi3.14e2.72cookingraw\x00\x00\x00\x0242\x00\x00\x00\x00\x00\x00\x00\x1d test:song\x00\x00\x00\x05\x01\x00\x0b\x00randomparam\x00\x00\x00\x00\x00\x00\x00\x10 test:ping\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc) | |
437 |
|
437 | |||
438 |
|
438 | |||
439 | $ hg statbundle2 < ../parts.hg2 |
|
439 | $ hg statbundle2 < ../parts.hg2 | |
440 | options count: 0 |
|
440 | options count: 0 | |
441 | :test:empty: |
|
441 | :test:empty: | |
442 | mandatory: 0 |
|
442 | mandatory: 0 | |
443 | advisory: 0 |
|
443 | advisory: 0 | |
444 | payload: 0 bytes |
|
444 | payload: 0 bytes | |
445 | :test:empty: |
|
445 | :test:empty: | |
446 | mandatory: 0 |
|
446 | mandatory: 0 | |
447 | advisory: 0 |
|
447 | advisory: 0 | |
448 | payload: 0 bytes |
|
448 | payload: 0 bytes | |
449 | :test:song: |
|
449 | :test:song: | |
450 | mandatory: 0 |
|
450 | mandatory: 0 | |
451 | advisory: 0 |
|
451 | advisory: 0 | |
452 | payload: 178 bytes |
|
452 | payload: 178 bytes | |
453 | :test:debugreply: |
|
453 | :test:debugreply: | |
454 | mandatory: 0 |
|
454 | mandatory: 0 | |
455 | advisory: 0 |
|
455 | advisory: 0 | |
456 | payload: 0 bytes |
|
456 | payload: 0 bytes | |
457 | :test:math: |
|
457 | :test:math: | |
458 | mandatory: 2 |
|
458 | mandatory: 2 | |
459 | advisory: 1 |
|
459 | advisory: 1 | |
460 | payload: 2 bytes |
|
460 | payload: 2 bytes | |
461 | :test:song: |
|
461 | :test:song: | |
462 | mandatory: 1 |
|
462 | mandatory: 1 | |
463 | advisory: 0 |
|
463 | advisory: 0 | |
464 | payload: 0 bytes |
|
464 | payload: 0 bytes | |
465 | :test:ping: |
|
465 | :test:ping: | |
466 | mandatory: 0 |
|
466 | mandatory: 0 | |
467 | advisory: 0 |
|
467 | advisory: 0 | |
468 | payload: 0 bytes |
|
468 | payload: 0 bytes | |
469 | parts count: 7 |
|
469 | parts count: 7 | |
470 |
|
470 | |||
471 | $ hg statbundle2 --debug --config progress.debug=true --config devel.bundle2.debug=true < ../parts.hg2 |
|
471 | $ hg statbundle2 --debug --config progress.debug=true --config devel.bundle2.debug=true < ../parts.hg2 | |
472 | bundle2-input: start processing of HG20 stream |
|
472 | bundle2-input: start processing of HG20 stream | |
473 | bundle2-input: reading bundle2 stream parameters |
|
473 | bundle2-input: reading bundle2 stream parameters | |
474 | options count: 0 |
|
474 | options count: 0 | |
475 | bundle2-input: start extraction of bundle2 parts |
|
475 | bundle2-input: start extraction of bundle2 parts | |
476 | bundle2-input: part header size: 17 |
|
476 | bundle2-input: part header size: 17 | |
477 | bundle2-input: part type: "test:empty" |
|
477 | bundle2-input: part type: "test:empty" | |
478 | bundle2-input: part id: "0" |
|
478 | bundle2-input: part id: "0" | |
479 | bundle2-input: part parameters: 0 |
|
479 | bundle2-input: part parameters: 0 | |
480 | :test:empty: |
|
480 | :test:empty: | |
481 | mandatory: 0 |
|
481 | mandatory: 0 | |
482 | advisory: 0 |
|
482 | advisory: 0 | |
483 | bundle2-input: payload chunk size: 0 |
|
483 | bundle2-input: payload chunk size: 0 | |
484 | payload: 0 bytes |
|
484 | payload: 0 bytes | |
485 | bundle2-input: part header size: 17 |
|
485 | bundle2-input: part header size: 17 | |
486 | bundle2-input: part type: "test:empty" |
|
486 | bundle2-input: part type: "test:empty" | |
487 | bundle2-input: part id: "1" |
|
487 | bundle2-input: part id: "1" | |
488 | bundle2-input: part parameters: 0 |
|
488 | bundle2-input: part parameters: 0 | |
489 | :test:empty: |
|
489 | :test:empty: | |
490 | mandatory: 0 |
|
490 | mandatory: 0 | |
491 | advisory: 0 |
|
491 | advisory: 0 | |
492 | bundle2-input: payload chunk size: 0 |
|
492 | bundle2-input: payload chunk size: 0 | |
493 | payload: 0 bytes |
|
493 | payload: 0 bytes | |
494 | bundle2-input: part header size: 16 |
|
494 | bundle2-input: part header size: 16 | |
495 | bundle2-input: part type: "test:song" |
|
495 | bundle2-input: part type: "test:song" | |
496 | bundle2-input: part id: "2" |
|
496 | bundle2-input: part id: "2" | |
497 | bundle2-input: part parameters: 0 |
|
497 | bundle2-input: part parameters: 0 | |
498 | :test:song: |
|
498 | :test:song: | |
499 | mandatory: 0 |
|
499 | mandatory: 0 | |
500 | advisory: 0 |
|
500 | advisory: 0 | |
501 | bundle2-input: payload chunk size: 178 |
|
501 | bundle2-input: payload chunk size: 178 | |
502 | bundle2-input: payload chunk size: 0 |
|
502 | bundle2-input: payload chunk size: 0 | |
503 | bundle2-input-part: total payload size 178 |
|
503 | bundle2-input-part: total payload size 178 | |
504 | payload: 178 bytes |
|
504 | payload: 178 bytes | |
505 | bundle2-input: part header size: 22 |
|
505 | bundle2-input: part header size: 22 | |
506 | bundle2-input: part type: "test:debugreply" |
|
506 | bundle2-input: part type: "test:debugreply" | |
507 | bundle2-input: part id: "3" |
|
507 | bundle2-input: part id: "3" | |
508 | bundle2-input: part parameters: 0 |
|
508 | bundle2-input: part parameters: 0 | |
509 | :test:debugreply: |
|
509 | :test:debugreply: | |
510 | mandatory: 0 |
|
510 | mandatory: 0 | |
511 | advisory: 0 |
|
511 | advisory: 0 | |
512 | bundle2-input: payload chunk size: 0 |
|
512 | bundle2-input: payload chunk size: 0 | |
513 | payload: 0 bytes |
|
513 | payload: 0 bytes | |
514 | bundle2-input: part header size: 43 |
|
514 | bundle2-input: part header size: 43 | |
515 | bundle2-input: part type: "test:math" |
|
515 | bundle2-input: part type: "test:math" | |
516 | bundle2-input: part id: "4" |
|
516 | bundle2-input: part id: "4" | |
517 | bundle2-input: part parameters: 3 |
|
517 | bundle2-input: part parameters: 3 | |
518 | :test:math: |
|
518 | :test:math: | |
519 | mandatory: 2 |
|
519 | mandatory: 2 | |
520 | advisory: 1 |
|
520 | advisory: 1 | |
521 | bundle2-input: payload chunk size: 2 |
|
521 | bundle2-input: payload chunk size: 2 | |
522 | bundle2-input: payload chunk size: 0 |
|
522 | bundle2-input: payload chunk size: 0 | |
523 | bundle2-input-part: total payload size 2 |
|
523 | bundle2-input-part: total payload size 2 | |
524 | payload: 2 bytes |
|
524 | payload: 2 bytes | |
525 | bundle2-input: part header size: 29 |
|
525 | bundle2-input: part header size: 29 | |
526 | bundle2-input: part type: "test:song" |
|
526 | bundle2-input: part type: "test:song" | |
527 | bundle2-input: part id: "5" |
|
527 | bundle2-input: part id: "5" | |
528 | bundle2-input: part parameters: 1 |
|
528 | bundle2-input: part parameters: 1 | |
529 | :test:song: |
|
529 | :test:song: | |
530 | mandatory: 1 |
|
530 | mandatory: 1 | |
531 | advisory: 0 |
|
531 | advisory: 0 | |
532 | bundle2-input: payload chunk size: 0 |
|
532 | bundle2-input: payload chunk size: 0 | |
533 | payload: 0 bytes |
|
533 | payload: 0 bytes | |
534 | bundle2-input: part header size: 16 |
|
534 | bundle2-input: part header size: 16 | |
535 | bundle2-input: part type: "test:ping" |
|
535 | bundle2-input: part type: "test:ping" | |
536 | bundle2-input: part id: "6" |
|
536 | bundle2-input: part id: "6" | |
537 | bundle2-input: part parameters: 0 |
|
537 | bundle2-input: part parameters: 0 | |
538 | :test:ping: |
|
538 | :test:ping: | |
539 | mandatory: 0 |
|
539 | mandatory: 0 | |
540 | advisory: 0 |
|
540 | advisory: 0 | |
541 | bundle2-input: payload chunk size: 0 |
|
541 | bundle2-input: payload chunk size: 0 | |
542 | payload: 0 bytes |
|
542 | payload: 0 bytes | |
543 | bundle2-input: part header size: 0 |
|
543 | bundle2-input: part header size: 0 | |
544 | bundle2-input: end of bundle2 stream |
|
544 | bundle2-input: end of bundle2 stream | |
545 | parts count: 7 |
|
545 | parts count: 7 | |
546 |
|
546 | |||
547 | Test actual unbundling of test part |
|
547 | Test actual unbundling of test part | |
548 | ======================================= |
|
548 | ======================================= | |
549 |
|
549 | |||
550 | Process the bundle |
|
550 | Process the bundle | |
551 |
|
551 | |||
552 | $ hg unbundle2 --debug --config progress.debug=true --config devel.bundle2.debug=true < ../parts.hg2 |
|
552 | $ hg unbundle2 --debug --config progress.debug=true --config devel.bundle2.debug=true < ../parts.hg2 | |
553 | bundle2-input: start processing of HG20 stream |
|
553 | bundle2-input: start processing of HG20 stream | |
554 | bundle2-input: reading bundle2 stream parameters |
|
554 | bundle2-input: reading bundle2 stream parameters | |
555 | bundle2-input-bundle: with-transaction |
|
555 | bundle2-input-bundle: with-transaction | |
556 | bundle2-input: start extraction of bundle2 parts |
|
556 | bundle2-input: start extraction of bundle2 parts | |
557 | bundle2-input: part header size: 17 |
|
557 | bundle2-input: part header size: 17 | |
558 | bundle2-input: part type: "test:empty" |
|
558 | bundle2-input: part type: "test:empty" | |
559 | bundle2-input: part id: "0" |
|
559 | bundle2-input: part id: "0" | |
560 | bundle2-input: part parameters: 0 |
|
560 | bundle2-input: part parameters: 0 | |
561 | bundle2-input: ignoring unsupported advisory part test:empty |
|
561 | bundle2-input: ignoring unsupported advisory part test:empty | |
562 | bundle2-input-part: "test:empty" (advisory) unsupported-type |
|
562 | bundle2-input-part: "test:empty" (advisory) unsupported-type | |
563 | bundle2-input: payload chunk size: 0 |
|
563 | bundle2-input: payload chunk size: 0 | |
564 | bundle2-input: part header size: 17 |
|
564 | bundle2-input: part header size: 17 | |
565 | bundle2-input: part type: "test:empty" |
|
565 | bundle2-input: part type: "test:empty" | |
566 | bundle2-input: part id: "1" |
|
566 | bundle2-input: part id: "1" | |
567 | bundle2-input: part parameters: 0 |
|
567 | bundle2-input: part parameters: 0 | |
568 | bundle2-input: ignoring unsupported advisory part test:empty |
|
568 | bundle2-input: ignoring unsupported advisory part test:empty | |
569 | bundle2-input-part: "test:empty" (advisory) unsupported-type |
|
569 | bundle2-input-part: "test:empty" (advisory) unsupported-type | |
570 | bundle2-input: payload chunk size: 0 |
|
570 | bundle2-input: payload chunk size: 0 | |
571 | bundle2-input: part header size: 16 |
|
571 | bundle2-input: part header size: 16 | |
572 | bundle2-input: part type: "test:song" |
|
572 | bundle2-input: part type: "test:song" | |
573 | bundle2-input: part id: "2" |
|
573 | bundle2-input: part id: "2" | |
574 | bundle2-input: part parameters: 0 |
|
574 | bundle2-input: part parameters: 0 | |
575 | bundle2-input: found a handler for part 'test:song' |
|
575 | bundle2-input: found a handler for part 'test:song' | |
576 | bundle2-input-part: "test:song" (advisory) supported |
|
576 | bundle2-input-part: "test:song" (advisory) supported | |
577 | The choir starts singing: |
|
577 | The choir starts singing: | |
578 | bundle2-input: payload chunk size: 178 |
|
578 | bundle2-input: payload chunk size: 178 | |
579 | bundle2-input: payload chunk size: 0 |
|
579 | bundle2-input: payload chunk size: 0 | |
580 | bundle2-input-part: total payload size 178 |
|
580 | bundle2-input-part: total payload size 178 | |
581 | Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko |
|
581 | Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko | |
582 | Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko |
|
582 | Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko | |
583 | Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko. |
|
583 | Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko. | |
584 | bundle2-input: part header size: 22 |
|
584 | bundle2-input: part header size: 22 | |
585 | bundle2-input: part type: "test:debugreply" |
|
585 | bundle2-input: part type: "test:debugreply" | |
586 | bundle2-input: part id: "3" |
|
586 | bundle2-input: part id: "3" | |
587 | bundle2-input: part parameters: 0 |
|
587 | bundle2-input: part parameters: 0 | |
588 | bundle2-input: found a handler for part 'test:debugreply' |
|
588 | bundle2-input: found a handler for part 'test:debugreply' | |
589 | bundle2-input-part: "test:debugreply" (advisory) supported |
|
589 | bundle2-input-part: "test:debugreply" (advisory) supported | |
590 | debugreply: no reply |
|
590 | debugreply: no reply | |
591 | bundle2-input: payload chunk size: 0 |
|
591 | bundle2-input: payload chunk size: 0 | |
592 | bundle2-input: part header size: 43 |
|
592 | bundle2-input: part header size: 43 | |
593 | bundle2-input: part type: "test:math" |
|
593 | bundle2-input: part type: "test:math" | |
594 | bundle2-input: part id: "4" |
|
594 | bundle2-input: part id: "4" | |
595 | bundle2-input: part parameters: 3 |
|
595 | bundle2-input: part parameters: 3 | |
596 | bundle2-input: ignoring unsupported advisory part test:math |
|
596 | bundle2-input: ignoring unsupported advisory part test:math | |
597 | bundle2-input-part: "test:math" (advisory) (params: 2 mandatory 2 advisory) unsupported-type |
|
597 | bundle2-input-part: "test:math" (advisory) (params: 2 mandatory 2 advisory) unsupported-type | |
598 | bundle2-input: payload chunk size: 2 |
|
598 | bundle2-input: payload chunk size: 2 | |
599 | bundle2-input: payload chunk size: 0 |
|
599 | bundle2-input: payload chunk size: 0 | |
600 | bundle2-input-part: total payload size 2 |
|
600 | bundle2-input-part: total payload size 2 | |
601 | bundle2-input: part header size: 29 |
|
601 | bundle2-input: part header size: 29 | |
602 | bundle2-input: part type: "test:song" |
|
602 | bundle2-input: part type: "test:song" | |
603 | bundle2-input: part id: "5" |
|
603 | bundle2-input: part id: "5" | |
604 | bundle2-input: part parameters: 1 |
|
604 | bundle2-input: part parameters: 1 | |
605 | bundle2-input: found a handler for part 'test:song' |
|
605 | bundle2-input: found a handler for part 'test:song' | |
606 | bundle2-input: ignoring unsupported advisory part test:song - randomparam |
|
606 | bundle2-input: ignoring unsupported advisory part test:song - randomparam | |
607 | bundle2-input-part: "test:song" (advisory) (params: 1 mandatory) unsupported-params (['randomparam']) |
|
607 | bundle2-input-part: "test:song" (advisory) (params: 1 mandatory) unsupported-params (['randomparam']) | |
608 | bundle2-input: payload chunk size: 0 |
|
608 | bundle2-input: payload chunk size: 0 | |
609 | bundle2-input: part header size: 16 |
|
609 | bundle2-input: part header size: 16 | |
610 | bundle2-input: part type: "test:ping" |
|
610 | bundle2-input: part type: "test:ping" | |
611 | bundle2-input: part id: "6" |
|
611 | bundle2-input: part id: "6" | |
612 | bundle2-input: part parameters: 0 |
|
612 | bundle2-input: part parameters: 0 | |
613 | bundle2-input: found a handler for part 'test:ping' |
|
613 | bundle2-input: found a handler for part 'test:ping' | |
614 | bundle2-input-part: "test:ping" (advisory) supported |
|
614 | bundle2-input-part: "test:ping" (advisory) supported | |
615 | received ping request (id 6) |
|
615 | received ping request (id 6) | |
616 | bundle2-input: payload chunk size: 0 |
|
616 | bundle2-input: payload chunk size: 0 | |
617 | bundle2-input: part header size: 0 |
|
617 | bundle2-input: part header size: 0 | |
618 | bundle2-input: end of bundle2 stream |
|
618 | bundle2-input: end of bundle2 stream | |
619 | bundle2-input-bundle: 6 parts total |
|
619 | bundle2-input-bundle: 6 parts total | |
620 | 0 unread bytes |
|
620 | 0 unread bytes | |
621 | 3 total verses sung |
|
621 | 3 total verses sung | |
622 |
|
622 | |||
623 | Unbundle with an unknown mandatory part |
|
623 | Unbundle with an unknown mandatory part | |
624 | (should abort) |
|
624 | (should abort) | |
625 |
|
625 | |||
626 | $ hg bundle2 --parts --unknown ../unknown.hg2 |
|
626 | $ hg bundle2 --parts --unknown ../unknown.hg2 | |
627 |
|
627 | |||
628 | $ hg unbundle2 < ../unknown.hg2 |
|
628 | $ hg unbundle2 < ../unknown.hg2 | |
629 | The choir starts singing: |
|
629 | The choir starts singing: | |
630 | Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko |
|
630 | Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko | |
631 | Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko |
|
631 | Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko | |
632 | Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko. |
|
632 | Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko. | |
633 | debugreply: no reply |
|
633 | debugreply: no reply | |
634 | 0 unread bytes |
|
634 | 0 unread bytes | |
635 | abort: missing support for test:unknown |
|
635 | abort: missing support for test:unknown | |
636 | [255] |
|
636 | [255] | |
637 |
|
637 | |||
638 | Unbundle with an unknown mandatory part parameters |
|
638 | Unbundle with an unknown mandatory part parameters | |
639 | (should abort) |
|
639 | (should abort) | |
640 |
|
640 | |||
641 | $ hg bundle2 --unknownparams ../unknown.hg2 |
|
641 | $ hg bundle2 --unknownparams ../unknown.hg2 | |
642 |
|
642 | |||
643 | $ hg unbundle2 < ../unknown.hg2 |
|
643 | $ hg unbundle2 < ../unknown.hg2 | |
644 | 0 unread bytes |
|
644 | 0 unread bytes | |
645 | abort: missing support for test:song - randomparams |
|
645 | abort: missing support for test:song - randomparams | |
646 | [255] |
|
646 | [255] | |
647 |
|
647 | |||
648 | unbundle with a reply |
|
648 | unbundle with a reply | |
649 |
|
649 | |||
650 | $ hg bundle2 --parts --reply ../parts-reply.hg2 |
|
650 | $ hg bundle2 --parts --reply ../parts-reply.hg2 | |
651 | $ hg unbundle2 ../reply.hg2 < ../parts-reply.hg2 |
|
651 | $ hg unbundle2 ../reply.hg2 < ../parts-reply.hg2 | |
652 | 0 unread bytes |
|
652 | 0 unread bytes | |
653 | 3 total verses sung |
|
653 | 3 total verses sung | |
654 |
|
654 | |||
655 | The reply is a bundle |
|
655 | The reply is a bundle | |
656 |
|
656 | |||
657 | $ cat ../reply.hg2 |
|
657 | $ cat ../reply.hg2 | |
658 | HG20\x00\x00\x00\x00\x00\x00\x00\x1b\x06output\x00\x00\x00\x00\x00\x01\x0b\x01in-reply-to3\x00\x00\x00\xd9The choir starts singing: (esc) |
|
658 | HG20\x00\x00\x00\x00\x00\x00\x00\x1b\x06output\x00\x00\x00\x00\x00\x01\x0b\x01in-reply-to3\x00\x00\x00\xd9The choir starts singing: (esc) | |
659 | Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko |
|
659 | Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko | |
660 | Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko |
|
660 | Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko | |
661 | Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko. |
|
661 | Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko. | |
662 | \x00\x00\x00\x00\x00\x00\x00\x1b\x06output\x00\x00\x00\x01\x00\x01\x0b\x01in-reply-to4\x00\x00\x00\xc9debugreply: capabilities: (esc) |
|
662 | \x00\x00\x00\x00\x00\x00\x00\x1b\x06output\x00\x00\x00\x01\x00\x01\x0b\x01in-reply-to4\x00\x00\x00\xc9debugreply: capabilities: (esc) | |
663 | debugreply: 'city=!' |
|
663 | debugreply: 'city=!' | |
664 | debugreply: 'celeste,ville' |
|
664 | debugreply: 'celeste,ville' | |
665 | debugreply: 'elephants' |
|
665 | debugreply: 'elephants' | |
666 | debugreply: 'babar' |
|
666 | debugreply: 'babar' | |
667 | debugreply: 'celeste' |
|
667 | debugreply: 'celeste' | |
668 | debugreply: 'ping-pong' |
|
668 | debugreply: 'ping-pong' | |
669 | \x00\x00\x00\x00\x00\x00\x00\x1e test:pong\x00\x00\x00\x02\x01\x00\x0b\x01in-reply-to7\x00\x00\x00\x00\x00\x00\x00\x1b\x06output\x00\x00\x00\x03\x00\x01\x0b\x01in-reply-to7\x00\x00\x00=received ping request (id 7) (esc) |
|
669 | \x00\x00\x00\x00\x00\x00\x00\x1e test:pong\x00\x00\x00\x02\x01\x00\x0b\x01in-reply-to7\x00\x00\x00\x00\x00\x00\x00\x1b\x06output\x00\x00\x00\x03\x00\x01\x0b\x01in-reply-to7\x00\x00\x00=received ping request (id 7) (esc) | |
670 | replying to ping request (id 7) |
|
670 | replying to ping request (id 7) | |
671 | \x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc) |
|
671 | \x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc) | |
672 |
|
672 | |||
673 | The reply is valid |
|
673 | The reply is valid | |
674 |
|
674 | |||
675 | $ hg statbundle2 < ../reply.hg2 |
|
675 | $ hg statbundle2 < ../reply.hg2 | |
676 | options count: 0 |
|
676 | options count: 0 | |
677 | :output: |
|
677 | :output: | |
678 | mandatory: 0 |
|
678 | mandatory: 0 | |
679 | advisory: 1 |
|
679 | advisory: 1 | |
680 | payload: 217 bytes |
|
680 | payload: 217 bytes | |
681 | :output: |
|
681 | :output: | |
682 | mandatory: 0 |
|
682 | mandatory: 0 | |
683 | advisory: 1 |
|
683 | advisory: 1 | |
684 | payload: 201 bytes |
|
684 | payload: 201 bytes | |
685 | :test:pong: |
|
685 | :test:pong: | |
686 | mandatory: 1 |
|
686 | mandatory: 1 | |
687 | advisory: 0 |
|
687 | advisory: 0 | |
688 | payload: 0 bytes |
|
688 | payload: 0 bytes | |
689 | :output: |
|
689 | :output: | |
690 | mandatory: 0 |
|
690 | mandatory: 0 | |
691 | advisory: 1 |
|
691 | advisory: 1 | |
692 | payload: 61 bytes |
|
692 | payload: 61 bytes | |
693 | parts count: 4 |
|
693 | parts count: 4 | |
694 |
|
694 | |||
695 | Unbundle the reply to get the output: |
|
695 | Unbundle the reply to get the output: | |
696 |
|
696 | |||
697 | $ hg unbundle2 < ../reply.hg2 |
|
697 | $ hg unbundle2 < ../reply.hg2 | |
698 | remote: The choir starts singing: |
|
698 | remote: The choir starts singing: | |
699 | remote: Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko |
|
699 | remote: Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko | |
700 | remote: Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko |
|
700 | remote: Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko | |
701 | remote: Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko. |
|
701 | remote: Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko. | |
702 | remote: debugreply: capabilities: |
|
702 | remote: debugreply: capabilities: | |
703 | remote: debugreply: 'city=!' |
|
703 | remote: debugreply: 'city=!' | |
704 | remote: debugreply: 'celeste,ville' |
|
704 | remote: debugreply: 'celeste,ville' | |
705 | remote: debugreply: 'elephants' |
|
705 | remote: debugreply: 'elephants' | |
706 | remote: debugreply: 'babar' |
|
706 | remote: debugreply: 'babar' | |
707 | remote: debugreply: 'celeste' |
|
707 | remote: debugreply: 'celeste' | |
708 | remote: debugreply: 'ping-pong' |
|
708 | remote: debugreply: 'ping-pong' | |
709 | remote: received ping request (id 7) |
|
709 | remote: received ping request (id 7) | |
710 | remote: replying to ping request (id 7) |
|
710 | remote: replying to ping request (id 7) | |
711 | 0 unread bytes |
|
711 | 0 unread bytes | |
712 |
|
712 | |||
713 | Test push race detection |
|
713 | Test push race detection | |
714 |
|
714 | |||
715 | $ hg bundle2 --pushrace ../part-race.hg2 |
|
715 | $ hg bundle2 --pushrace ../part-race.hg2 | |
716 |
|
716 | |||
717 | $ hg unbundle2 < ../part-race.hg2 |
|
717 | $ hg unbundle2 < ../part-race.hg2 | |
718 | 0 unread bytes |
|
718 | 0 unread bytes | |
719 | abort: push race: repository changed while pushing - please try again |
|
719 | abort: push race: repository changed while pushing - please try again | |
720 | [255] |
|
720 | [255] | |
721 |
|
721 | |||
722 | Support for changegroup |
|
722 | Support for changegroup | |
723 | =================================== |
|
723 | =================================== | |
724 |
|
724 | |||
725 | $ hg unbundle $TESTDIR/bundles/rebase.hg |
|
725 | $ hg unbundle $TESTDIR/bundles/rebase.hg | |
726 | adding changesets |
|
726 | adding changesets | |
727 | adding manifests |
|
727 | adding manifests | |
728 | adding file changes |
|
728 | adding file changes | |
729 | added 8 changesets with 7 changes to 7 files (+3 heads) |
|
729 | added 8 changesets with 7 changes to 7 files (+3 heads) | |
730 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
730 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
731 |
|
731 | |||
732 | $ hg log -G |
|
732 | $ hg log -G | |
733 | o 8:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> H |
|
733 | o 8:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> H | |
734 | | |
|
734 | | | |
735 | | o 7:eea13746799a draft Nicolas Dumazet <nicdumz.commits@gmail.com> G |
|
735 | | o 7:eea13746799a draft Nicolas Dumazet <nicdumz.commits@gmail.com> G | |
736 | |/| |
|
736 | |/| | |
737 | o | 6:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
737 | o | 6:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
738 | | | |
|
738 | | | | |
739 | | o 5:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
739 | | o 5:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
740 | |/ |
|
740 | |/ | |
741 | | o 4:32af7686d403 draft Nicolas Dumazet <nicdumz.commits@gmail.com> D |
|
741 | | o 4:32af7686d403 draft Nicolas Dumazet <nicdumz.commits@gmail.com> D | |
742 | | | |
|
742 | | | | |
743 | | o 3:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> C |
|
743 | | o 3:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> C | |
744 | | | |
|
744 | | | | |
745 | | o 2:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> B |
|
745 | | o 2:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> B | |
746 | |/ |
|
746 | |/ | |
747 | o 1:cd010b8cd998 draft Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
747 | o 1:cd010b8cd998 draft Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
748 |
|
748 | |||
749 | @ 0:3903775176ed draft test a |
|
749 | @ 0:3903775176ed draft test a | |
750 |
|
750 | |||
751 |
|
751 | |||
752 | $ hg bundle2 --debug --config progress.debug=true --config devel.bundle2.debug=true --rev '8+7+5+4' ../rev.hg2 |
|
752 | $ hg bundle2 --debug --config progress.debug=true --config devel.bundle2.debug=true --rev '8+7+5+4' ../rev.hg2 | |
753 | 4 changesets found |
|
753 | 4 changesets found | |
754 | list of changesets: |
|
754 | list of changesets: | |
755 | 32af7686d403cf45b5d95f2d70cebea587ac806a |
|
755 | 32af7686d403cf45b5d95f2d70cebea587ac806a | |
756 | 9520eea781bcca16c1e15acc0ba14335a0e8e5ba |
|
756 | 9520eea781bcca16c1e15acc0ba14335a0e8e5ba | |
757 | eea13746799a9e0bfd88f29d3c2e9dc9389f524f |
|
757 | eea13746799a9e0bfd88f29d3c2e9dc9389f524f | |
758 | 02de42196ebee42ef284b6780a87cdc96e8eaab6 |
|
758 | 02de42196ebee42ef284b6780a87cdc96e8eaab6 | |
759 | bundle2-output-bundle: "HG20", 1 parts total |
|
759 | bundle2-output-bundle: "HG20", 1 parts total | |
760 | bundle2-output: start emission of HG20 stream |
|
760 | bundle2-output: start emission of HG20 stream | |
761 | bundle2-output: bundle parameter: |
|
761 | bundle2-output: bundle parameter: | |
762 | bundle2-output: start of parts |
|
762 | bundle2-output: start of parts | |
763 | bundle2-output: bundle part: "changegroup" |
|
763 | bundle2-output: bundle part: "changegroup" | |
764 | bundle2-output-part: "changegroup" (advisory) streamed payload |
|
764 | bundle2-output-part: "changegroup" (advisory) streamed payload | |
765 | bundle2-output: part 0: "changegroup" |
|
765 | bundle2-output: part 0: "changegroup" | |
766 | bundle2-output: header chunk size: 18 |
|
766 | bundle2-output: header chunk size: 18 | |
767 | bundling: 1/4 changesets (25.00%) |
|
767 | bundling: 1/4 changesets (25.00%) | |
768 | bundling: 2/4 changesets (50.00%) |
|
768 | bundling: 2/4 changesets (50.00%) | |
769 | bundling: 3/4 changesets (75.00%) |
|
769 | bundling: 3/4 changesets (75.00%) | |
770 | bundling: 4/4 changesets (100.00%) |
|
770 | bundling: 4/4 changesets (100.00%) | |
771 | bundling: 1/4 manifests (25.00%) |
|
771 | bundling: 1/4 manifests (25.00%) | |
772 | bundling: 2/4 manifests (50.00%) |
|
772 | bundling: 2/4 manifests (50.00%) | |
773 | bundling: 3/4 manifests (75.00%) |
|
773 | bundling: 3/4 manifests (75.00%) | |
774 | bundling: 4/4 manifests (100.00%) |
|
774 | bundling: 4/4 manifests (100.00%) | |
775 | bundling: D 1/3 files (33.33%) |
|
775 | bundling: D 1/3 files (33.33%) | |
776 | bundling: E 2/3 files (66.67%) |
|
776 | bundling: E 2/3 files (66.67%) | |
777 | bundling: H 3/3 files (100.00%) |
|
777 | bundling: H 3/3 files (100.00%) | |
778 | bundle2-output: payload chunk size: 1555 |
|
778 | bundle2-output: payload chunk size: 1555 | |
779 | bundle2-output: closing payload chunk |
|
779 | bundle2-output: closing payload chunk | |
780 | bundle2-output: end of bundle |
|
780 | bundle2-output: end of bundle | |
781 |
|
781 | |||
782 | $ cat ../rev.hg2 |
|
782 | $ cat ../rev.hg2 | |
783 | HG20\x00\x00\x00\x00\x00\x00\x00\x12\x0bchangegroup\x00\x00\x00\x00\x00\x00\x00\x00\x06\x13\x00\x00\x00\xa42\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j_\xdd\xd9\x89W\xc8\xa5JMCm\xfe\x1d\xa9\xd8\x7f!\xa1\xb9{\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)6e1f4c47ecb533ffd0c8e52cdc88afb6cd39e20c (esc) |
|
783 | HG20\x00\x00\x00\x00\x00\x00\x00\x12\x0bchangegroup\x00\x00\x00\x00\x00\x00\x00\x00\x06\x13\x00\x00\x00\xa42\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j_\xdd\xd9\x89W\xc8\xa5JMCm\xfe\x1d\xa9\xd8\x7f!\xa1\xb9{\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)6e1f4c47ecb533ffd0c8e52cdc88afb6cd39e20c (esc) | |
784 | \x00\x00\x00f\x00\x00\x00h\x00\x00\x00\x02D (esc) |
|
784 | \x00\x00\x00f\x00\x00\x00h\x00\x00\x00\x02D (esc) | |
785 | \x00\x00\x00i\x00\x00\x00j\x00\x00\x00\x01D\x00\x00\x00\xa4\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\xcd\x01\x0b\x8c\xd9\x98\xf3\x98\x1aZ\x81\x15\xf9O\x8d\xa4\xabP`\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)4dece9c826f69490507b98c6383a3009b295837d (esc) |
|
785 | \x00\x00\x00i\x00\x00\x00j\x00\x00\x00\x01D\x00\x00\x00\xa4\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\xcd\x01\x0b\x8c\xd9\x98\xf3\x98\x1aZ\x81\x15\xf9O\x8d\xa4\xabP`\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)4dece9c826f69490507b98c6383a3009b295837d (esc) | |
786 | \x00\x00\x00f\x00\x00\x00h\x00\x00\x00\x02E (esc) |
|
786 | \x00\x00\x00f\x00\x00\x00h\x00\x00\x00\x02E (esc) | |
787 | \x00\x00\x00i\x00\x00\x00j\x00\x00\x00\x01E\x00\x00\x00\xa2\xee\xa17Fy\x9a\x9e\x0b\xfd\x88\xf2\x9d<.\x9d\xc98\x9fRO$\xb68|\x8c\x8c\xae7\x17\x88\x80\xf3\xfa\x95\xde\xd3\xcb\x1c\xf7\x85\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\xee\xa17Fy\x9a\x9e\x0b\xfd\x88\xf2\x9d<.\x9d\xc98\x9fRO\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)365b93d57fdf4814e2b5911d6bacff2b12014441 (esc) |
|
787 | \x00\x00\x00i\x00\x00\x00j\x00\x00\x00\x01E\x00\x00\x00\xa2\xee\xa17Fy\x9a\x9e\x0b\xfd\x88\xf2\x9d<.\x9d\xc98\x9fRO$\xb68|\x8c\x8c\xae7\x17\x88\x80\xf3\xfa\x95\xde\xd3\xcb\x1c\xf7\x85\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\xee\xa17Fy\x9a\x9e\x0b\xfd\x88\xf2\x9d<.\x9d\xc98\x9fRO\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)365b93d57fdf4814e2b5911d6bacff2b12014441 (esc) | |
788 | \x00\x00\x00f\x00\x00\x00h\x00\x00\x00\x00\x00\x00\x00i\x00\x00\x00j\x00\x00\x00\x01G\x00\x00\x00\xa4\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc) |
|
788 | \x00\x00\x00f\x00\x00\x00h\x00\x00\x00\x00\x00\x00\x00i\x00\x00\x00j\x00\x00\x00\x01G\x00\x00\x00\xa4\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc) | |
789 | \x87\xcd\xc9n\x8e\xaa\xb6$\xb68|\x8c\x8c\xae7\x17\x88\x80\xf3\xfa\x95\xde\xd3\xcb\x1c\xf7\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc) |
|
789 | \x87\xcd\xc9n\x8e\xaa\xb6$\xb68|\x8c\x8c\xae7\x17\x88\x80\xf3\xfa\x95\xde\xd3\xcb\x1c\xf7\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc) | |
790 | \x87\xcd\xc9n\x8e\xaa\xb6\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)8bee48edc7318541fc0013ee41b089276a8c24bf (esc) |
|
790 | \x87\xcd\xc9n\x8e\xaa\xb6\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)8bee48edc7318541fc0013ee41b089276a8c24bf (esc) | |
791 | \x00\x00\x00f\x00\x00\x00f\x00\x00\x00\x02H (esc) |
|
791 | \x00\x00\x00f\x00\x00\x00f\x00\x00\x00\x02H (esc) | |
792 | \x00\x00\x00g\x00\x00\x00h\x00\x00\x00\x01H\x00\x00\x00\x00\x00\x00\x00\x8bn\x1fLG\xec\xb53\xff\xd0\xc8\xe5,\xdc\x88\xaf\xb6\xcd9\xe2\x0cf\xa5\xa0\x18\x17\xfd\xf5#\x9c'8\x02\xb5\xb7a\x8d\x05\x1c\x89\xe4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j\x00\x00\x00\x81\x00\x00\x00\x81\x00\x00\x00+D\x00c3f1ca2924c16a19b0656a84900e504e5b0aec2d (esc) |
|
792 | \x00\x00\x00g\x00\x00\x00h\x00\x00\x00\x01H\x00\x00\x00\x00\x00\x00\x00\x8bn\x1fLG\xec\xb53\xff\xd0\xc8\xe5,\xdc\x88\xaf\xb6\xcd9\xe2\x0cf\xa5\xa0\x18\x17\xfd\xf5#\x9c'8\x02\xb5\xb7a\x8d\x05\x1c\x89\xe4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j\x00\x00\x00\x81\x00\x00\x00\x81\x00\x00\x00+D\x00c3f1ca2924c16a19b0656a84900e504e5b0aec2d (esc) | |
793 | \x00\x00\x00\x8bM\xec\xe9\xc8&\xf6\x94\x90P{\x98\xc68:0 \xb2\x95\x83}\x00}\x8c\x9d\x88\x84\x13%\xf5\xc6\xb0cq\xb3[N\x8a+\x1a\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\x00\x00\x00+\x00\x00\x00\xac\x00\x00\x00+E\x009c6fd0350a6c0d0c49d4a9c5017cf07043f54e58 (esc) |
|
793 | \x00\x00\x00\x8bM\xec\xe9\xc8&\xf6\x94\x90P{\x98\xc68:0 \xb2\x95\x83}\x00}\x8c\x9d\x88\x84\x13%\xf5\xc6\xb0cq\xb3[N\x8a+\x1a\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\x00\x00\x00+\x00\x00\x00\xac\x00\x00\x00+E\x009c6fd0350a6c0d0c49d4a9c5017cf07043f54e58 (esc) | |
794 | \x00\x00\x00\x8b6[\x93\xd5\x7f\xdfH\x14\xe2\xb5\x91\x1dk\xac\xff+\x12\x01DA(\xa5\x84\xc6^\xf1!\xf8\x9e\xb6j\xb7\xd0\xbc\x15=\x80\x99\xe7\xceM\xec\xe9\xc8&\xf6\x94\x90P{\x98\xc68:0 \xb2\x95\x83}\xee\xa17Fy\x9a\x9e\x0b\xfd\x88\xf2\x9d<.\x9d\xc98\x9fRO\x00\x00\x00V\x00\x00\x00V\x00\x00\x00+F\x0022bfcfd62a21a3287edbd4d656218d0f525ed76a (esc) |
|
794 | \x00\x00\x00\x8b6[\x93\xd5\x7f\xdfH\x14\xe2\xb5\x91\x1dk\xac\xff+\x12\x01DA(\xa5\x84\xc6^\xf1!\xf8\x9e\xb6j\xb7\xd0\xbc\x15=\x80\x99\xe7\xceM\xec\xe9\xc8&\xf6\x94\x90P{\x98\xc68:0 \xb2\x95\x83}\xee\xa17Fy\x9a\x9e\x0b\xfd\x88\xf2\x9d<.\x9d\xc98\x9fRO\x00\x00\x00V\x00\x00\x00V\x00\x00\x00+F\x0022bfcfd62a21a3287edbd4d656218d0f525ed76a (esc) | |
795 | \x00\x00\x00\x97\x8b\xeeH\xed\xc71\x85A\xfc\x00\x13\xeeA\xb0\x89'j\x8c$\xbf(\xa5\x84\xc6^\xf1!\xf8\x9e\xb6j\xb7\xd0\xbc\x15=\x80\x99\xe7\xce\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc) |
|
795 | \x00\x00\x00\x97\x8b\xeeH\xed\xc71\x85A\xfc\x00\x13\xeeA\xb0\x89'j\x8c$\xbf(\xa5\x84\xc6^\xf1!\xf8\x9e\xb6j\xb7\xd0\xbc\x15=\x80\x99\xe7\xce\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc) | |
796 | \x87\xcd\xc9n\x8e\xaa\xb6\x00\x00\x00+\x00\x00\x00V\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x81\x00\x00\x00+H\x008500189e74a9e0475e822093bc7db0d631aeb0b4 (esc) |
|
796 | \x87\xcd\xc9n\x8e\xaa\xb6\x00\x00\x00+\x00\x00\x00V\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x81\x00\x00\x00+H\x008500189e74a9e0475e822093bc7db0d631aeb0b4 (esc) | |
797 | \x00\x00\x00\x00\x00\x00\x00\x05D\x00\x00\x00b\xc3\xf1\xca)$\xc1j\x19\xb0ej\x84\x90\x0ePN[ (esc) |
|
797 | \x00\x00\x00\x00\x00\x00\x00\x05D\x00\x00\x00b\xc3\xf1\xca)$\xc1j\x19\xb0ej\x84\x90\x0ePN[ (esc) | |
798 | \xec-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02D (esc) |
|
798 | \xec-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02D (esc) | |
799 | \x00\x00\x00\x00\x00\x00\x00\x05E\x00\x00\x00b\x9co\xd05 (esc) |
|
799 | \x00\x00\x00\x00\x00\x00\x00\x05E\x00\x00\x00b\x9co\xd05 (esc) | |
800 | l\r (no-eol) (esc) |
|
800 | l\r (no-eol) (esc) | |
801 | \x0cI\xd4\xa9\xc5\x01|\xf0pC\xf5NX\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02E (esc) |
|
801 | \x0cI\xd4\xa9\xc5\x01|\xf0pC\xf5NX\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02E (esc) | |
802 | \x00\x00\x00\x00\x00\x00\x00\x05H\x00\x00\x00b\x85\x00\x18\x9et\xa9\xe0G^\x82 \x93\xbc}\xb0\xd61\xae\xb0\xb4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc) |
|
802 | \x00\x00\x00\x00\x00\x00\x00\x05H\x00\x00\x00b\x85\x00\x18\x9et\xa9\xe0G^\x82 \x93\xbc}\xb0\xd61\xae\xb0\xb4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc) | |
803 | \x87\xcd\xc9n\x8e\xaa\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02H (esc) |
|
803 | \x87\xcd\xc9n\x8e\xaa\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02H (esc) | |
804 | \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc) |
|
804 | \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc) | |
805 |
|
805 | |||
806 | $ hg debugbundle ../rev.hg2 |
|
806 | $ hg debugbundle ../rev.hg2 | |
807 | Stream params: {} |
|
807 | Stream params: {} | |
808 | changegroup -- '{}' |
|
808 | changegroup -- '{}' | |
809 | 32af7686d403cf45b5d95f2d70cebea587ac806a |
|
809 | 32af7686d403cf45b5d95f2d70cebea587ac806a | |
810 | 9520eea781bcca16c1e15acc0ba14335a0e8e5ba |
|
810 | 9520eea781bcca16c1e15acc0ba14335a0e8e5ba | |
811 | eea13746799a9e0bfd88f29d3c2e9dc9389f524f |
|
811 | eea13746799a9e0bfd88f29d3c2e9dc9389f524f | |
812 | 02de42196ebee42ef284b6780a87cdc96e8eaab6 |
|
812 | 02de42196ebee42ef284b6780a87cdc96e8eaab6 | |
813 | $ hg unbundle ../rev.hg2 |
|
813 | $ hg unbundle ../rev.hg2 | |
814 | adding changesets |
|
814 | adding changesets | |
815 | adding manifests |
|
815 | adding manifests | |
816 | adding file changes |
|
816 | adding file changes | |
817 | added 0 changesets with 0 changes to 3 files |
|
817 | added 0 changesets with 0 changes to 3 files | |
818 |
|
818 | |||
819 | with reply |
|
819 | with reply | |
820 |
|
820 | |||
821 | $ hg bundle2 --rev '8+7+5+4' --reply ../rev-rr.hg2 |
|
821 | $ hg bundle2 --rev '8+7+5+4' --reply ../rev-rr.hg2 | |
822 | $ hg unbundle2 ../rev-reply.hg2 < ../rev-rr.hg2 |
|
822 | $ hg unbundle2 ../rev-reply.hg2 < ../rev-rr.hg2 | |
823 | 0 unread bytes |
|
823 | 0 unread bytes | |
824 | addchangegroup return: 1 |
|
824 | addchangegroup return: 1 | |
825 |
|
825 | |||
826 | $ cat ../rev-reply.hg2 |
|
826 | $ cat ../rev-reply.hg2 | |
827 | HG20\x00\x00\x00\x00\x00\x00\x00/\x11reply:changegroup\x00\x00\x00\x00\x00\x02\x0b\x01\x06\x01in-reply-to1return1\x00\x00\x00\x00\x00\x00\x00\x1b\x06output\x00\x00\x00\x01\x00\x01\x0b\x01in-reply-to1\x00\x00\x00dadding changesets (esc) |
|
827 | HG20\x00\x00\x00\x00\x00\x00\x00/\x11reply:changegroup\x00\x00\x00\x00\x00\x02\x0b\x01\x06\x01in-reply-to1return1\x00\x00\x00\x00\x00\x00\x00\x1b\x06output\x00\x00\x00\x01\x00\x01\x0b\x01in-reply-to1\x00\x00\x00dadding changesets (esc) | |
828 | adding manifests |
|
828 | adding manifests | |
829 | adding file changes |
|
829 | adding file changes | |
830 | added 0 changesets with 0 changes to 3 files |
|
830 | added 0 changesets with 0 changes to 3 files | |
831 | \x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc) |
|
831 | \x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc) | |
832 |
|
832 | |||
833 | Check handling of exception during generation. |
|
833 | Check handling of exception during generation. | |
834 | ---------------------------------------------- |
|
834 | ---------------------------------------------- | |
835 |
|
835 | |||
836 | $ hg bundle2 --genraise > ../genfailed.hg2 |
|
836 | $ hg bundle2 --genraise > ../genfailed.hg2 | |
837 | abort: Someone set up us the bomb! |
|
837 | abort: Someone set up us the bomb! | |
838 | [255] |
|
838 | [255] | |
839 |
|
839 | |||
840 | Should still be a valid bundle |
|
840 | Should still be a valid bundle | |
841 |
|
841 | |||
842 | $ cat ../genfailed.hg2 |
|
842 | $ cat ../genfailed.hg2 | |
843 | HG20\x00\x00\x00\x00\x00\x00\x00\r (no-eol) (esc) |
|
843 | HG20\x00\x00\x00\x00\x00\x00\x00\r (no-eol) (esc) | |
844 | \x06output\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00H\x0berror:abort\x00\x00\x00\x00\x01\x00\x07-messageunexpected error: Someone set up us the bomb!\x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc) |
|
844 | \x06output\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00H\x0berror:abort\x00\x00\x00\x00\x01\x00\x07-messageunexpected error: Someone set up us the bomb!\x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc) | |
845 |
|
845 | |||
846 | And its handling on the other size raise a clean exception |
|
846 | And its handling on the other size raise a clean exception | |
847 |
|
847 | |||
848 | $ cat ../genfailed.hg2 | hg unbundle2 |
|
848 | $ cat ../genfailed.hg2 | hg unbundle2 | |
849 | 0 unread bytes |
|
849 | 0 unread bytes | |
850 | abort: unexpected error: Someone set up us the bomb! |
|
850 | abort: unexpected error: Someone set up us the bomb! | |
851 | [255] |
|
851 | [255] | |
852 |
|
852 | |||
853 |
|
853 | |||
854 | $ cd .. |
|
854 | $ cd .. |
@@ -1,111 +1,111 b'' | |||||
1 | $ cat > bundle2.py << EOF |
|
1 | $ cat > bundle2.py << EOF | |
2 | > """A small extension to test bundle2 pushback parts. |
|
2 | > """A small extension to test bundle2 pushback parts. | |
3 | > Current bundle2 implementation doesn't provide a way to generate those |
|
3 | > Current bundle2 implementation doesn't provide a way to generate those | |
4 | > parts, so they must be created by extensions. |
|
4 | > parts, so they must be created by extensions. | |
5 | > """ |
|
5 | > """ | |
6 | > from mercurial import bundle2, pushkey, exchange, util |
|
6 | > from mercurial import bundle2, pushkey, exchange, util | |
7 | > def _newhandlechangegroup(op, inpart): |
|
7 | > def _newhandlechangegroup(op, inpart): | |
8 | > """This function wraps the changegroup part handler for getbundle. |
|
8 | > """This function wraps the changegroup part handler for getbundle. | |
9 | > It issues an additional pushkey part to send a new |
|
9 | > It issues an additional pushkey part to send a new | |
10 | > bookmark back to the client""" |
|
10 | > bookmark back to the client""" | |
11 | > result = bundle2.handlechangegroup(op, inpart) |
|
11 | > result = bundle2.handlechangegroup(op, inpart) | |
12 | > if 'pushback' in op.reply.capabilities: |
|
12 | > if 'pushback' in op.reply.capabilities: | |
13 | > params = {'namespace': 'bookmarks', |
|
13 | > params = {'namespace': 'bookmarks', | |
14 | > 'key': 'new-server-mark', |
|
14 | > 'key': 'new-server-mark', | |
15 | > 'old': '', |
|
15 | > 'old': '', | |
16 | > 'new': 'tip'} |
|
16 | > 'new': 'tip'} | |
17 | > encodedparams = [(k, pushkey.encode(v)) for (k,v) in params.items()] |
|
17 | > encodedparams = [(k, pushkey.encode(v)) for (k,v) in params.items()] | |
18 | > op.reply.newpart('pushkey', mandatoryparams=encodedparams) |
|
18 | > op.reply.newpart('pushkey', mandatoryparams=encodedparams) | |
19 | > else: |
|
19 | > else: | |
20 | > op.reply.newpart('output', data='pushback not enabled') |
|
20 | > op.reply.newpart('output', data='pushback not enabled') | |
21 | > return result |
|
21 | > return result | |
22 | > _newhandlechangegroup.params = bundle2.handlechangegroup.params |
|
22 | > _newhandlechangegroup.params = bundle2.handlechangegroup.params | |
23 | > bundle2.parthandlermapping['changegroup'] = _newhandlechangegroup |
|
23 | > bundle2.parthandlermapping['changegroup'] = _newhandlechangegroup | |
24 | > EOF |
|
24 | > EOF | |
25 |
|
25 | |||
26 | $ cat >> $HGRCPATH <<EOF |
|
26 | $ cat >> $HGRCPATH <<EOF | |
27 | > [ui] |
|
27 | > [ui] | |
28 |
> ssh = |
|
28 | > ssh = dummyssh | |
29 | > username = nobody <no.reply@example.com> |
|
29 | > username = nobody <no.reply@example.com> | |
30 | > |
|
30 | > | |
31 | > [alias] |
|
31 | > [alias] | |
32 | > tglog = log -G -T "{desc} [{phase}:{node|short}]" |
|
32 | > tglog = log -G -T "{desc} [{phase}:{node|short}]" | |
33 | > EOF |
|
33 | > EOF | |
34 |
|
34 | |||
35 | Set up server repository |
|
35 | Set up server repository | |
36 |
|
36 | |||
37 | $ hg init server |
|
37 | $ hg init server | |
38 | $ cd server |
|
38 | $ cd server | |
39 | $ echo c0 > f0 |
|
39 | $ echo c0 > f0 | |
40 | $ hg commit -Am 0 |
|
40 | $ hg commit -Am 0 | |
41 | adding f0 |
|
41 | adding f0 | |
42 |
|
42 | |||
43 | Set up client repository |
|
43 | Set up client repository | |
44 |
|
44 | |||
45 | $ cd .. |
|
45 | $ cd .. | |
46 | $ hg clone ssh://user@dummy/server client -q |
|
46 | $ hg clone ssh://user@dummy/server client -q | |
47 | $ cd client |
|
47 | $ cd client | |
48 |
|
48 | |||
49 | Enable extension |
|
49 | Enable extension | |
50 | $ cat >> $HGRCPATH <<EOF |
|
50 | $ cat >> $HGRCPATH <<EOF | |
51 | > [extensions] |
|
51 | > [extensions] | |
52 | > bundle2=$TESTTMP/bundle2.py |
|
52 | > bundle2=$TESTTMP/bundle2.py | |
53 | > [experimental] |
|
53 | > [experimental] | |
54 | > bundle2-exp = True |
|
54 | > bundle2-exp = True | |
55 | > EOF |
|
55 | > EOF | |
56 |
|
56 | |||
57 | Without config |
|
57 | Without config | |
58 |
|
58 | |||
59 | $ cd ../client |
|
59 | $ cd ../client | |
60 | $ echo c1 > f1 |
|
60 | $ echo c1 > f1 | |
61 | $ hg commit -Am 1 |
|
61 | $ hg commit -Am 1 | |
62 | adding f1 |
|
62 | adding f1 | |
63 | $ hg push |
|
63 | $ hg push | |
64 | pushing to ssh://user@dummy/server |
|
64 | pushing to ssh://user@dummy/server | |
65 | searching for changes |
|
65 | searching for changes | |
66 | remote: adding changesets |
|
66 | remote: adding changesets | |
67 | remote: adding manifests |
|
67 | remote: adding manifests | |
68 | remote: adding file changes |
|
68 | remote: adding file changes | |
69 | remote: added 1 changesets with 1 changes to 1 files |
|
69 | remote: added 1 changesets with 1 changes to 1 files | |
70 | remote: pushback not enabled |
|
70 | remote: pushback not enabled | |
71 | $ hg bookmark |
|
71 | $ hg bookmark | |
72 | no bookmarks set |
|
72 | no bookmarks set | |
73 |
|
73 | |||
74 | $ cd ../server |
|
74 | $ cd ../server | |
75 | $ hg tglog |
|
75 | $ hg tglog | |
76 | o 1 [public:2b9c7234e035] |
|
76 | o 1 [public:2b9c7234e035] | |
77 | | |
|
77 | | | |
78 | @ 0 [public:6cee5c8f3e5b] |
|
78 | @ 0 [public:6cee5c8f3e5b] | |
79 |
|
79 | |||
80 |
|
80 | |||
81 |
|
81 | |||
82 |
|
82 | |||
83 | With config |
|
83 | With config | |
84 |
|
84 | |||
85 | $ cd ../client |
|
85 | $ cd ../client | |
86 | $ echo '[experimental]' >> .hg/hgrc |
|
86 | $ echo '[experimental]' >> .hg/hgrc | |
87 | $ echo 'bundle2.pushback = True' >> .hg/hgrc |
|
87 | $ echo 'bundle2.pushback = True' >> .hg/hgrc | |
88 | $ echo c2 > f2 |
|
88 | $ echo c2 > f2 | |
89 | $ hg commit -Am 2 |
|
89 | $ hg commit -Am 2 | |
90 | adding f2 |
|
90 | adding f2 | |
91 | $ hg push |
|
91 | $ hg push | |
92 | pushing to ssh://user@dummy/server |
|
92 | pushing to ssh://user@dummy/server | |
93 | searching for changes |
|
93 | searching for changes | |
94 | remote: adding changesets |
|
94 | remote: adding changesets | |
95 | remote: adding manifests |
|
95 | remote: adding manifests | |
96 | remote: adding file changes |
|
96 | remote: adding file changes | |
97 | remote: added 1 changesets with 1 changes to 1 files |
|
97 | remote: added 1 changesets with 1 changes to 1 files | |
98 | $ hg bookmark |
|
98 | $ hg bookmark | |
99 | new-server-mark 2:0a76dfb2e179 |
|
99 | new-server-mark 2:0a76dfb2e179 | |
100 |
|
100 | |||
101 | $ cd ../server |
|
101 | $ cd ../server | |
102 | $ hg tglog |
|
102 | $ hg tglog | |
103 | o 2 [public:0a76dfb2e179] |
|
103 | o 2 [public:0a76dfb2e179] | |
104 | | |
|
104 | | | |
105 | o 1 [public:2b9c7234e035] |
|
105 | o 1 [public:2b9c7234e035] | |
106 | | |
|
106 | | | |
107 | @ 0 [public:6cee5c8f3e5b] |
|
107 | @ 0 [public:6cee5c8f3e5b] | |
108 |
|
108 | |||
109 |
|
109 | |||
110 |
|
110 | |||
111 |
|
111 |
@@ -1,592 +1,592 b'' | |||||
1 | #require killdaemons |
|
1 | #require killdaemons | |
2 |
|
2 | |||
3 | Create an extension to test bundle2 remote-changegroup parts |
|
3 | Create an extension to test bundle2 remote-changegroup parts | |
4 |
|
4 | |||
5 | $ cat > bundle2.py << EOF |
|
5 | $ cat > bundle2.py << EOF | |
6 | > """A small extension to test bundle2 remote-changegroup parts. |
|
6 | > """A small extension to test bundle2 remote-changegroup parts. | |
7 | > |
|
7 | > | |
8 | > Current bundle2 implementation doesn't provide a way to generate those |
|
8 | > Current bundle2 implementation doesn't provide a way to generate those | |
9 | > parts, so they must be created by extensions. |
|
9 | > parts, so they must be created by extensions. | |
10 | > """ |
|
10 | > """ | |
11 | > from mercurial import bundle2, changegroup, exchange, util |
|
11 | > from mercurial import bundle2, changegroup, exchange, util | |
12 | > |
|
12 | > | |
13 | > def _getbundlechangegrouppart(bundler, repo, source, bundlecaps=None, |
|
13 | > def _getbundlechangegrouppart(bundler, repo, source, bundlecaps=None, | |
14 | > b2caps=None, heads=None, common=None, |
|
14 | > b2caps=None, heads=None, common=None, | |
15 | > **kwargs): |
|
15 | > **kwargs): | |
16 | > """this function replaces the changegroup part handler for getbundle. |
|
16 | > """this function replaces the changegroup part handler for getbundle. | |
17 | > It allows to create a set of arbitrary parts containing changegroups |
|
17 | > It allows to create a set of arbitrary parts containing changegroups | |
18 | > and remote-changegroups, as described in a bundle2maker file in the |
|
18 | > and remote-changegroups, as described in a bundle2maker file in the | |
19 | > repository .hg/ directory. |
|
19 | > repository .hg/ directory. | |
20 | > |
|
20 | > | |
21 | > Each line of that bundle2maker file contain a description of the |
|
21 | > Each line of that bundle2maker file contain a description of the | |
22 | > part to add: |
|
22 | > part to add: | |
23 | > - changegroup common_revset heads_revset |
|
23 | > - changegroup common_revset heads_revset | |
24 | > Creates a changegroup part based, using common_revset and |
|
24 | > Creates a changegroup part based, using common_revset and | |
25 | > heads_revset for changegroup.getchangegroup. |
|
25 | > heads_revset for changegroup.getchangegroup. | |
26 | > - remote-changegroup url file |
|
26 | > - remote-changegroup url file | |
27 | > Creates a remote-changegroup part for a bundle at the given |
|
27 | > Creates a remote-changegroup part for a bundle at the given | |
28 | > url. Size and digest, as required by the client, are computed |
|
28 | > url. Size and digest, as required by the client, are computed | |
29 | > from the given file. |
|
29 | > from the given file. | |
30 | > - raw-remote-changegroup <python expression> |
|
30 | > - raw-remote-changegroup <python expression> | |
31 | > Creates a remote-changegroup part with the data given in the |
|
31 | > Creates a remote-changegroup part with the data given in the | |
32 | > python expression as parameters. The python expression is |
|
32 | > python expression as parameters. The python expression is | |
33 | > evaluated with eval, and is expected to be a dict. |
|
33 | > evaluated with eval, and is expected to be a dict. | |
34 | > """ |
|
34 | > """ | |
35 | > def newpart(name, data=''): |
|
35 | > def newpart(name, data=''): | |
36 | > """wrapper around bundler.newpart adding an extra part making the |
|
36 | > """wrapper around bundler.newpart adding an extra part making the | |
37 | > client output information about each processed part""" |
|
37 | > client output information about each processed part""" | |
38 | > bundler.newpart('output', data=name) |
|
38 | > bundler.newpart('output', data=name) | |
39 | > part = bundler.newpart(name, data=data) |
|
39 | > part = bundler.newpart(name, data=data) | |
40 | > return part |
|
40 | > return part | |
41 | > |
|
41 | > | |
42 | > for line in open(repo.join('bundle2maker'), 'r'): |
|
42 | > for line in open(repo.join('bundle2maker'), 'r'): | |
43 | > line = line.strip() |
|
43 | > line = line.strip() | |
44 | > try: |
|
44 | > try: | |
45 | > verb, args = line.split(None, 1) |
|
45 | > verb, args = line.split(None, 1) | |
46 | > except ValueError: |
|
46 | > except ValueError: | |
47 | > verb, args = line, '' |
|
47 | > verb, args = line, '' | |
48 | > if verb == 'remote-changegroup': |
|
48 | > if verb == 'remote-changegroup': | |
49 | > url, file = args.split() |
|
49 | > url, file = args.split() | |
50 | > bundledata = open(file, 'rb').read() |
|
50 | > bundledata = open(file, 'rb').read() | |
51 | > digest = util.digester.preferred(b2caps['digests']) |
|
51 | > digest = util.digester.preferred(b2caps['digests']) | |
52 | > d = util.digester([digest], bundledata) |
|
52 | > d = util.digester([digest], bundledata) | |
53 | > part = newpart('remote-changegroup') |
|
53 | > part = newpart('remote-changegroup') | |
54 | > part.addparam('url', url) |
|
54 | > part.addparam('url', url) | |
55 | > part.addparam('size', str(len(bundledata))) |
|
55 | > part.addparam('size', str(len(bundledata))) | |
56 | > part.addparam('digests', digest) |
|
56 | > part.addparam('digests', digest) | |
57 | > part.addparam('digest:%s' % digest, d[digest]) |
|
57 | > part.addparam('digest:%s' % digest, d[digest]) | |
58 | > elif verb == 'raw-remote-changegroup': |
|
58 | > elif verb == 'raw-remote-changegroup': | |
59 | > part = newpart('remote-changegroup') |
|
59 | > part = newpart('remote-changegroup') | |
60 | > for k, v in eval(args).items(): |
|
60 | > for k, v in eval(args).items(): | |
61 | > part.addparam(k, str(v)) |
|
61 | > part.addparam(k, str(v)) | |
62 | > elif verb == 'changegroup': |
|
62 | > elif verb == 'changegroup': | |
63 | > _common, heads = args.split() |
|
63 | > _common, heads = args.split() | |
64 | > common.extend(repo.lookup(r) for r in repo.revs(_common)) |
|
64 | > common.extend(repo.lookup(r) for r in repo.revs(_common)) | |
65 | > heads = [repo.lookup(r) for r in repo.revs(heads)] |
|
65 | > heads = [repo.lookup(r) for r in repo.revs(heads)] | |
66 | > cg = changegroup.getchangegroup(repo, 'changegroup', |
|
66 | > cg = changegroup.getchangegroup(repo, 'changegroup', | |
67 | > heads=heads, common=common) |
|
67 | > heads=heads, common=common) | |
68 | > newpart('changegroup', cg.getchunks()) |
|
68 | > newpart('changegroup', cg.getchunks()) | |
69 | > else: |
|
69 | > else: | |
70 | > raise Exception('unknown verb') |
|
70 | > raise Exception('unknown verb') | |
71 | > |
|
71 | > | |
72 | > exchange.getbundle2partsmapping['changegroup'] = _getbundlechangegrouppart |
|
72 | > exchange.getbundle2partsmapping['changegroup'] = _getbundlechangegrouppart | |
73 | > EOF |
|
73 | > EOF | |
74 |
|
74 | |||
75 | Start a simple HTTP server to serve bundles |
|
75 | Start a simple HTTP server to serve bundles | |
76 |
|
76 | |||
77 | $ python "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid |
|
77 | $ python "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid | |
78 | $ cat dumb.pid >> $DAEMON_PIDS |
|
78 | $ cat dumb.pid >> $DAEMON_PIDS | |
79 |
|
79 | |||
80 | $ cat >> $HGRCPATH << EOF |
|
80 | $ cat >> $HGRCPATH << EOF | |
81 | > [experimental] |
|
81 | > [experimental] | |
82 | > bundle2-exp=True |
|
82 | > bundle2-exp=True | |
83 | > [ui] |
|
83 | > [ui] | |
84 |
> ssh= |
|
84 | > ssh=dummyssh | |
85 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} |
|
85 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} | |
86 | > EOF |
|
86 | > EOF | |
87 |
|
87 | |||
88 | $ hg init repo |
|
88 | $ hg init repo | |
89 |
|
89 | |||
90 | $ hg -R repo unbundle $TESTDIR/bundles/rebase.hg |
|
90 | $ hg -R repo unbundle $TESTDIR/bundles/rebase.hg | |
91 | adding changesets |
|
91 | adding changesets | |
92 | adding manifests |
|
92 | adding manifests | |
93 | adding file changes |
|
93 | adding file changes | |
94 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
94 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
95 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
95 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
96 |
|
96 | |||
97 | $ hg -R repo log -G |
|
97 | $ hg -R repo log -G | |
98 | o 7:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> H |
|
98 | o 7:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> H | |
99 | | |
|
99 | | | |
100 | | o 6:eea13746799a draft Nicolas Dumazet <nicdumz.commits@gmail.com> G |
|
100 | | o 6:eea13746799a draft Nicolas Dumazet <nicdumz.commits@gmail.com> G | |
101 | |/| |
|
101 | |/| | |
102 | o | 5:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
102 | o | 5:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
103 | | | |
|
103 | | | | |
104 | | o 4:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
104 | | o 4:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
105 | |/ |
|
105 | |/ | |
106 | | o 3:32af7686d403 draft Nicolas Dumazet <nicdumz.commits@gmail.com> D |
|
106 | | o 3:32af7686d403 draft Nicolas Dumazet <nicdumz.commits@gmail.com> D | |
107 | | | |
|
107 | | | | |
108 | | o 2:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> C |
|
108 | | o 2:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> C | |
109 | | | |
|
109 | | | | |
110 | | o 1:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> B |
|
110 | | o 1:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> B | |
111 | |/ |
|
111 | |/ | |
112 | o 0:cd010b8cd998 draft Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
112 | o 0:cd010b8cd998 draft Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
113 |
|
113 | |||
114 | $ hg clone repo orig |
|
114 | $ hg clone repo orig | |
115 | updating to branch default |
|
115 | updating to branch default | |
116 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
116 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
117 |
|
117 | |||
118 | $ cat > repo/.hg/hgrc << EOF |
|
118 | $ cat > repo/.hg/hgrc << EOF | |
119 | > [extensions] |
|
119 | > [extensions] | |
120 | > bundle2=$TESTTMP/bundle2.py |
|
120 | > bundle2=$TESTTMP/bundle2.py | |
121 | > EOF |
|
121 | > EOF | |
122 |
|
122 | |||
123 | Test a pull with an remote-changegroup |
|
123 | Test a pull with an remote-changegroup | |
124 |
|
124 | |||
125 | $ hg bundle -R repo --base '0:4' -r '5:7' bundle.hg |
|
125 | $ hg bundle -R repo --base '0:4' -r '5:7' bundle.hg | |
126 | 3 changesets found |
|
126 | 3 changesets found | |
127 | $ cat > repo/.hg/bundle2maker << EOF |
|
127 | $ cat > repo/.hg/bundle2maker << EOF | |
128 | > remote-changegroup http://localhost:$HGPORT/bundle.hg bundle.hg |
|
128 | > remote-changegroup http://localhost:$HGPORT/bundle.hg bundle.hg | |
129 | > EOF |
|
129 | > EOF | |
130 | $ hg clone orig clone -r 3 -r 4 |
|
130 | $ hg clone orig clone -r 3 -r 4 | |
131 | adding changesets |
|
131 | adding changesets | |
132 | adding manifests |
|
132 | adding manifests | |
133 | adding file changes |
|
133 | adding file changes | |
134 | added 5 changesets with 5 changes to 5 files (+1 heads) |
|
134 | added 5 changesets with 5 changes to 5 files (+1 heads) | |
135 | updating to branch default |
|
135 | updating to branch default | |
136 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
136 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
137 | $ hg pull -R clone ssh://user@dummy/repo |
|
137 | $ hg pull -R clone ssh://user@dummy/repo | |
138 | pulling from ssh://user@dummy/repo |
|
138 | pulling from ssh://user@dummy/repo | |
139 | searching for changes |
|
139 | searching for changes | |
140 | remote: remote-changegroup |
|
140 | remote: remote-changegroup | |
141 | adding changesets |
|
141 | adding changesets | |
142 | adding manifests |
|
142 | adding manifests | |
143 | adding file changes |
|
143 | adding file changes | |
144 | added 3 changesets with 2 changes to 2 files (+1 heads) |
|
144 | added 3 changesets with 2 changes to 2 files (+1 heads) | |
145 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
145 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
146 | $ hg -R clone log -G |
|
146 | $ hg -R clone log -G | |
147 | o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H |
|
147 | o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H | |
148 | | |
|
148 | | | |
149 | | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G |
|
149 | | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G | |
150 | |/| |
|
150 | |/| | |
151 | o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
151 | o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
152 | | | |
|
152 | | | | |
153 | | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
153 | | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
154 | |/ |
|
154 | |/ | |
155 | | @ 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D |
|
155 | | @ 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D | |
156 | | | |
|
156 | | | | |
157 | | o 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C |
|
157 | | o 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C | |
158 | | | |
|
158 | | | | |
159 | | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B |
|
159 | | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B | |
160 | |/ |
|
160 | |/ | |
161 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
161 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
162 |
|
162 | |||
163 | $ rm -rf clone |
|
163 | $ rm -rf clone | |
164 |
|
164 | |||
165 | Test a pull with an remote-changegroup and a following changegroup |
|
165 | Test a pull with an remote-changegroup and a following changegroup | |
166 |
|
166 | |||
167 | $ hg bundle -R repo --base 2 -r '3:4' bundle2.hg |
|
167 | $ hg bundle -R repo --base 2 -r '3:4' bundle2.hg | |
168 | 2 changesets found |
|
168 | 2 changesets found | |
169 | $ cat > repo/.hg/bundle2maker << EOF |
|
169 | $ cat > repo/.hg/bundle2maker << EOF | |
170 | > remote-changegroup http://localhost:$HGPORT/bundle2.hg bundle2.hg |
|
170 | > remote-changegroup http://localhost:$HGPORT/bundle2.hg bundle2.hg | |
171 | > changegroup 0:4 5:7 |
|
171 | > changegroup 0:4 5:7 | |
172 | > EOF |
|
172 | > EOF | |
173 | $ hg clone orig clone -r 2 |
|
173 | $ hg clone orig clone -r 2 | |
174 | adding changesets |
|
174 | adding changesets | |
175 | adding manifests |
|
175 | adding manifests | |
176 | adding file changes |
|
176 | adding file changes | |
177 | added 3 changesets with 3 changes to 3 files |
|
177 | added 3 changesets with 3 changes to 3 files | |
178 | updating to branch default |
|
178 | updating to branch default | |
179 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
179 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
180 | $ hg pull -R clone ssh://user@dummy/repo |
|
180 | $ hg pull -R clone ssh://user@dummy/repo | |
181 | pulling from ssh://user@dummy/repo |
|
181 | pulling from ssh://user@dummy/repo | |
182 | searching for changes |
|
182 | searching for changes | |
183 | remote: remote-changegroup |
|
183 | remote: remote-changegroup | |
184 | adding changesets |
|
184 | adding changesets | |
185 | adding manifests |
|
185 | adding manifests | |
186 | adding file changes |
|
186 | adding file changes | |
187 | added 2 changesets with 2 changes to 2 files (+1 heads) |
|
187 | added 2 changesets with 2 changes to 2 files (+1 heads) | |
188 | remote: changegroup |
|
188 | remote: changegroup | |
189 | adding changesets |
|
189 | adding changesets | |
190 | adding manifests |
|
190 | adding manifests | |
191 | adding file changes |
|
191 | adding file changes | |
192 | added 3 changesets with 2 changes to 2 files (+1 heads) |
|
192 | added 3 changesets with 2 changes to 2 files (+1 heads) | |
193 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
193 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
194 | $ hg -R clone log -G |
|
194 | $ hg -R clone log -G | |
195 | o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H |
|
195 | o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H | |
196 | | |
|
196 | | | |
197 | | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G |
|
197 | | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G | |
198 | |/| |
|
198 | |/| | |
199 | o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
199 | o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
200 | | | |
|
200 | | | | |
201 | | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
201 | | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
202 | |/ |
|
202 | |/ | |
203 | | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D |
|
203 | | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D | |
204 | | | |
|
204 | | | | |
205 | | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C |
|
205 | | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C | |
206 | | | |
|
206 | | | | |
207 | | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B |
|
207 | | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B | |
208 | |/ |
|
208 | |/ | |
209 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
209 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
210 |
|
210 | |||
211 | $ rm -rf clone |
|
211 | $ rm -rf clone | |
212 |
|
212 | |||
213 | Test a pull with a changegroup followed by an remote-changegroup |
|
213 | Test a pull with a changegroup followed by an remote-changegroup | |
214 |
|
214 | |||
215 | $ hg bundle -R repo --base '0:4' -r '5:7' bundle3.hg |
|
215 | $ hg bundle -R repo --base '0:4' -r '5:7' bundle3.hg | |
216 | 3 changesets found |
|
216 | 3 changesets found | |
217 | $ cat > repo/.hg/bundle2maker << EOF |
|
217 | $ cat > repo/.hg/bundle2maker << EOF | |
218 | > changegroup 000000000000 :4 |
|
218 | > changegroup 000000000000 :4 | |
219 | > remote-changegroup http://localhost:$HGPORT/bundle3.hg bundle3.hg |
|
219 | > remote-changegroup http://localhost:$HGPORT/bundle3.hg bundle3.hg | |
220 | > EOF |
|
220 | > EOF | |
221 | $ hg clone orig clone -r 2 |
|
221 | $ hg clone orig clone -r 2 | |
222 | adding changesets |
|
222 | adding changesets | |
223 | adding manifests |
|
223 | adding manifests | |
224 | adding file changes |
|
224 | adding file changes | |
225 | added 3 changesets with 3 changes to 3 files |
|
225 | added 3 changesets with 3 changes to 3 files | |
226 | updating to branch default |
|
226 | updating to branch default | |
227 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
227 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
228 | $ hg pull -R clone ssh://user@dummy/repo |
|
228 | $ hg pull -R clone ssh://user@dummy/repo | |
229 | pulling from ssh://user@dummy/repo |
|
229 | pulling from ssh://user@dummy/repo | |
230 | searching for changes |
|
230 | searching for changes | |
231 | remote: changegroup |
|
231 | remote: changegroup | |
232 | adding changesets |
|
232 | adding changesets | |
233 | adding manifests |
|
233 | adding manifests | |
234 | adding file changes |
|
234 | adding file changes | |
235 | added 2 changesets with 2 changes to 2 files (+1 heads) |
|
235 | added 2 changesets with 2 changes to 2 files (+1 heads) | |
236 | remote: remote-changegroup |
|
236 | remote: remote-changegroup | |
237 | adding changesets |
|
237 | adding changesets | |
238 | adding manifests |
|
238 | adding manifests | |
239 | adding file changes |
|
239 | adding file changes | |
240 | added 3 changesets with 2 changes to 2 files (+1 heads) |
|
240 | added 3 changesets with 2 changes to 2 files (+1 heads) | |
241 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
241 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
242 | $ hg -R clone log -G |
|
242 | $ hg -R clone log -G | |
243 | o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H |
|
243 | o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H | |
244 | | |
|
244 | | | |
245 | | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G |
|
245 | | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G | |
246 | |/| |
|
246 | |/| | |
247 | o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
247 | o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
248 | | | |
|
248 | | | | |
249 | | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
249 | | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
250 | |/ |
|
250 | |/ | |
251 | | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D |
|
251 | | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D | |
252 | | | |
|
252 | | | | |
253 | | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C |
|
253 | | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C | |
254 | | | |
|
254 | | | | |
255 | | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B |
|
255 | | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B | |
256 | |/ |
|
256 | |/ | |
257 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
257 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
258 |
|
258 | |||
259 | $ rm -rf clone |
|
259 | $ rm -rf clone | |
260 |
|
260 | |||
261 | Test a pull with two remote-changegroups and a changegroup |
|
261 | Test a pull with two remote-changegroups and a changegroup | |
262 |
|
262 | |||
263 | $ hg bundle -R repo --base 2 -r '3:4' bundle4.hg |
|
263 | $ hg bundle -R repo --base 2 -r '3:4' bundle4.hg | |
264 | 2 changesets found |
|
264 | 2 changesets found | |
265 | $ hg bundle -R repo --base '3:4' -r '5:6' bundle5.hg |
|
265 | $ hg bundle -R repo --base '3:4' -r '5:6' bundle5.hg | |
266 | 2 changesets found |
|
266 | 2 changesets found | |
267 | $ cat > repo/.hg/bundle2maker << EOF |
|
267 | $ cat > repo/.hg/bundle2maker << EOF | |
268 | > remote-changegroup http://localhost:$HGPORT/bundle4.hg bundle4.hg |
|
268 | > remote-changegroup http://localhost:$HGPORT/bundle4.hg bundle4.hg | |
269 | > remote-changegroup http://localhost:$HGPORT/bundle5.hg bundle5.hg |
|
269 | > remote-changegroup http://localhost:$HGPORT/bundle5.hg bundle5.hg | |
270 | > changegroup 0:6 7 |
|
270 | > changegroup 0:6 7 | |
271 | > EOF |
|
271 | > EOF | |
272 | $ hg clone orig clone -r 2 |
|
272 | $ hg clone orig clone -r 2 | |
273 | adding changesets |
|
273 | adding changesets | |
274 | adding manifests |
|
274 | adding manifests | |
275 | adding file changes |
|
275 | adding file changes | |
276 | added 3 changesets with 3 changes to 3 files |
|
276 | added 3 changesets with 3 changes to 3 files | |
277 | updating to branch default |
|
277 | updating to branch default | |
278 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
278 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
279 | $ hg pull -R clone ssh://user@dummy/repo |
|
279 | $ hg pull -R clone ssh://user@dummy/repo | |
280 | pulling from ssh://user@dummy/repo |
|
280 | pulling from ssh://user@dummy/repo | |
281 | searching for changes |
|
281 | searching for changes | |
282 | remote: remote-changegroup |
|
282 | remote: remote-changegroup | |
283 | adding changesets |
|
283 | adding changesets | |
284 | adding manifests |
|
284 | adding manifests | |
285 | adding file changes |
|
285 | adding file changes | |
286 | added 2 changesets with 2 changes to 2 files (+1 heads) |
|
286 | added 2 changesets with 2 changes to 2 files (+1 heads) | |
287 | remote: remote-changegroup |
|
287 | remote: remote-changegroup | |
288 | adding changesets |
|
288 | adding changesets | |
289 | adding manifests |
|
289 | adding manifests | |
290 | adding file changes |
|
290 | adding file changes | |
291 | added 2 changesets with 1 changes to 1 files |
|
291 | added 2 changesets with 1 changes to 1 files | |
292 | remote: changegroup |
|
292 | remote: changegroup | |
293 | adding changesets |
|
293 | adding changesets | |
294 | adding manifests |
|
294 | adding manifests | |
295 | adding file changes |
|
295 | adding file changes | |
296 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
296 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
297 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
297 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
298 | $ hg -R clone log -G |
|
298 | $ hg -R clone log -G | |
299 | o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H |
|
299 | o 7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com> H | |
300 | | |
|
300 | | | |
301 | | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G |
|
301 | | o 6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G | |
302 | |/| |
|
302 | |/| | |
303 | o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
303 | o | 5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
304 | | | |
|
304 | | | | |
305 | | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
305 | | o 4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
306 | |/ |
|
306 | |/ | |
307 | | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D |
|
307 | | o 3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> D | |
308 | | | |
|
308 | | | | |
309 | | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C |
|
309 | | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C | |
310 | | | |
|
310 | | | | |
311 | | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B |
|
311 | | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B | |
312 | |/ |
|
312 | |/ | |
313 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
313 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
314 |
|
314 | |||
315 | $ rm -rf clone |
|
315 | $ rm -rf clone | |
316 |
|
316 | |||
317 | Hash digest tests |
|
317 | Hash digest tests | |
318 |
|
318 | |||
319 | $ hg bundle -R repo -a bundle6.hg |
|
319 | $ hg bundle -R repo -a bundle6.hg | |
320 | 8 changesets found |
|
320 | 8 changesets found | |
321 |
|
321 | |||
322 | $ cat > repo/.hg/bundle2maker << EOF |
|
322 | $ cat > repo/.hg/bundle2maker << EOF | |
323 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'sha1', 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'} |
|
323 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'sha1', 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'} | |
324 | > EOF |
|
324 | > EOF | |
325 | $ hg clone ssh://user@dummy/repo clone |
|
325 | $ hg clone ssh://user@dummy/repo clone | |
326 | requesting all changes |
|
326 | requesting all changes | |
327 | remote: remote-changegroup |
|
327 | remote: remote-changegroup | |
328 | adding changesets |
|
328 | adding changesets | |
329 | adding manifests |
|
329 | adding manifests | |
330 | adding file changes |
|
330 | adding file changes | |
331 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
331 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
332 | updating to branch default |
|
332 | updating to branch default | |
333 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
333 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
334 | $ rm -rf clone |
|
334 | $ rm -rf clone | |
335 |
|
335 | |||
336 | $ cat > repo/.hg/bundle2maker << EOF |
|
336 | $ cat > repo/.hg/bundle2maker << EOF | |
337 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394'} |
|
337 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394'} | |
338 | > EOF |
|
338 | > EOF | |
339 | $ hg clone ssh://user@dummy/repo clone |
|
339 | $ hg clone ssh://user@dummy/repo clone | |
340 | requesting all changes |
|
340 | requesting all changes | |
341 | remote: remote-changegroup |
|
341 | remote: remote-changegroup | |
342 | adding changesets |
|
342 | adding changesets | |
343 | adding manifests |
|
343 | adding manifests | |
344 | adding file changes |
|
344 | adding file changes | |
345 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
345 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
346 | updating to branch default |
|
346 | updating to branch default | |
347 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
347 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
348 | $ rm -rf clone |
|
348 | $ rm -rf clone | |
349 |
|
349 | |||
350 | Hash digest mismatch throws an error |
|
350 | Hash digest mismatch throws an error | |
351 |
|
351 | |||
352 | $ cat > repo/.hg/bundle2maker << EOF |
|
352 | $ cat > repo/.hg/bundle2maker << EOF | |
353 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'sha1', 'digest:sha1': '0' * 40} |
|
353 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'sha1', 'digest:sha1': '0' * 40} | |
354 | > EOF |
|
354 | > EOF | |
355 | $ hg clone ssh://user@dummy/repo clone |
|
355 | $ hg clone ssh://user@dummy/repo clone | |
356 | requesting all changes |
|
356 | requesting all changes | |
357 | remote: remote-changegroup |
|
357 | remote: remote-changegroup | |
358 | adding changesets |
|
358 | adding changesets | |
359 | adding manifests |
|
359 | adding manifests | |
360 | adding file changes |
|
360 | adding file changes | |
361 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
361 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
362 | transaction abort! |
|
362 | transaction abort! | |
363 | rollback completed |
|
363 | rollback completed | |
364 | abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted: |
|
364 | abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted: | |
365 | sha1 mismatch: expected 0000000000000000000000000000000000000000, got 2c880cfec23cff7d8f80c2f12958d1563cbdaba6 |
|
365 | sha1 mismatch: expected 0000000000000000000000000000000000000000, got 2c880cfec23cff7d8f80c2f12958d1563cbdaba6 | |
366 | [255] |
|
366 | [255] | |
367 |
|
367 | |||
368 | Multiple hash digests can be given |
|
368 | Multiple hash digests can be given | |
369 |
|
369 | |||
370 | $ cat > repo/.hg/bundle2maker << EOF |
|
370 | $ cat > repo/.hg/bundle2maker << EOF | |
371 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394', 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'} |
|
371 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394', 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'} | |
372 | > EOF |
|
372 | > EOF | |
373 | $ hg clone ssh://user@dummy/repo clone |
|
373 | $ hg clone ssh://user@dummy/repo clone | |
374 | requesting all changes |
|
374 | requesting all changes | |
375 | remote: remote-changegroup |
|
375 | remote: remote-changegroup | |
376 | adding changesets |
|
376 | adding changesets | |
377 | adding manifests |
|
377 | adding manifests | |
378 | adding file changes |
|
378 | adding file changes | |
379 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
379 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
380 | updating to branch default |
|
380 | updating to branch default | |
381 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
381 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
382 | $ rm -rf clone |
|
382 | $ rm -rf clone | |
383 |
|
383 | |||
384 | If either of the multiple hash digests mismatches, an error is thrown |
|
384 | If either of the multiple hash digests mismatches, an error is thrown | |
385 |
|
385 | |||
386 | $ cat > repo/.hg/bundle2maker << EOF |
|
386 | $ cat > repo/.hg/bundle2maker << EOF | |
387 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': '0' * 32, 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'} |
|
387 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': '0' * 32, 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'} | |
388 | > EOF |
|
388 | > EOF | |
389 | $ hg clone ssh://user@dummy/repo clone |
|
389 | $ hg clone ssh://user@dummy/repo clone | |
390 | requesting all changes |
|
390 | requesting all changes | |
391 | remote: remote-changegroup |
|
391 | remote: remote-changegroup | |
392 | adding changesets |
|
392 | adding changesets | |
393 | adding manifests |
|
393 | adding manifests | |
394 | adding file changes |
|
394 | adding file changes | |
395 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
395 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
396 | transaction abort! |
|
396 | transaction abort! | |
397 | rollback completed |
|
397 | rollback completed | |
398 | abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted: |
|
398 | abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted: | |
399 | md5 mismatch: expected 00000000000000000000000000000000, got e22172c2907ef88794b7bea6642c2394 |
|
399 | md5 mismatch: expected 00000000000000000000000000000000, got e22172c2907ef88794b7bea6642c2394 | |
400 | [255] |
|
400 | [255] | |
401 |
|
401 | |||
402 | $ cat > repo/.hg/bundle2maker << EOF |
|
402 | $ cat > repo/.hg/bundle2maker << EOF | |
403 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394', 'digest:sha1': '0' * 40} |
|
403 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394', 'digest:sha1': '0' * 40} | |
404 | > EOF |
|
404 | > EOF | |
405 | $ hg clone ssh://user@dummy/repo clone |
|
405 | $ hg clone ssh://user@dummy/repo clone | |
406 | requesting all changes |
|
406 | requesting all changes | |
407 | remote: remote-changegroup |
|
407 | remote: remote-changegroup | |
408 | adding changesets |
|
408 | adding changesets | |
409 | adding manifests |
|
409 | adding manifests | |
410 | adding file changes |
|
410 | adding file changes | |
411 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
411 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
412 | transaction abort! |
|
412 | transaction abort! | |
413 | rollback completed |
|
413 | rollback completed | |
414 | abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted: |
|
414 | abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted: | |
415 | sha1 mismatch: expected 0000000000000000000000000000000000000000, got 2c880cfec23cff7d8f80c2f12958d1563cbdaba6 |
|
415 | sha1 mismatch: expected 0000000000000000000000000000000000000000, got 2c880cfec23cff7d8f80c2f12958d1563cbdaba6 | |
416 | [255] |
|
416 | [255] | |
417 |
|
417 | |||
418 | Corruption tests |
|
418 | Corruption tests | |
419 |
|
419 | |||
420 | $ hg clone orig clone -r 2 |
|
420 | $ hg clone orig clone -r 2 | |
421 | adding changesets |
|
421 | adding changesets | |
422 | adding manifests |
|
422 | adding manifests | |
423 | adding file changes |
|
423 | adding file changes | |
424 | added 3 changesets with 3 changes to 3 files |
|
424 | added 3 changesets with 3 changes to 3 files | |
425 | updating to branch default |
|
425 | updating to branch default | |
426 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
426 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
427 |
|
427 | |||
428 | $ cat > repo/.hg/bundle2maker << EOF |
|
428 | $ cat > repo/.hg/bundle2maker << EOF | |
429 | > remote-changegroup http://localhost:$HGPORT/bundle4.hg bundle4.hg |
|
429 | > remote-changegroup http://localhost:$HGPORT/bundle4.hg bundle4.hg | |
430 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle5.hg', 'size': 578, 'digests': 'sha1', 'digest:sha1': '0' * 40} |
|
430 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle5.hg', 'size': 578, 'digests': 'sha1', 'digest:sha1': '0' * 40} | |
431 | > changegroup 0:6 7 |
|
431 | > changegroup 0:6 7 | |
432 | > EOF |
|
432 | > EOF | |
433 | $ hg pull -R clone ssh://user@dummy/repo |
|
433 | $ hg pull -R clone ssh://user@dummy/repo | |
434 | pulling from ssh://user@dummy/repo |
|
434 | pulling from ssh://user@dummy/repo | |
435 | searching for changes |
|
435 | searching for changes | |
436 | remote: remote-changegroup |
|
436 | remote: remote-changegroup | |
437 | adding changesets |
|
437 | adding changesets | |
438 | adding manifests |
|
438 | adding manifests | |
439 | adding file changes |
|
439 | adding file changes | |
440 | added 2 changesets with 2 changes to 2 files (+1 heads) |
|
440 | added 2 changesets with 2 changes to 2 files (+1 heads) | |
441 | remote: remote-changegroup |
|
441 | remote: remote-changegroup | |
442 | adding changesets |
|
442 | adding changesets | |
443 | adding manifests |
|
443 | adding manifests | |
444 | adding file changes |
|
444 | adding file changes | |
445 | added 2 changesets with 1 changes to 1 files |
|
445 | added 2 changesets with 1 changes to 1 files | |
446 | transaction abort! |
|
446 | transaction abort! | |
447 | rollback completed |
|
447 | rollback completed | |
448 | abort: bundle at http://localhost:$HGPORT/bundle5.hg is corrupted: |
|
448 | abort: bundle at http://localhost:$HGPORT/bundle5.hg is corrupted: | |
449 | sha1 mismatch: expected 0000000000000000000000000000000000000000, got f29485d6bfd37db99983cfc95ecb52f8ca396106 |
|
449 | sha1 mismatch: expected 0000000000000000000000000000000000000000, got f29485d6bfd37db99983cfc95ecb52f8ca396106 | |
450 | [255] |
|
450 | [255] | |
451 |
|
451 | |||
452 | The entire transaction has been rolled back in the pull above |
|
452 | The entire transaction has been rolled back in the pull above | |
453 |
|
453 | |||
454 | $ hg -R clone log -G |
|
454 | $ hg -R clone log -G | |
455 | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C |
|
455 | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C | |
456 | | |
|
456 | | | |
457 | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B |
|
457 | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B | |
458 | | |
|
458 | | | |
459 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
459 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
460 |
|
460 | |||
461 |
|
461 | |||
462 | No params |
|
462 | No params | |
463 |
|
463 | |||
464 | $ cat > repo/.hg/bundle2maker << EOF |
|
464 | $ cat > repo/.hg/bundle2maker << EOF | |
465 | > raw-remote-changegroup {} |
|
465 | > raw-remote-changegroup {} | |
466 | > EOF |
|
466 | > EOF | |
467 | $ hg pull -R clone ssh://user@dummy/repo |
|
467 | $ hg pull -R clone ssh://user@dummy/repo | |
468 | pulling from ssh://user@dummy/repo |
|
468 | pulling from ssh://user@dummy/repo | |
469 | searching for changes |
|
469 | searching for changes | |
470 | remote: remote-changegroup |
|
470 | remote: remote-changegroup | |
471 | abort: remote-changegroup: missing "url" param |
|
471 | abort: remote-changegroup: missing "url" param | |
472 | [255] |
|
472 | [255] | |
473 |
|
473 | |||
474 | Missing size |
|
474 | Missing size | |
475 |
|
475 | |||
476 | $ cat > repo/.hg/bundle2maker << EOF |
|
476 | $ cat > repo/.hg/bundle2maker << EOF | |
477 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg'} |
|
477 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg'} | |
478 | > EOF |
|
478 | > EOF | |
479 | $ hg pull -R clone ssh://user@dummy/repo |
|
479 | $ hg pull -R clone ssh://user@dummy/repo | |
480 | pulling from ssh://user@dummy/repo |
|
480 | pulling from ssh://user@dummy/repo | |
481 | searching for changes |
|
481 | searching for changes | |
482 | remote: remote-changegroup |
|
482 | remote: remote-changegroup | |
483 | abort: remote-changegroup: missing "size" param |
|
483 | abort: remote-changegroup: missing "size" param | |
484 | [255] |
|
484 | [255] | |
485 |
|
485 | |||
486 | Invalid size |
|
486 | Invalid size | |
487 |
|
487 | |||
488 | $ cat > repo/.hg/bundle2maker << EOF |
|
488 | $ cat > repo/.hg/bundle2maker << EOF | |
489 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 'foo'} |
|
489 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 'foo'} | |
490 | > EOF |
|
490 | > EOF | |
491 | $ hg pull -R clone ssh://user@dummy/repo |
|
491 | $ hg pull -R clone ssh://user@dummy/repo | |
492 | pulling from ssh://user@dummy/repo |
|
492 | pulling from ssh://user@dummy/repo | |
493 | searching for changes |
|
493 | searching for changes | |
494 | remote: remote-changegroup |
|
494 | remote: remote-changegroup | |
495 | abort: remote-changegroup: invalid value for param "size" |
|
495 | abort: remote-changegroup: invalid value for param "size" | |
496 | [255] |
|
496 | [255] | |
497 |
|
497 | |||
498 | Size mismatch |
|
498 | Size mismatch | |
499 |
|
499 | |||
500 | $ cat > repo/.hg/bundle2maker << EOF |
|
500 | $ cat > repo/.hg/bundle2maker << EOF | |
501 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 42} |
|
501 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 42} | |
502 | > EOF |
|
502 | > EOF | |
503 | $ hg pull -R clone ssh://user@dummy/repo |
|
503 | $ hg pull -R clone ssh://user@dummy/repo | |
504 | pulling from ssh://user@dummy/repo |
|
504 | pulling from ssh://user@dummy/repo | |
505 | searching for changes |
|
505 | searching for changes | |
506 | remote: remote-changegroup |
|
506 | remote: remote-changegroup | |
507 | adding changesets |
|
507 | adding changesets | |
508 | adding manifests |
|
508 | adding manifests | |
509 | adding file changes |
|
509 | adding file changes | |
510 | added 2 changesets with 2 changes to 2 files (+1 heads) |
|
510 | added 2 changesets with 2 changes to 2 files (+1 heads) | |
511 | transaction abort! |
|
511 | transaction abort! | |
512 | rollback completed |
|
512 | rollback completed | |
513 | abort: bundle at http://localhost:$HGPORT/bundle4.hg is corrupted: |
|
513 | abort: bundle at http://localhost:$HGPORT/bundle4.hg is corrupted: | |
514 | size mismatch: expected 42, got 581 |
|
514 | size mismatch: expected 42, got 581 | |
515 | [255] |
|
515 | [255] | |
516 |
|
516 | |||
517 | Unknown digest |
|
517 | Unknown digest | |
518 |
|
518 | |||
519 | $ cat > repo/.hg/bundle2maker << EOF |
|
519 | $ cat > repo/.hg/bundle2maker << EOF | |
520 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 581, 'digests': 'foo', 'digest:foo': 'bar'} |
|
520 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 581, 'digests': 'foo', 'digest:foo': 'bar'} | |
521 | > EOF |
|
521 | > EOF | |
522 | $ hg pull -R clone ssh://user@dummy/repo |
|
522 | $ hg pull -R clone ssh://user@dummy/repo | |
523 | pulling from ssh://user@dummy/repo |
|
523 | pulling from ssh://user@dummy/repo | |
524 | searching for changes |
|
524 | searching for changes | |
525 | remote: remote-changegroup |
|
525 | remote: remote-changegroup | |
526 | abort: missing support for remote-changegroup - digest:foo |
|
526 | abort: missing support for remote-changegroup - digest:foo | |
527 | [255] |
|
527 | [255] | |
528 |
|
528 | |||
529 | Missing digest |
|
529 | Missing digest | |
530 |
|
530 | |||
531 | $ cat > repo/.hg/bundle2maker << EOF |
|
531 | $ cat > repo/.hg/bundle2maker << EOF | |
532 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 581, 'digests': 'sha1'} |
|
532 | > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 581, 'digests': 'sha1'} | |
533 | > EOF |
|
533 | > EOF | |
534 | $ hg pull -R clone ssh://user@dummy/repo |
|
534 | $ hg pull -R clone ssh://user@dummy/repo | |
535 | pulling from ssh://user@dummy/repo |
|
535 | pulling from ssh://user@dummy/repo | |
536 | searching for changes |
|
536 | searching for changes | |
537 | remote: remote-changegroup |
|
537 | remote: remote-changegroup | |
538 | abort: remote-changegroup: missing "digest:sha1" param |
|
538 | abort: remote-changegroup: missing "digest:sha1" param | |
539 | [255] |
|
539 | [255] | |
540 |
|
540 | |||
541 | Not an HTTP url |
|
541 | Not an HTTP url | |
542 |
|
542 | |||
543 | $ cat > repo/.hg/bundle2maker << EOF |
|
543 | $ cat > repo/.hg/bundle2maker << EOF | |
544 | > raw-remote-changegroup {'url': 'ssh://localhost:$HGPORT/bundle4.hg', 'size': 581} |
|
544 | > raw-remote-changegroup {'url': 'ssh://localhost:$HGPORT/bundle4.hg', 'size': 581} | |
545 | > EOF |
|
545 | > EOF | |
546 | $ hg pull -R clone ssh://user@dummy/repo |
|
546 | $ hg pull -R clone ssh://user@dummy/repo | |
547 | pulling from ssh://user@dummy/repo |
|
547 | pulling from ssh://user@dummy/repo | |
548 | searching for changes |
|
548 | searching for changes | |
549 | remote: remote-changegroup |
|
549 | remote: remote-changegroup | |
550 | abort: remote-changegroup does not support ssh urls |
|
550 | abort: remote-changegroup does not support ssh urls | |
551 | [255] |
|
551 | [255] | |
552 |
|
552 | |||
553 | Not a bundle |
|
553 | Not a bundle | |
554 |
|
554 | |||
555 | $ cat > notbundle.hg << EOF |
|
555 | $ cat > notbundle.hg << EOF | |
556 | > foo |
|
556 | > foo | |
557 | > EOF |
|
557 | > EOF | |
558 | $ cat > repo/.hg/bundle2maker << EOF |
|
558 | $ cat > repo/.hg/bundle2maker << EOF | |
559 | > remote-changegroup http://localhost:$HGPORT/notbundle.hg notbundle.hg |
|
559 | > remote-changegroup http://localhost:$HGPORT/notbundle.hg notbundle.hg | |
560 | > EOF |
|
560 | > EOF | |
561 | $ hg pull -R clone ssh://user@dummy/repo |
|
561 | $ hg pull -R clone ssh://user@dummy/repo | |
562 | pulling from ssh://user@dummy/repo |
|
562 | pulling from ssh://user@dummy/repo | |
563 | searching for changes |
|
563 | searching for changes | |
564 | remote: remote-changegroup |
|
564 | remote: remote-changegroup | |
565 | abort: http://localhost:$HGPORT/notbundle.hg: not a Mercurial bundle |
|
565 | abort: http://localhost:$HGPORT/notbundle.hg: not a Mercurial bundle | |
566 | [255] |
|
566 | [255] | |
567 |
|
567 | |||
568 | Not a bundle 1.0 |
|
568 | Not a bundle 1.0 | |
569 |
|
569 | |||
570 | $ cat > notbundle10.hg << EOF |
|
570 | $ cat > notbundle10.hg << EOF | |
571 | > HG20 |
|
571 | > HG20 | |
572 | > EOF |
|
572 | > EOF | |
573 | $ cat > repo/.hg/bundle2maker << EOF |
|
573 | $ cat > repo/.hg/bundle2maker << EOF | |
574 | > remote-changegroup http://localhost:$HGPORT/notbundle10.hg notbundle10.hg |
|
574 | > remote-changegroup http://localhost:$HGPORT/notbundle10.hg notbundle10.hg | |
575 | > EOF |
|
575 | > EOF | |
576 | $ hg pull -R clone ssh://user@dummy/repo |
|
576 | $ hg pull -R clone ssh://user@dummy/repo | |
577 | pulling from ssh://user@dummy/repo |
|
577 | pulling from ssh://user@dummy/repo | |
578 | searching for changes |
|
578 | searching for changes | |
579 | remote: remote-changegroup |
|
579 | remote: remote-changegroup | |
580 | abort: http://localhost:$HGPORT/notbundle10.hg: not a bundle version 1.0 |
|
580 | abort: http://localhost:$HGPORT/notbundle10.hg: not a bundle version 1.0 | |
581 | [255] |
|
581 | [255] | |
582 |
|
582 | |||
583 | $ hg -R clone log -G |
|
583 | $ hg -R clone log -G | |
584 | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C |
|
584 | @ 2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C | |
585 | | |
|
585 | | | |
586 | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B |
|
586 | o 1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B | |
587 | | |
|
587 | | | |
588 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
588 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
589 |
|
589 | |||
590 | $ rm -rf clone |
|
590 | $ rm -rf clone | |
591 |
|
591 | |||
592 | $ killdaemons.py |
|
592 | $ killdaemons.py |
@@ -1,235 +1,235 b'' | |||||
1 | This test tries to exercise the ssh functionality with a dummy script |
|
1 | This test tries to exercise the ssh functionality with a dummy script | |
2 |
|
2 | |||
3 | $ checknewrepo() |
|
3 | $ checknewrepo() | |
4 | > { |
|
4 | > { | |
5 | > name=$1 |
|
5 | > name=$1 | |
6 | > if [ -d "$name"/.hg/store ]; then |
|
6 | > if [ -d "$name"/.hg/store ]; then | |
7 | > echo store created |
|
7 | > echo store created | |
8 | > fi |
|
8 | > fi | |
9 | > if [ -f "$name"/.hg/00changelog.i ]; then |
|
9 | > if [ -f "$name"/.hg/00changelog.i ]; then | |
10 | > echo 00changelog.i created |
|
10 | > echo 00changelog.i created | |
11 | > fi |
|
11 | > fi | |
12 | > cat "$name"/.hg/requires |
|
12 | > cat "$name"/.hg/requires | |
13 | > } |
|
13 | > } | |
14 |
|
14 | |||
15 | creating 'local' |
|
15 | creating 'local' | |
16 |
|
16 | |||
17 | $ hg init local |
|
17 | $ hg init local | |
18 | $ checknewrepo local |
|
18 | $ checknewrepo local | |
19 | store created |
|
19 | store created | |
20 | 00changelog.i created |
|
20 | 00changelog.i created | |
21 | dotencode |
|
21 | dotencode | |
22 | fncache |
|
22 | fncache | |
23 | revlogv1 |
|
23 | revlogv1 | |
24 | store |
|
24 | store | |
25 | $ echo this > local/foo |
|
25 | $ echo this > local/foo | |
26 | $ hg ci --cwd local -A -m "init" |
|
26 | $ hg ci --cwd local -A -m "init" | |
27 | adding foo |
|
27 | adding foo | |
28 |
|
28 | |||
29 | test custom revlog chunk cache sizes |
|
29 | test custom revlog chunk cache sizes | |
30 |
|
30 | |||
31 | $ hg --config format.chunkcachesize=0 log -R local -pv |
|
31 | $ hg --config format.chunkcachesize=0 log -R local -pv | |
32 | abort: revlog chunk cache size 0 is not greater than 0! |
|
32 | abort: revlog chunk cache size 0 is not greater than 0! | |
33 | [255] |
|
33 | [255] | |
34 | $ hg --config format.chunkcachesize=1023 log -R local -pv |
|
34 | $ hg --config format.chunkcachesize=1023 log -R local -pv | |
35 | abort: revlog chunk cache size 1023 is not a power of 2! |
|
35 | abort: revlog chunk cache size 1023 is not a power of 2! | |
36 | [255] |
|
36 | [255] | |
37 | $ hg --config format.chunkcachesize=1024 log -R local -pv |
|
37 | $ hg --config format.chunkcachesize=1024 log -R local -pv | |
38 | changeset: 0:08b9e9f63b32 |
|
38 | changeset: 0:08b9e9f63b32 | |
39 | tag: tip |
|
39 | tag: tip | |
40 | user: test |
|
40 | user: test | |
41 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
41 | date: Thu Jan 01 00:00:00 1970 +0000 | |
42 | files: foo |
|
42 | files: foo | |
43 | description: |
|
43 | description: | |
44 | init |
|
44 | init | |
45 |
|
45 | |||
46 |
|
46 | |||
47 | diff -r 000000000000 -r 08b9e9f63b32 foo |
|
47 | diff -r 000000000000 -r 08b9e9f63b32 foo | |
48 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
48 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
49 | +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
49 | +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
50 | @@ -0,0 +1,1 @@ |
|
50 | @@ -0,0 +1,1 @@ | |
51 | +this |
|
51 | +this | |
52 |
|
52 | |||
53 |
|
53 | |||
54 | creating repo with format.usestore=false |
|
54 | creating repo with format.usestore=false | |
55 |
|
55 | |||
56 | $ hg --config format.usestore=false init old |
|
56 | $ hg --config format.usestore=false init old | |
57 | $ checknewrepo old |
|
57 | $ checknewrepo old | |
58 | revlogv1 |
|
58 | revlogv1 | |
59 |
|
59 | |||
60 | creating repo with format.usefncache=false |
|
60 | creating repo with format.usefncache=false | |
61 |
|
61 | |||
62 | $ hg --config format.usefncache=false init old2 |
|
62 | $ hg --config format.usefncache=false init old2 | |
63 | $ checknewrepo old2 |
|
63 | $ checknewrepo old2 | |
64 | store created |
|
64 | store created | |
65 | 00changelog.i created |
|
65 | 00changelog.i created | |
66 | revlogv1 |
|
66 | revlogv1 | |
67 | store |
|
67 | store | |
68 |
|
68 | |||
69 | creating repo with format.dotencode=false |
|
69 | creating repo with format.dotencode=false | |
70 |
|
70 | |||
71 | $ hg --config format.dotencode=false init old3 |
|
71 | $ hg --config format.dotencode=false init old3 | |
72 | $ checknewrepo old3 |
|
72 | $ checknewrepo old3 | |
73 | store created |
|
73 | store created | |
74 | 00changelog.i created |
|
74 | 00changelog.i created | |
75 | fncache |
|
75 | fncache | |
76 | revlogv1 |
|
76 | revlogv1 | |
77 | store |
|
77 | store | |
78 |
|
78 | |||
79 | test failure |
|
79 | test failure | |
80 |
|
80 | |||
81 | $ hg init local |
|
81 | $ hg init local | |
82 | abort: repository local already exists! |
|
82 | abort: repository local already exists! | |
83 | [255] |
|
83 | [255] | |
84 |
|
84 | |||
85 | init+push to remote2 |
|
85 | init+push to remote2 | |
86 |
|
86 | |||
87 |
$ hg init -e |
|
87 | $ hg init -e dummyssh ssh://user@dummy/remote2 | |
88 | $ hg incoming -R remote2 local |
|
88 | $ hg incoming -R remote2 local | |
89 | comparing with local |
|
89 | comparing with local | |
90 | changeset: 0:08b9e9f63b32 |
|
90 | changeset: 0:08b9e9f63b32 | |
91 | tag: tip |
|
91 | tag: tip | |
92 | user: test |
|
92 | user: test | |
93 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
93 | date: Thu Jan 01 00:00:00 1970 +0000 | |
94 | summary: init |
|
94 | summary: init | |
95 |
|
95 | |||
96 |
|
96 | |||
97 |
$ hg push -R local -e |
|
97 | $ hg push -R local -e dummyssh ssh://user@dummy/remote2 | |
98 | pushing to ssh://user@dummy/remote2 |
|
98 | pushing to ssh://user@dummy/remote2 | |
99 | searching for changes |
|
99 | searching for changes | |
100 | remote: adding changesets |
|
100 | remote: adding changesets | |
101 | remote: adding manifests |
|
101 | remote: adding manifests | |
102 | remote: adding file changes |
|
102 | remote: adding file changes | |
103 | remote: added 1 changesets with 1 changes to 1 files |
|
103 | remote: added 1 changesets with 1 changes to 1 files | |
104 |
|
104 | |||
105 | clone to remote1 |
|
105 | clone to remote1 | |
106 |
|
106 | |||
107 |
$ hg clone -e |
|
107 | $ hg clone -e dummyssh local ssh://user@dummy/remote1 | |
108 | searching for changes |
|
108 | searching for changes | |
109 | remote: adding changesets |
|
109 | remote: adding changesets | |
110 | remote: adding manifests |
|
110 | remote: adding manifests | |
111 | remote: adding file changes |
|
111 | remote: adding file changes | |
112 | remote: added 1 changesets with 1 changes to 1 files |
|
112 | remote: added 1 changesets with 1 changes to 1 files | |
113 |
|
113 | |||
114 | The largefiles extension doesn't crash |
|
114 | The largefiles extension doesn't crash | |
115 |
$ hg clone -e |
|
115 | $ hg clone -e dummyssh local ssh://user@dummy/remotelf --config extensions.largefiles= | |
116 | searching for changes |
|
116 | searching for changes | |
117 | remote: adding changesets |
|
117 | remote: adding changesets | |
118 | remote: adding manifests |
|
118 | remote: adding manifests | |
119 | remote: adding file changes |
|
119 | remote: adding file changes | |
120 | remote: added 1 changesets with 1 changes to 1 files |
|
120 | remote: added 1 changesets with 1 changes to 1 files | |
121 |
|
121 | |||
122 | init to existing repo |
|
122 | init to existing repo | |
123 |
|
123 | |||
124 |
$ hg init -e |
|
124 | $ hg init -e dummyssh ssh://user@dummy/remote1 | |
125 | abort: repository remote1 already exists! |
|
125 | abort: repository remote1 already exists! | |
126 | abort: could not create remote repo! |
|
126 | abort: could not create remote repo! | |
127 | [255] |
|
127 | [255] | |
128 |
|
128 | |||
129 | clone to existing repo |
|
129 | clone to existing repo | |
130 |
|
130 | |||
131 |
$ hg clone -e |
|
131 | $ hg clone -e dummyssh local ssh://user@dummy/remote1 | |
132 | abort: repository remote1 already exists! |
|
132 | abort: repository remote1 already exists! | |
133 | abort: could not create remote repo! |
|
133 | abort: could not create remote repo! | |
134 | [255] |
|
134 | [255] | |
135 |
|
135 | |||
136 | output of dummyssh |
|
136 | output of dummyssh | |
137 |
|
137 | |||
138 | $ cat dummylog |
|
138 | $ cat dummylog | |
139 | Got arguments 1:user@dummy 2:hg init remote2 |
|
139 | Got arguments 1:user@dummy 2:hg init remote2 | |
140 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio |
|
140 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio | |
141 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio |
|
141 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio | |
142 | Got arguments 1:user@dummy 2:hg init remote1 |
|
142 | Got arguments 1:user@dummy 2:hg init remote1 | |
143 | Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio |
|
143 | Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio | |
144 | Got arguments 1:user@dummy 2:hg init remotelf |
|
144 | Got arguments 1:user@dummy 2:hg init remotelf | |
145 | Got arguments 1:user@dummy 2:hg -R remotelf serve --stdio |
|
145 | Got arguments 1:user@dummy 2:hg -R remotelf serve --stdio | |
146 | Got arguments 1:user@dummy 2:hg init remote1 |
|
146 | Got arguments 1:user@dummy 2:hg init remote1 | |
147 | Got arguments 1:user@dummy 2:hg init remote1 |
|
147 | Got arguments 1:user@dummy 2:hg init remote1 | |
148 |
|
148 | |||
149 | comparing repositories |
|
149 | comparing repositories | |
150 |
|
150 | |||
151 | $ hg tip -q -R local |
|
151 | $ hg tip -q -R local | |
152 | 0:08b9e9f63b32 |
|
152 | 0:08b9e9f63b32 | |
153 | $ hg tip -q -R remote1 |
|
153 | $ hg tip -q -R remote1 | |
154 | 0:08b9e9f63b32 |
|
154 | 0:08b9e9f63b32 | |
155 | $ hg tip -q -R remote2 |
|
155 | $ hg tip -q -R remote2 | |
156 | 0:08b9e9f63b32 |
|
156 | 0:08b9e9f63b32 | |
157 |
|
157 | |||
158 | check names for repositories (clashes with URL schemes, special chars) |
|
158 | check names for repositories (clashes with URL schemes, special chars) | |
159 |
|
159 | |||
160 | $ for i in bundle file hg http https old-http ssh static-http "with space"; do |
|
160 | $ for i in bundle file hg http https old-http ssh static-http "with space"; do | |
161 | > printf "hg init \"$i\"... " |
|
161 | > printf "hg init \"$i\"... " | |
162 | > hg init "$i" |
|
162 | > hg init "$i" | |
163 | > test -d "$i" -a -d "$i/.hg" && echo "ok" || echo "failed" |
|
163 | > test -d "$i" -a -d "$i/.hg" && echo "ok" || echo "failed" | |
164 | > done |
|
164 | > done | |
165 | hg init "bundle"... ok |
|
165 | hg init "bundle"... ok | |
166 | hg init "file"... ok |
|
166 | hg init "file"... ok | |
167 | hg init "hg"... ok |
|
167 | hg init "hg"... ok | |
168 | hg init "http"... ok |
|
168 | hg init "http"... ok | |
169 | hg init "https"... ok |
|
169 | hg init "https"... ok | |
170 | hg init "old-http"... ok |
|
170 | hg init "old-http"... ok | |
171 | hg init "ssh"... ok |
|
171 | hg init "ssh"... ok | |
172 | hg init "static-http"... ok |
|
172 | hg init "static-http"... ok | |
173 | hg init "with space"... ok |
|
173 | hg init "with space"... ok | |
174 | #if eol-in-paths |
|
174 | #if eol-in-paths | |
175 | /* " " is not a valid name for a directory on Windows */ |
|
175 | /* " " is not a valid name for a directory on Windows */ | |
176 | $ hg init " " |
|
176 | $ hg init " " | |
177 | $ test -d " " |
|
177 | $ test -d " " | |
178 | $ test -d " /.hg" |
|
178 | $ test -d " /.hg" | |
179 | #endif |
|
179 | #endif | |
180 |
|
180 | |||
181 | creating 'local/sub/repo' |
|
181 | creating 'local/sub/repo' | |
182 |
|
182 | |||
183 | $ hg init local/sub/repo |
|
183 | $ hg init local/sub/repo | |
184 | $ checknewrepo local/sub/repo |
|
184 | $ checknewrepo local/sub/repo | |
185 | store created |
|
185 | store created | |
186 | 00changelog.i created |
|
186 | 00changelog.i created | |
187 | dotencode |
|
187 | dotencode | |
188 | fncache |
|
188 | fncache | |
189 | revlogv1 |
|
189 | revlogv1 | |
190 | store |
|
190 | store | |
191 |
|
191 | |||
192 | prepare test of init of url configured from paths |
|
192 | prepare test of init of url configured from paths | |
193 |
|
193 | |||
194 | $ echo '[paths]' >> $HGRCPATH |
|
194 | $ echo '[paths]' >> $HGRCPATH | |
195 | $ echo "somewhere = `pwd`/url from paths" >> $HGRCPATH |
|
195 | $ echo "somewhere = `pwd`/url from paths" >> $HGRCPATH | |
196 | $ echo "elsewhere = `pwd`/another paths url" >> $HGRCPATH |
|
196 | $ echo "elsewhere = `pwd`/another paths url" >> $HGRCPATH | |
197 |
|
197 | |||
198 | init should (for consistency with clone) expand the url |
|
198 | init should (for consistency with clone) expand the url | |
199 |
|
199 | |||
200 | $ hg init somewhere |
|
200 | $ hg init somewhere | |
201 | $ checknewrepo "url from paths" |
|
201 | $ checknewrepo "url from paths" | |
202 | store created |
|
202 | store created | |
203 | 00changelog.i created |
|
203 | 00changelog.i created | |
204 | dotencode |
|
204 | dotencode | |
205 | fncache |
|
205 | fncache | |
206 | revlogv1 |
|
206 | revlogv1 | |
207 | store |
|
207 | store | |
208 |
|
208 | |||
209 | verify that clone also expand urls |
|
209 | verify that clone also expand urls | |
210 |
|
210 | |||
211 | $ hg clone somewhere elsewhere |
|
211 | $ hg clone somewhere elsewhere | |
212 | updating to branch default |
|
212 | updating to branch default | |
213 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
213 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
214 | $ checknewrepo "another paths url" |
|
214 | $ checknewrepo "another paths url" | |
215 | store created |
|
215 | store created | |
216 | 00changelog.i created |
|
216 | 00changelog.i created | |
217 | dotencode |
|
217 | dotencode | |
218 | fncache |
|
218 | fncache | |
219 | revlogv1 |
|
219 | revlogv1 | |
220 | store |
|
220 | store | |
221 |
|
221 | |||
222 | clone bookmarks |
|
222 | clone bookmarks | |
223 |
|
223 | |||
224 | $ hg -R local bookmark test |
|
224 | $ hg -R local bookmark test | |
225 | $ hg -R local bookmarks |
|
225 | $ hg -R local bookmarks | |
226 | * test 0:08b9e9f63b32 |
|
226 | * test 0:08b9e9f63b32 | |
227 |
$ hg clone -e |
|
227 | $ hg clone -e dummyssh local ssh://user@dummy/remote-bookmarks | |
228 | searching for changes |
|
228 | searching for changes | |
229 | remote: adding changesets |
|
229 | remote: adding changesets | |
230 | remote: adding manifests |
|
230 | remote: adding manifests | |
231 | remote: adding file changes |
|
231 | remote: adding file changes | |
232 | remote: added 1 changesets with 1 changes to 1 files |
|
232 | remote: added 1 changesets with 1 changes to 1 files | |
233 | exporting bookmark test |
|
233 | exporting bookmark test | |
234 | $ hg -R remote-bookmarks bookmarks |
|
234 | $ hg -R remote-bookmarks bookmarks | |
235 | test 0:08b9e9f63b32 |
|
235 | test 0:08b9e9f63b32 |
@@ -1,296 +1,296 b'' | |||||
1 | This file contains testcases that tend to be related to the wire protocol part |
|
1 | This file contains testcases that tend to be related to the wire protocol part | |
2 | of largefiles. |
|
2 | of largefiles. | |
3 |
|
3 | |||
4 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE |
|
4 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE | |
5 | $ mkdir "${USERCACHE}" |
|
5 | $ mkdir "${USERCACHE}" | |
6 | $ cat >> $HGRCPATH <<EOF |
|
6 | $ cat >> $HGRCPATH <<EOF | |
7 | > [extensions] |
|
7 | > [extensions] | |
8 | > largefiles= |
|
8 | > largefiles= | |
9 | > purge= |
|
9 | > purge= | |
10 | > rebase= |
|
10 | > rebase= | |
11 | > transplant= |
|
11 | > transplant= | |
12 | > [phases] |
|
12 | > [phases] | |
13 | > publish=False |
|
13 | > publish=False | |
14 | > [largefiles] |
|
14 | > [largefiles] | |
15 | > minsize=2 |
|
15 | > minsize=2 | |
16 | > patterns=glob:**.dat |
|
16 | > patterns=glob:**.dat | |
17 | > usercache=${USERCACHE} |
|
17 | > usercache=${USERCACHE} | |
18 | > [hooks] |
|
18 | > [hooks] | |
19 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" |
|
19 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" | |
20 | > EOF |
|
20 | > EOF | |
21 |
|
21 | |||
22 |
|
22 | |||
23 | #if serve |
|
23 | #if serve | |
24 | vanilla clients not locked out from largefiles servers on vanilla repos |
|
24 | vanilla clients not locked out from largefiles servers on vanilla repos | |
25 | $ mkdir r1 |
|
25 | $ mkdir r1 | |
26 | $ cd r1 |
|
26 | $ cd r1 | |
27 | $ hg init |
|
27 | $ hg init | |
28 | $ echo c1 > f1 |
|
28 | $ echo c1 > f1 | |
29 | $ hg add f1 |
|
29 | $ hg add f1 | |
30 | $ hg commit -m "m1" |
|
30 | $ hg commit -m "m1" | |
31 | Invoking status precommit hook |
|
31 | Invoking status precommit hook | |
32 | A f1 |
|
32 | A f1 | |
33 | $ cd .. |
|
33 | $ cd .. | |
34 | $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid |
|
34 | $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid | |
35 | $ cat hg.pid >> $DAEMON_PIDS |
|
35 | $ cat hg.pid >> $DAEMON_PIDS | |
36 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2 |
|
36 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2 | |
37 | requesting all changes |
|
37 | requesting all changes | |
38 | adding changesets |
|
38 | adding changesets | |
39 | adding manifests |
|
39 | adding manifests | |
40 | adding file changes |
|
40 | adding file changes | |
41 | added 1 changesets with 1 changes to 1 files |
|
41 | added 1 changesets with 1 changes to 1 files | |
42 | updating to branch default |
|
42 | updating to branch default | |
43 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
43 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
44 |
|
44 | |||
45 | largefiles clients still work with vanilla servers |
|
45 | largefiles clients still work with vanilla servers | |
46 | $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid |
|
46 | $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid | |
47 | $ cat hg.pid >> $DAEMON_PIDS |
|
47 | $ cat hg.pid >> $DAEMON_PIDS | |
48 | $ hg clone http://localhost:$HGPORT1 r3 |
|
48 | $ hg clone http://localhost:$HGPORT1 r3 | |
49 | requesting all changes |
|
49 | requesting all changes | |
50 | adding changesets |
|
50 | adding changesets | |
51 | adding manifests |
|
51 | adding manifests | |
52 | adding file changes |
|
52 | adding file changes | |
53 | added 1 changesets with 1 changes to 1 files |
|
53 | added 1 changesets with 1 changes to 1 files | |
54 | updating to branch default |
|
54 | updating to branch default | |
55 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
55 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
56 | #endif |
|
56 | #endif | |
57 |
|
57 | |||
58 | vanilla clients locked out from largefiles http repos |
|
58 | vanilla clients locked out from largefiles http repos | |
59 | $ mkdir r4 |
|
59 | $ mkdir r4 | |
60 | $ cd r4 |
|
60 | $ cd r4 | |
61 | $ hg init |
|
61 | $ hg init | |
62 | $ echo c1 > f1 |
|
62 | $ echo c1 > f1 | |
63 | $ hg add --large f1 |
|
63 | $ hg add --large f1 | |
64 | $ hg commit -m "m1" |
|
64 | $ hg commit -m "m1" | |
65 | Invoking status precommit hook |
|
65 | Invoking status precommit hook | |
66 | A f1 |
|
66 | A f1 | |
67 | $ cd .. |
|
67 | $ cd .. | |
68 |
|
68 | |||
69 | largefiles can be pushed locally (issue3583) |
|
69 | largefiles can be pushed locally (issue3583) | |
70 | $ hg init dest |
|
70 | $ hg init dest | |
71 | $ cd r4 |
|
71 | $ cd r4 | |
72 | $ hg outgoing ../dest |
|
72 | $ hg outgoing ../dest | |
73 | comparing with ../dest |
|
73 | comparing with ../dest | |
74 | searching for changes |
|
74 | searching for changes | |
75 | changeset: 0:639881c12b4c |
|
75 | changeset: 0:639881c12b4c | |
76 | tag: tip |
|
76 | tag: tip | |
77 | user: test |
|
77 | user: test | |
78 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
78 | date: Thu Jan 01 00:00:00 1970 +0000 | |
79 | summary: m1 |
|
79 | summary: m1 | |
80 |
|
80 | |||
81 | $ hg push ../dest |
|
81 | $ hg push ../dest | |
82 | pushing to ../dest |
|
82 | pushing to ../dest | |
83 | searching for changes |
|
83 | searching for changes | |
84 | adding changesets |
|
84 | adding changesets | |
85 | adding manifests |
|
85 | adding manifests | |
86 | adding file changes |
|
86 | adding file changes | |
87 | added 1 changesets with 1 changes to 1 files |
|
87 | added 1 changesets with 1 changes to 1 files | |
88 |
|
88 | |||
89 | exit code with nothing outgoing (issue3611) |
|
89 | exit code with nothing outgoing (issue3611) | |
90 | $ hg outgoing ../dest |
|
90 | $ hg outgoing ../dest | |
91 | comparing with ../dest |
|
91 | comparing with ../dest | |
92 | searching for changes |
|
92 | searching for changes | |
93 | no changes found |
|
93 | no changes found | |
94 | [1] |
|
94 | [1] | |
95 | $ cd .. |
|
95 | $ cd .. | |
96 |
|
96 | |||
97 | #if serve |
|
97 | #if serve | |
98 | $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid |
|
98 | $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid | |
99 | $ cat hg.pid >> $DAEMON_PIDS |
|
99 | $ cat hg.pid >> $DAEMON_PIDS | |
100 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5 |
|
100 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5 | |
101 | abort: remote error: |
|
101 | abort: remote error: | |
102 |
|
102 | |||
103 | This repository uses the largefiles extension. |
|
103 | This repository uses the largefiles extension. | |
104 |
|
104 | |||
105 | Please enable it in your Mercurial config file. |
|
105 | Please enable it in your Mercurial config file. | |
106 | [255] |
|
106 | [255] | |
107 |
|
107 | |||
108 | used all HGPORTs, kill all daemons |
|
108 | used all HGPORTs, kill all daemons | |
109 | $ killdaemons.py |
|
109 | $ killdaemons.py | |
110 | #endif |
|
110 | #endif | |
111 |
|
111 | |||
112 | vanilla clients locked out from largefiles ssh repos |
|
112 | vanilla clients locked out from largefiles ssh repos | |
113 |
$ hg --config extensions.largefiles=! clone -e |
|
113 | $ hg --config extensions.largefiles=! clone -e dummyssh ssh://user@dummy/r4 r5 | |
114 | remote: |
|
114 | remote: | |
115 | remote: This repository uses the largefiles extension. |
|
115 | remote: This repository uses the largefiles extension. | |
116 | remote: |
|
116 | remote: | |
117 | remote: Please enable it in your Mercurial config file. |
|
117 | remote: Please enable it in your Mercurial config file. | |
118 | remote: |
|
118 | remote: | |
119 | remote: - |
|
119 | remote: - | |
120 | abort: remote error |
|
120 | abort: remote error | |
121 | (check previous remote output) |
|
121 | (check previous remote output) | |
122 | [255] |
|
122 | [255] | |
123 |
|
123 | |||
124 | #if serve |
|
124 | #if serve | |
125 |
|
125 | |||
126 | largefiles clients refuse to push largefiles repos to vanilla servers |
|
126 | largefiles clients refuse to push largefiles repos to vanilla servers | |
127 | $ mkdir r6 |
|
127 | $ mkdir r6 | |
128 | $ cd r6 |
|
128 | $ cd r6 | |
129 | $ hg init |
|
129 | $ hg init | |
130 | $ echo c1 > f1 |
|
130 | $ echo c1 > f1 | |
131 | $ hg add f1 |
|
131 | $ hg add f1 | |
132 | $ hg commit -m "m1" |
|
132 | $ hg commit -m "m1" | |
133 | Invoking status precommit hook |
|
133 | Invoking status precommit hook | |
134 | A f1 |
|
134 | A f1 | |
135 | $ cat >> .hg/hgrc <<! |
|
135 | $ cat >> .hg/hgrc <<! | |
136 | > [web] |
|
136 | > [web] | |
137 | > push_ssl = false |
|
137 | > push_ssl = false | |
138 | > allow_push = * |
|
138 | > allow_push = * | |
139 | > ! |
|
139 | > ! | |
140 | $ cd .. |
|
140 | $ cd .. | |
141 | $ hg clone r6 r7 |
|
141 | $ hg clone r6 r7 | |
142 | updating to branch default |
|
142 | updating to branch default | |
143 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
143 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
144 | $ cd r7 |
|
144 | $ cd r7 | |
145 | $ echo c2 > f2 |
|
145 | $ echo c2 > f2 | |
146 | $ hg add --large f2 |
|
146 | $ hg add --large f2 | |
147 | $ hg commit -m "m2" |
|
147 | $ hg commit -m "m2" | |
148 | Invoking status precommit hook |
|
148 | Invoking status precommit hook | |
149 | A f2 |
|
149 | A f2 | |
150 | $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid |
|
150 | $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid | |
151 | $ cat ../hg.pid >> $DAEMON_PIDS |
|
151 | $ cat ../hg.pid >> $DAEMON_PIDS | |
152 | $ hg push http://localhost:$HGPORT |
|
152 | $ hg push http://localhost:$HGPORT | |
153 | pushing to http://localhost:$HGPORT/ |
|
153 | pushing to http://localhost:$HGPORT/ | |
154 | searching for changes |
|
154 | searching for changes | |
155 | abort: http://localhost:$HGPORT/ does not appear to be a largefile store |
|
155 | abort: http://localhost:$HGPORT/ does not appear to be a largefile store | |
156 | [255] |
|
156 | [255] | |
157 | $ cd .. |
|
157 | $ cd .. | |
158 |
|
158 | |||
159 | putlfile errors are shown (issue3123) |
|
159 | putlfile errors are shown (issue3123) | |
160 | Corrupt the cached largefile in r7 and move it out of the servers usercache |
|
160 | Corrupt the cached largefile in r7 and move it out of the servers usercache | |
161 | $ mv r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 . |
|
161 | $ mv r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 . | |
162 | $ echo 'client side corruption' > r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
162 | $ echo 'client side corruption' > r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
163 | $ rm "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8" |
|
163 | $ rm "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8" | |
164 | $ hg init empty |
|
164 | $ hg init empty | |
165 | $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \ |
|
165 | $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \ | |
166 | > --config 'web.allow_push=*' --config web.push_ssl=False |
|
166 | > --config 'web.allow_push=*' --config web.push_ssl=False | |
167 | $ cat hg.pid >> $DAEMON_PIDS |
|
167 | $ cat hg.pid >> $DAEMON_PIDS | |
168 | $ hg push -R r7 http://localhost:$HGPORT1 |
|
168 | $ hg push -R r7 http://localhost:$HGPORT1 | |
169 | pushing to http://localhost:$HGPORT1/ |
|
169 | pushing to http://localhost:$HGPORT1/ | |
170 | searching for changes |
|
170 | searching for changes | |
171 | remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash |
|
171 | remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash | |
172 | abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob) |
|
172 | abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob) | |
173 | [255] |
|
173 | [255] | |
174 | $ mv 4cdac4d8b084d0b599525cf732437fb337d422a8 r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
174 | $ mv 4cdac4d8b084d0b599525cf732437fb337d422a8 r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
175 | Push of file that exists on server but is corrupted - magic healing would be nice ... but too magic |
|
175 | Push of file that exists on server but is corrupted - magic healing would be nice ... but too magic | |
176 | $ echo "server side corruption" > empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
176 | $ echo "server side corruption" > empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
177 | $ hg push -R r7 http://localhost:$HGPORT1 |
|
177 | $ hg push -R r7 http://localhost:$HGPORT1 | |
178 | pushing to http://localhost:$HGPORT1/ |
|
178 | pushing to http://localhost:$HGPORT1/ | |
179 | searching for changes |
|
179 | searching for changes | |
180 | remote: adding changesets |
|
180 | remote: adding changesets | |
181 | remote: adding manifests |
|
181 | remote: adding manifests | |
182 | remote: adding file changes |
|
182 | remote: adding file changes | |
183 | remote: added 2 changesets with 2 changes to 2 files |
|
183 | remote: added 2 changesets with 2 changes to 2 files | |
184 | $ cat empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
184 | $ cat empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
185 | server side corruption |
|
185 | server side corruption | |
186 | $ rm -rf empty |
|
186 | $ rm -rf empty | |
187 |
|
187 | |||
188 | Push a largefiles repository to a served empty repository |
|
188 | Push a largefiles repository to a served empty repository | |
189 | $ hg init r8 |
|
189 | $ hg init r8 | |
190 | $ echo c3 > r8/f1 |
|
190 | $ echo c3 > r8/f1 | |
191 | $ hg add --large r8/f1 -R r8 |
|
191 | $ hg add --large r8/f1 -R r8 | |
192 | $ hg commit -m "m1" -R r8 |
|
192 | $ hg commit -m "m1" -R r8 | |
193 | Invoking status precommit hook |
|
193 | Invoking status precommit hook | |
194 | A f1 |
|
194 | A f1 | |
195 | $ hg init empty |
|
195 | $ hg init empty | |
196 | $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \ |
|
196 | $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \ | |
197 | > --config 'web.allow_push=*' --config web.push_ssl=False |
|
197 | > --config 'web.allow_push=*' --config web.push_ssl=False | |
198 | $ cat hg.pid >> $DAEMON_PIDS |
|
198 | $ cat hg.pid >> $DAEMON_PIDS | |
199 | $ rm "${USERCACHE}"/* |
|
199 | $ rm "${USERCACHE}"/* | |
200 | $ hg push -R r8 http://localhost:$HGPORT2/#default |
|
200 | $ hg push -R r8 http://localhost:$HGPORT2/#default | |
201 | pushing to http://localhost:$HGPORT2/ |
|
201 | pushing to http://localhost:$HGPORT2/ | |
202 | searching for changes |
|
202 | searching for changes | |
203 | remote: adding changesets |
|
203 | remote: adding changesets | |
204 | remote: adding manifests |
|
204 | remote: adding manifests | |
205 | remote: adding file changes |
|
205 | remote: adding file changes | |
206 | remote: added 1 changesets with 1 changes to 1 files |
|
206 | remote: added 1 changesets with 1 changes to 1 files | |
207 | $ [ -f "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] |
|
207 | $ [ -f "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] | |
208 | $ [ -f empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] |
|
208 | $ [ -f empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] | |
209 |
|
209 | |||
210 | Clone over http, no largefiles pulled on clone. |
|
210 | Clone over http, no largefiles pulled on clone. | |
211 |
|
211 | |||
212 | $ hg clone http://localhost:$HGPORT2/#default http-clone -U |
|
212 | $ hg clone http://localhost:$HGPORT2/#default http-clone -U | |
213 | adding changesets |
|
213 | adding changesets | |
214 | adding manifests |
|
214 | adding manifests | |
215 | adding file changes |
|
215 | adding file changes | |
216 | added 1 changesets with 1 changes to 1 files |
|
216 | added 1 changesets with 1 changes to 1 files | |
217 |
|
217 | |||
218 | test 'verify' with remotestore: |
|
218 | test 'verify' with remotestore: | |
219 |
|
219 | |||
220 | $ rm "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
220 | $ rm "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
221 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . |
|
221 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . | |
222 | $ hg -R http-clone verify --large --lfa |
|
222 | $ hg -R http-clone verify --large --lfa | |
223 | checking changesets |
|
223 | checking changesets | |
224 | checking manifests |
|
224 | checking manifests | |
225 | crosschecking files in changesets and manifests |
|
225 | crosschecking files in changesets and manifests | |
226 | checking files |
|
226 | checking files | |
227 | 1 files, 1 changesets, 1 total revisions |
|
227 | 1 files, 1 changesets, 1 total revisions | |
228 | searching 1 changesets for largefiles |
|
228 | searching 1 changesets for largefiles | |
229 | changeset 0:cf03e5bb9936: f1 missing |
|
229 | changeset 0:cf03e5bb9936: f1 missing | |
230 | verified existence of 1 revisions of 1 largefiles |
|
230 | verified existence of 1 revisions of 1 largefiles | |
231 | [1] |
|
231 | [1] | |
232 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ |
|
232 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ | |
233 | $ hg -R http-clone -q verify --large --lfa |
|
233 | $ hg -R http-clone -q verify --large --lfa | |
234 |
|
234 | |||
235 | largefiles pulled on update - a largefile missing on the server: |
|
235 | largefiles pulled on update - a largefile missing on the server: | |
236 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . |
|
236 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . | |
237 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache |
|
237 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache | |
238 | getting changed largefiles |
|
238 | getting changed largefiles | |
239 | f1: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 not available from http://localhost:$HGPORT2/ |
|
239 | f1: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 not available from http://localhost:$HGPORT2/ | |
240 | 0 largefiles updated, 0 removed |
|
240 | 0 largefiles updated, 0 removed | |
241 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
241 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
242 | $ hg -R http-clone st |
|
242 | $ hg -R http-clone st | |
243 | ! f1 |
|
243 | ! f1 | |
244 | $ hg -R http-clone up -Cqr null |
|
244 | $ hg -R http-clone up -Cqr null | |
245 |
|
245 | |||
246 | largefiles pulled on update - a largefile corrupted on the server: |
|
246 | largefiles pulled on update - a largefile corrupted on the server: | |
247 | $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
247 | $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
248 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache |
|
248 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache | |
249 | getting changed largefiles |
|
249 | getting changed largefiles | |
250 | f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27) |
|
250 | f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27) | |
251 | 0 largefiles updated, 0 removed |
|
251 | 0 largefiles updated, 0 removed | |
252 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
252 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
253 | $ hg -R http-clone st |
|
253 | $ hg -R http-clone st | |
254 | ! f1 |
|
254 | ! f1 | |
255 | $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] |
|
255 | $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] | |
256 | $ [ ! -f http-clone/f1 ] |
|
256 | $ [ ! -f http-clone/f1 ] | |
257 | $ [ ! -f http-clone-usercache ] |
|
257 | $ [ ! -f http-clone-usercache ] | |
258 | $ hg -R http-clone verify --large --lfc |
|
258 | $ hg -R http-clone verify --large --lfc | |
259 | checking changesets |
|
259 | checking changesets | |
260 | checking manifests |
|
260 | checking manifests | |
261 | crosschecking files in changesets and manifests |
|
261 | crosschecking files in changesets and manifests | |
262 | checking files |
|
262 | checking files | |
263 | 1 files, 1 changesets, 1 total revisions |
|
263 | 1 files, 1 changesets, 1 total revisions | |
264 | searching 1 changesets for largefiles |
|
264 | searching 1 changesets for largefiles | |
265 | verified contents of 1 revisions of 1 largefiles |
|
265 | verified contents of 1 revisions of 1 largefiles | |
266 | $ hg -R http-clone up -Cqr null |
|
266 | $ hg -R http-clone up -Cqr null | |
267 |
|
267 | |||
268 | largefiles pulled on update - no server side problems: |
|
268 | largefiles pulled on update - no server side problems: | |
269 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ |
|
269 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ | |
270 | $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache --config progress.debug=true |
|
270 | $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache --config progress.debug=true | |
271 | resolving manifests |
|
271 | resolving manifests | |
272 | branchmerge: False, force: False, partial: False |
|
272 | branchmerge: False, force: False, partial: False | |
273 | ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936 |
|
273 | ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936 | |
274 | .hglf/f1: remote created -> g |
|
274 | .hglf/f1: remote created -> g | |
275 | getting .hglf/f1 |
|
275 | getting .hglf/f1 | |
276 | updating: .hglf/f1 1/1 files (100.00%) |
|
276 | updating: .hglf/f1 1/1 files (100.00%) | |
277 | getting changed largefiles |
|
277 | getting changed largefiles | |
278 | using http://localhost:$HGPORT2/ |
|
278 | using http://localhost:$HGPORT2/ | |
279 | sending capabilities command |
|
279 | sending capabilities command | |
280 | sending batch command |
|
280 | sending batch command | |
281 | getting largefiles: 0/1 lfile (0.00%) |
|
281 | getting largefiles: 0/1 lfile (0.00%) | |
282 | getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
282 | getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
283 | sending getlfile command |
|
283 | sending getlfile command | |
284 | found 02a439e5c31c526465ab1a0ca1f431f76b827b90 in store |
|
284 | found 02a439e5c31c526465ab1a0ca1f431f76b827b90 in store | |
285 | 1 largefiles updated, 0 removed |
|
285 | 1 largefiles updated, 0 removed | |
286 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
286 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
287 |
|
287 | |||
288 | $ ls http-clone-usercache/* |
|
288 | $ ls http-clone-usercache/* | |
289 | http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
289 | http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
290 |
|
290 | |||
291 | $ rm -rf empty http-clone* |
|
291 | $ rm -rf empty http-clone* | |
292 |
|
292 | |||
293 | used all HGPORTs, kill all daemons |
|
293 | used all HGPORTs, kill all daemons | |
294 | $ killdaemons.py |
|
294 | $ killdaemons.py | |
295 |
|
295 | |||
296 | #endif |
|
296 | #endif |
@@ -1,512 +1,512 b'' | |||||
1 | This test is a duplicate of 'test-http.t' feel free to factor out |
|
1 | This test is a duplicate of 'test-http.t' feel free to factor out | |
2 | parts that are not bundle1/bundle2 specific. |
|
2 | parts that are not bundle1/bundle2 specific. | |
3 |
|
3 | |||
4 | $ cat << EOF >> $HGRCPATH |
|
4 | $ cat << EOF >> $HGRCPATH | |
5 | > [experimental] |
|
5 | > [experimental] | |
6 | > # This test is dedicated to interaction through old bundle |
|
6 | > # This test is dedicated to interaction through old bundle | |
7 | > bundle2-exp = False |
|
7 | > bundle2-exp = False | |
8 | > EOF |
|
8 | > EOF | |
9 |
|
9 | |||
10 |
|
10 | |||
11 | This test tries to exercise the ssh functionality with a dummy script |
|
11 | This test tries to exercise the ssh functionality with a dummy script | |
12 |
|
12 | |||
13 | creating 'remote' repo |
|
13 | creating 'remote' repo | |
14 |
|
14 | |||
15 | $ hg init remote |
|
15 | $ hg init remote | |
16 | $ cd remote |
|
16 | $ cd remote | |
17 | $ echo this > foo |
|
17 | $ echo this > foo | |
18 | $ echo this > fooO |
|
18 | $ echo this > fooO | |
19 | $ hg ci -A -m "init" foo fooO |
|
19 | $ hg ci -A -m "init" foo fooO | |
20 |
|
20 | |||
21 | insert a closed branch (issue4428) |
|
21 | insert a closed branch (issue4428) | |
22 |
|
22 | |||
23 | $ hg up null |
|
23 | $ hg up null | |
24 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
24 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
25 | $ hg branch closed |
|
25 | $ hg branch closed | |
26 | marked working directory as branch closed |
|
26 | marked working directory as branch closed | |
27 | (branches are permanent and global, did you want a bookmark?) |
|
27 | (branches are permanent and global, did you want a bookmark?) | |
28 | $ hg ci -mc0 |
|
28 | $ hg ci -mc0 | |
29 | $ hg ci --close-branch -mc1 |
|
29 | $ hg ci --close-branch -mc1 | |
30 | $ hg up -q default |
|
30 | $ hg up -q default | |
31 |
|
31 | |||
32 | configure for serving |
|
32 | configure for serving | |
33 |
|
33 | |||
34 | $ cat <<EOF > .hg/hgrc |
|
34 | $ cat <<EOF > .hg/hgrc | |
35 | > [server] |
|
35 | > [server] | |
36 | > uncompressed = True |
|
36 | > uncompressed = True | |
37 | > |
|
37 | > | |
38 | > [hooks] |
|
38 | > [hooks] | |
39 | > changegroup = python "$TESTDIR/printenv.py" changegroup-in-remote 0 ../dummylog |
|
39 | > changegroup = python "$TESTDIR/printenv.py" changegroup-in-remote 0 ../dummylog | |
40 | > EOF |
|
40 | > EOF | |
41 | $ cd .. |
|
41 | $ cd .. | |
42 |
|
42 | |||
43 | repo not found error |
|
43 | repo not found error | |
44 |
|
44 | |||
45 |
$ hg clone -e |
|
45 | $ hg clone -e dummyssh ssh://user@dummy/nonexistent local | |
46 | remote: abort: there is no Mercurial repository here (.hg not found)! |
|
46 | remote: abort: there is no Mercurial repository here (.hg not found)! | |
47 | abort: no suitable response from remote hg! |
|
47 | abort: no suitable response from remote hg! | |
48 | [255] |
|
48 | [255] | |
49 |
|
49 | |||
50 | non-existent absolute path |
|
50 | non-existent absolute path | |
51 |
|
51 | |||
52 |
$ hg clone -e |
|
52 | $ hg clone -e dummyssh ssh://user@dummy//`pwd`/nonexistent local | |
53 | remote: abort: there is no Mercurial repository here (.hg not found)! |
|
53 | remote: abort: there is no Mercurial repository here (.hg not found)! | |
54 | abort: no suitable response from remote hg! |
|
54 | abort: no suitable response from remote hg! | |
55 | [255] |
|
55 | [255] | |
56 |
|
56 | |||
57 | clone remote via stream |
|
57 | clone remote via stream | |
58 |
|
58 | |||
59 |
$ hg clone -e |
|
59 | $ hg clone -e dummyssh --uncompressed ssh://user@dummy/remote local-stream | |
60 | streaming all changes |
|
60 | streaming all changes | |
61 | 4 files to transfer, 615 bytes of data |
|
61 | 4 files to transfer, 615 bytes of data | |
62 | transferred 615 bytes in * seconds (*) (glob) |
|
62 | transferred 615 bytes in * seconds (*) (glob) | |
63 | searching for changes |
|
63 | searching for changes | |
64 | no changes found |
|
64 | no changes found | |
65 | updating to branch default |
|
65 | updating to branch default | |
66 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
66 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
67 | $ cd local-stream |
|
67 | $ cd local-stream | |
68 | $ hg verify |
|
68 | $ hg verify | |
69 | checking changesets |
|
69 | checking changesets | |
70 | checking manifests |
|
70 | checking manifests | |
71 | crosschecking files in changesets and manifests |
|
71 | crosschecking files in changesets and manifests | |
72 | checking files |
|
72 | checking files | |
73 | 2 files, 3 changesets, 2 total revisions |
|
73 | 2 files, 3 changesets, 2 total revisions | |
74 | $ hg branches |
|
74 | $ hg branches | |
75 | default 0:1160648e36ce |
|
75 | default 0:1160648e36ce | |
76 | $ cd .. |
|
76 | $ cd .. | |
77 |
|
77 | |||
78 | clone bookmarks via stream |
|
78 | clone bookmarks via stream | |
79 |
|
79 | |||
80 | $ hg -R local-stream book mybook |
|
80 | $ hg -R local-stream book mybook | |
81 |
$ hg clone -e |
|
81 | $ hg clone -e dummyssh --uncompressed ssh://user@dummy/local-stream stream2 | |
82 | streaming all changes |
|
82 | streaming all changes | |
83 | 4 files to transfer, 615 bytes of data |
|
83 | 4 files to transfer, 615 bytes of data | |
84 | transferred 615 bytes in * seconds (*) (glob) |
|
84 | transferred 615 bytes in * seconds (*) (glob) | |
85 | searching for changes |
|
85 | searching for changes | |
86 | no changes found |
|
86 | no changes found | |
87 | updating to branch default |
|
87 | updating to branch default | |
88 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
88 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
89 | $ cd stream2 |
|
89 | $ cd stream2 | |
90 | $ hg book |
|
90 | $ hg book | |
91 | mybook 0:1160648e36ce |
|
91 | mybook 0:1160648e36ce | |
92 | $ cd .. |
|
92 | $ cd .. | |
93 | $ rm -rf local-stream stream2 |
|
93 | $ rm -rf local-stream stream2 | |
94 |
|
94 | |||
95 | clone remote via pull |
|
95 | clone remote via pull | |
96 |
|
96 | |||
97 |
$ hg clone -e |
|
97 | $ hg clone -e dummyssh ssh://user@dummy/remote local | |
98 | requesting all changes |
|
98 | requesting all changes | |
99 | adding changesets |
|
99 | adding changesets | |
100 | adding manifests |
|
100 | adding manifests | |
101 | adding file changes |
|
101 | adding file changes | |
102 | added 3 changesets with 2 changes to 2 files |
|
102 | added 3 changesets with 2 changes to 2 files | |
103 | updating to branch default |
|
103 | updating to branch default | |
104 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
104 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
105 |
|
105 | |||
106 | verify |
|
106 | verify | |
107 |
|
107 | |||
108 | $ cd local |
|
108 | $ cd local | |
109 | $ hg verify |
|
109 | $ hg verify | |
110 | checking changesets |
|
110 | checking changesets | |
111 | checking manifests |
|
111 | checking manifests | |
112 | crosschecking files in changesets and manifests |
|
112 | crosschecking files in changesets and manifests | |
113 | checking files |
|
113 | checking files | |
114 | 2 files, 3 changesets, 2 total revisions |
|
114 | 2 files, 3 changesets, 2 total revisions | |
115 | $ echo '[hooks]' >> .hg/hgrc |
|
115 | $ echo '[hooks]' >> .hg/hgrc | |
116 | $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup-in-local 0 ../dummylog" >> .hg/hgrc |
|
116 | $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup-in-local 0 ../dummylog" >> .hg/hgrc | |
117 |
|
117 | |||
118 | empty default pull |
|
118 | empty default pull | |
119 |
|
119 | |||
120 | $ hg paths |
|
120 | $ hg paths | |
121 | default = ssh://user@dummy/remote |
|
121 | default = ssh://user@dummy/remote | |
122 |
$ hg pull -e |
|
122 | $ hg pull -e dummyssh | |
123 | pulling from ssh://user@dummy/remote |
|
123 | pulling from ssh://user@dummy/remote | |
124 | searching for changes |
|
124 | searching for changes | |
125 | no changes found |
|
125 | no changes found | |
126 |
|
126 | |||
127 | pull from wrong ssh URL |
|
127 | pull from wrong ssh URL | |
128 |
|
128 | |||
129 |
$ hg pull -e |
|
129 | $ hg pull -e dummyssh ssh://user@dummy/doesnotexist | |
130 | pulling from ssh://user@dummy/doesnotexist |
|
130 | pulling from ssh://user@dummy/doesnotexist | |
131 | remote: abort: there is no Mercurial repository here (.hg not found)! |
|
131 | remote: abort: there is no Mercurial repository here (.hg not found)! | |
132 | abort: no suitable response from remote hg! |
|
132 | abort: no suitable response from remote hg! | |
133 | [255] |
|
133 | [255] | |
134 |
|
134 | |||
135 | local change |
|
135 | local change | |
136 |
|
136 | |||
137 | $ echo bleah > foo |
|
137 | $ echo bleah > foo | |
138 | $ hg ci -m "add" |
|
138 | $ hg ci -m "add" | |
139 |
|
139 | |||
140 | updating rc |
|
140 | updating rc | |
141 |
|
141 | |||
142 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
142 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
143 | $ echo "[ui]" >> .hg/hgrc |
|
143 | $ echo "[ui]" >> .hg/hgrc | |
144 |
$ echo "ssh = |
|
144 | $ echo "ssh = dummyssh" >> .hg/hgrc | |
145 |
|
145 | |||
146 | find outgoing |
|
146 | find outgoing | |
147 |
|
147 | |||
148 | $ hg out ssh://user@dummy/remote |
|
148 | $ hg out ssh://user@dummy/remote | |
149 | comparing with ssh://user@dummy/remote |
|
149 | comparing with ssh://user@dummy/remote | |
150 | searching for changes |
|
150 | searching for changes | |
151 | changeset: 3:a28a9d1a809c |
|
151 | changeset: 3:a28a9d1a809c | |
152 | tag: tip |
|
152 | tag: tip | |
153 | parent: 0:1160648e36ce |
|
153 | parent: 0:1160648e36ce | |
154 | user: test |
|
154 | user: test | |
155 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
155 | date: Thu Jan 01 00:00:00 1970 +0000 | |
156 | summary: add |
|
156 | summary: add | |
157 |
|
157 | |||
158 |
|
158 | |||
159 | find incoming on the remote side |
|
159 | find incoming on the remote side | |
160 |
|
160 | |||
161 |
$ hg incoming -R ../remote -e |
|
161 | $ hg incoming -R ../remote -e dummyssh ssh://user@dummy/local | |
162 | comparing with ssh://user@dummy/local |
|
162 | comparing with ssh://user@dummy/local | |
163 | searching for changes |
|
163 | searching for changes | |
164 | changeset: 3:a28a9d1a809c |
|
164 | changeset: 3:a28a9d1a809c | |
165 | tag: tip |
|
165 | tag: tip | |
166 | parent: 0:1160648e36ce |
|
166 | parent: 0:1160648e36ce | |
167 | user: test |
|
167 | user: test | |
168 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
168 | date: Thu Jan 01 00:00:00 1970 +0000 | |
169 | summary: add |
|
169 | summary: add | |
170 |
|
170 | |||
171 |
|
171 | |||
172 | find incoming on the remote side (using absolute path) |
|
172 | find incoming on the remote side (using absolute path) | |
173 |
|
173 | |||
174 |
$ hg incoming -R ../remote -e |
|
174 | $ hg incoming -R ../remote -e dummyssh "ssh://user@dummy/`pwd`" | |
175 | comparing with ssh://user@dummy/$TESTTMP/local |
|
175 | comparing with ssh://user@dummy/$TESTTMP/local | |
176 | searching for changes |
|
176 | searching for changes | |
177 | changeset: 3:a28a9d1a809c |
|
177 | changeset: 3:a28a9d1a809c | |
178 | tag: tip |
|
178 | tag: tip | |
179 | parent: 0:1160648e36ce |
|
179 | parent: 0:1160648e36ce | |
180 | user: test |
|
180 | user: test | |
181 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
181 | date: Thu Jan 01 00:00:00 1970 +0000 | |
182 | summary: add |
|
182 | summary: add | |
183 |
|
183 | |||
184 |
|
184 | |||
185 | push |
|
185 | push | |
186 |
|
186 | |||
187 | $ hg push |
|
187 | $ hg push | |
188 | pushing to ssh://user@dummy/remote |
|
188 | pushing to ssh://user@dummy/remote | |
189 | searching for changes |
|
189 | searching for changes | |
190 | remote: adding changesets |
|
190 | remote: adding changesets | |
191 | remote: adding manifests |
|
191 | remote: adding manifests | |
192 | remote: adding file changes |
|
192 | remote: adding file changes | |
193 | remote: added 1 changesets with 1 changes to 1 files |
|
193 | remote: added 1 changesets with 1 changes to 1 files | |
194 | $ cd ../remote |
|
194 | $ cd ../remote | |
195 |
|
195 | |||
196 | check remote tip |
|
196 | check remote tip | |
197 |
|
197 | |||
198 | $ hg tip |
|
198 | $ hg tip | |
199 | changeset: 3:a28a9d1a809c |
|
199 | changeset: 3:a28a9d1a809c | |
200 | tag: tip |
|
200 | tag: tip | |
201 | parent: 0:1160648e36ce |
|
201 | parent: 0:1160648e36ce | |
202 | user: test |
|
202 | user: test | |
203 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
203 | date: Thu Jan 01 00:00:00 1970 +0000 | |
204 | summary: add |
|
204 | summary: add | |
205 |
|
205 | |||
206 | $ hg verify |
|
206 | $ hg verify | |
207 | checking changesets |
|
207 | checking changesets | |
208 | checking manifests |
|
208 | checking manifests | |
209 | crosschecking files in changesets and manifests |
|
209 | crosschecking files in changesets and manifests | |
210 | checking files |
|
210 | checking files | |
211 | 2 files, 4 changesets, 3 total revisions |
|
211 | 2 files, 4 changesets, 3 total revisions | |
212 | $ hg cat -r tip foo |
|
212 | $ hg cat -r tip foo | |
213 | bleah |
|
213 | bleah | |
214 | $ echo z > z |
|
214 | $ echo z > z | |
215 | $ hg ci -A -m z z |
|
215 | $ hg ci -A -m z z | |
216 | created new head |
|
216 | created new head | |
217 |
|
217 | |||
218 | test pushkeys and bookmarks |
|
218 | test pushkeys and bookmarks | |
219 |
|
219 | |||
220 | $ cd ../local |
|
220 | $ cd ../local | |
221 |
$ hg debugpushkey --config ui.ssh= |
|
221 | $ hg debugpushkey --config ui.ssh=dummyssh ssh://user@dummy/remote namespaces | |
222 | bookmarks |
|
222 | bookmarks | |
223 | namespaces |
|
223 | namespaces | |
224 | phases |
|
224 | phases | |
225 | $ hg book foo -r 0 |
|
225 | $ hg book foo -r 0 | |
226 | $ hg out -B |
|
226 | $ hg out -B | |
227 | comparing with ssh://user@dummy/remote |
|
227 | comparing with ssh://user@dummy/remote | |
228 | searching for changed bookmarks |
|
228 | searching for changed bookmarks | |
229 | foo 1160648e36ce |
|
229 | foo 1160648e36ce | |
230 | $ hg push -B foo |
|
230 | $ hg push -B foo | |
231 | pushing to ssh://user@dummy/remote |
|
231 | pushing to ssh://user@dummy/remote | |
232 | searching for changes |
|
232 | searching for changes | |
233 | no changes found |
|
233 | no changes found | |
234 | exporting bookmark foo |
|
234 | exporting bookmark foo | |
235 | [1] |
|
235 | [1] | |
236 |
$ hg debugpushkey --config ui.ssh= |
|
236 | $ hg debugpushkey --config ui.ssh=dummyssh ssh://user@dummy/remote bookmarks | |
237 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
237 | foo 1160648e36cec0054048a7edc4110c6f84fde594 | |
238 | $ hg book -f foo |
|
238 | $ hg book -f foo | |
239 | $ hg push --traceback |
|
239 | $ hg push --traceback | |
240 | pushing to ssh://user@dummy/remote |
|
240 | pushing to ssh://user@dummy/remote | |
241 | searching for changes |
|
241 | searching for changes | |
242 | no changes found |
|
242 | no changes found | |
243 | updating bookmark foo |
|
243 | updating bookmark foo | |
244 | [1] |
|
244 | [1] | |
245 | $ hg book -d foo |
|
245 | $ hg book -d foo | |
246 | $ hg in -B |
|
246 | $ hg in -B | |
247 | comparing with ssh://user@dummy/remote |
|
247 | comparing with ssh://user@dummy/remote | |
248 | searching for changed bookmarks |
|
248 | searching for changed bookmarks | |
249 | foo a28a9d1a809c |
|
249 | foo a28a9d1a809c | |
250 | $ hg book -f -r 0 foo |
|
250 | $ hg book -f -r 0 foo | |
251 | $ hg pull -B foo |
|
251 | $ hg pull -B foo | |
252 | pulling from ssh://user@dummy/remote |
|
252 | pulling from ssh://user@dummy/remote | |
253 | no changes found |
|
253 | no changes found | |
254 | updating bookmark foo |
|
254 | updating bookmark foo | |
255 | $ hg book -d foo |
|
255 | $ hg book -d foo | |
256 | $ hg push -B foo |
|
256 | $ hg push -B foo | |
257 | pushing to ssh://user@dummy/remote |
|
257 | pushing to ssh://user@dummy/remote | |
258 | searching for changes |
|
258 | searching for changes | |
259 | no changes found |
|
259 | no changes found | |
260 | deleting remote bookmark foo |
|
260 | deleting remote bookmark foo | |
261 | [1] |
|
261 | [1] | |
262 |
|
262 | |||
263 | a bad, evil hook that prints to stdout |
|
263 | a bad, evil hook that prints to stdout | |
264 |
|
264 | |||
265 | $ cat <<EOF > $TESTTMP/badhook |
|
265 | $ cat <<EOF > $TESTTMP/badhook | |
266 | > import sys |
|
266 | > import sys | |
267 | > sys.stdout.write("KABOOM\n") |
|
267 | > sys.stdout.write("KABOOM\n") | |
268 | > EOF |
|
268 | > EOF | |
269 |
|
269 | |||
270 | $ echo '[hooks]' >> ../remote/.hg/hgrc |
|
270 | $ echo '[hooks]' >> ../remote/.hg/hgrc | |
271 | $ echo "changegroup.stdout = python $TESTTMP/badhook" >> ../remote/.hg/hgrc |
|
271 | $ echo "changegroup.stdout = python $TESTTMP/badhook" >> ../remote/.hg/hgrc | |
272 | $ echo r > r |
|
272 | $ echo r > r | |
273 | $ hg ci -A -m z r |
|
273 | $ hg ci -A -m z r | |
274 |
|
274 | |||
275 | push should succeed even though it has an unexpected response |
|
275 | push should succeed even though it has an unexpected response | |
276 |
|
276 | |||
277 | $ hg push |
|
277 | $ hg push | |
278 | pushing to ssh://user@dummy/remote |
|
278 | pushing to ssh://user@dummy/remote | |
279 | searching for changes |
|
279 | searching for changes | |
280 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
280 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
281 | remote: adding changesets |
|
281 | remote: adding changesets | |
282 | remote: adding manifests |
|
282 | remote: adding manifests | |
283 | remote: adding file changes |
|
283 | remote: adding file changes | |
284 | remote: added 1 changesets with 1 changes to 1 files |
|
284 | remote: added 1 changesets with 1 changes to 1 files | |
285 | remote: KABOOM |
|
285 | remote: KABOOM | |
286 | $ hg -R ../remote heads |
|
286 | $ hg -R ../remote heads | |
287 | changeset: 5:1383141674ec |
|
287 | changeset: 5:1383141674ec | |
288 | tag: tip |
|
288 | tag: tip | |
289 | parent: 3:a28a9d1a809c |
|
289 | parent: 3:a28a9d1a809c | |
290 | user: test |
|
290 | user: test | |
291 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
291 | date: Thu Jan 01 00:00:00 1970 +0000 | |
292 | summary: z |
|
292 | summary: z | |
293 |
|
293 | |||
294 | changeset: 4:6c0482d977a3 |
|
294 | changeset: 4:6c0482d977a3 | |
295 | parent: 0:1160648e36ce |
|
295 | parent: 0:1160648e36ce | |
296 | user: test |
|
296 | user: test | |
297 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
297 | date: Thu Jan 01 00:00:00 1970 +0000 | |
298 | summary: z |
|
298 | summary: z | |
299 |
|
299 | |||
300 |
|
300 | |||
301 | clone bookmarks |
|
301 | clone bookmarks | |
302 |
|
302 | |||
303 | $ hg -R ../remote bookmark test |
|
303 | $ hg -R ../remote bookmark test | |
304 | $ hg -R ../remote bookmarks |
|
304 | $ hg -R ../remote bookmarks | |
305 | * test 4:6c0482d977a3 |
|
305 | * test 4:6c0482d977a3 | |
306 |
$ hg clone -e |
|
306 | $ hg clone -e dummyssh ssh://user@dummy/remote local-bookmarks | |
307 | requesting all changes |
|
307 | requesting all changes | |
308 | adding changesets |
|
308 | adding changesets | |
309 | adding manifests |
|
309 | adding manifests | |
310 | adding file changes |
|
310 | adding file changes | |
311 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
311 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
312 | updating to branch default |
|
312 | updating to branch default | |
313 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
313 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
314 | $ hg -R local-bookmarks bookmarks |
|
314 | $ hg -R local-bookmarks bookmarks | |
315 | test 4:6c0482d977a3 |
|
315 | test 4:6c0482d977a3 | |
316 |
|
316 | |||
317 | passwords in ssh urls are not supported |
|
317 | passwords in ssh urls are not supported | |
318 | (we use a glob here because different Python versions give different |
|
318 | (we use a glob here because different Python versions give different | |
319 | results here) |
|
319 | results here) | |
320 |
|
320 | |||
321 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
321 | $ hg push ssh://user:erroneouspwd@dummy/remote | |
322 | pushing to ssh://user:*@dummy/remote (glob) |
|
322 | pushing to ssh://user:*@dummy/remote (glob) | |
323 | abort: password in URL not supported! |
|
323 | abort: password in URL not supported! | |
324 | [255] |
|
324 | [255] | |
325 |
|
325 | |||
326 | $ cd .. |
|
326 | $ cd .. | |
327 |
|
327 | |||
328 | hide outer repo |
|
328 | hide outer repo | |
329 | $ hg init |
|
329 | $ hg init | |
330 |
|
330 | |||
331 | Test remote paths with spaces (issue2983): |
|
331 | Test remote paths with spaces (issue2983): | |
332 |
|
332 | |||
333 |
$ hg init --ssh |
|
333 | $ hg init --ssh dummyssh "ssh://user@dummy/a repo" | |
334 |
$ |
|
334 | $ touch "$TESTTMP/a repo/test" | |
335 |
$ |
|
335 | $ hg -R 'a repo' commit -A -m "test" | |
336 | adding test |
|
336 | adding test | |
337 | $ hg -R 'a repo' tag tag |
|
337 | $ hg -R 'a repo' tag tag | |
338 |
$ hg id --ssh |
|
338 | $ hg id --ssh dummyssh "ssh://user@dummy/a repo" | |
339 | 73649e48688a |
|
339 | 73649e48688a | |
340 |
|
340 | |||
341 |
$ hg id --ssh |
|
341 | $ hg id --ssh dummyssh "ssh://user@dummy/a repo#noNoNO" | |
342 | abort: unknown revision 'noNoNO'! |
|
342 | abort: unknown revision 'noNoNO'! | |
343 | [255] |
|
343 | [255] | |
344 |
|
344 | |||
345 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
|
345 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): | |
346 |
|
346 | |||
347 |
$ hg clone --ssh |
|
347 | $ hg clone --ssh dummyssh "ssh://user@dummy/a repo" | |
348 | destination directory: a repo |
|
348 | destination directory: a repo | |
349 | abort: destination 'a repo' is not empty |
|
349 | abort: destination 'a repo' is not empty | |
350 | [255] |
|
350 | [255] | |
351 |
|
351 | |||
352 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
|
352 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might | |
353 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right |
|
353 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right | |
354 | parameters: |
|
354 | parameters: | |
355 |
|
355 | |||
356 | $ cat > ssh.sh << EOF |
|
356 | $ cat > ssh.sh << EOF | |
357 | > userhost="\$1" |
|
357 | > userhost="\$1" | |
358 | > SSH_ORIGINAL_COMMAND="\$2" |
|
358 | > SSH_ORIGINAL_COMMAND="\$2" | |
359 | > export SSH_ORIGINAL_COMMAND |
|
359 | > export SSH_ORIGINAL_COMMAND | |
360 | > PYTHONPATH="$PYTHONPATH" |
|
360 | > PYTHONPATH="$PYTHONPATH" | |
361 | > export PYTHONPATH |
|
361 | > export PYTHONPATH | |
362 | > python "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
|
362 | > python "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" | |
363 | > EOF |
|
363 | > EOF | |
364 |
|
364 | |||
365 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
|
365 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" | |
366 | 73649e48688a |
|
366 | 73649e48688a | |
367 |
|
367 | |||
368 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" |
|
368 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" | |
369 | remote: Illegal repository "$TESTTMP/a'repo" (glob) |
|
369 | remote: Illegal repository "$TESTTMP/a'repo" (glob) | |
370 | abort: no suitable response from remote hg! |
|
370 | abort: no suitable response from remote hg! | |
371 | [255] |
|
371 | [255] | |
372 |
|
372 | |||
373 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" |
|
373 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" | |
374 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" |
|
374 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" | |
375 | abort: no suitable response from remote hg! |
|
375 | abort: no suitable response from remote hg! | |
376 | [255] |
|
376 | [255] | |
377 |
|
377 | |||
378 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" python "$TESTDIR/../contrib/hg-ssh" |
|
378 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" python "$TESTDIR/../contrib/hg-ssh" | |
379 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation |
|
379 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation | |
380 | [255] |
|
380 | [255] | |
381 |
|
381 | |||
382 | Test hg-ssh in read-only mode: |
|
382 | Test hg-ssh in read-only mode: | |
383 |
|
383 | |||
384 | $ cat > ssh.sh << EOF |
|
384 | $ cat > ssh.sh << EOF | |
385 | > userhost="\$1" |
|
385 | > userhost="\$1" | |
386 | > SSH_ORIGINAL_COMMAND="\$2" |
|
386 | > SSH_ORIGINAL_COMMAND="\$2" | |
387 | > export SSH_ORIGINAL_COMMAND |
|
387 | > export SSH_ORIGINAL_COMMAND | |
388 | > PYTHONPATH="$PYTHONPATH" |
|
388 | > PYTHONPATH="$PYTHONPATH" | |
389 | > export PYTHONPATH |
|
389 | > export PYTHONPATH | |
390 | > python "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
|
390 | > python "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" | |
391 | > EOF |
|
391 | > EOF | |
392 |
|
392 | |||
393 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
|
393 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local | |
394 | requesting all changes |
|
394 | requesting all changes | |
395 | adding changesets |
|
395 | adding changesets | |
396 | adding manifests |
|
396 | adding manifests | |
397 | adding file changes |
|
397 | adding file changes | |
398 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
398 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
399 | updating to branch default |
|
399 | updating to branch default | |
400 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
400 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
401 |
|
401 | |||
402 | $ cd read-only-local |
|
402 | $ cd read-only-local | |
403 | $ echo "baz" > bar |
|
403 | $ echo "baz" > bar | |
404 | $ hg ci -A -m "unpushable commit" bar |
|
404 | $ hg ci -A -m "unpushable commit" bar | |
405 | $ hg push --ssh "sh ../ssh.sh" |
|
405 | $ hg push --ssh "sh ../ssh.sh" | |
406 | pushing to ssh://user@dummy/*/remote (glob) |
|
406 | pushing to ssh://user@dummy/*/remote (glob) | |
407 | searching for changes |
|
407 | searching for changes | |
408 | remote: Permission denied |
|
408 | remote: Permission denied | |
409 | remote: abort: pretxnopen.hg-ssh hook failed |
|
409 | remote: abort: pretxnopen.hg-ssh hook failed | |
410 | remote: Permission denied |
|
410 | remote: Permission denied | |
411 | remote: pushkey-abort: prepushkey.hg-ssh hook failed |
|
411 | remote: pushkey-abort: prepushkey.hg-ssh hook failed | |
412 | updating 6c0482d977a3 to public failed! |
|
412 | updating 6c0482d977a3 to public failed! | |
413 | [1] |
|
413 | [1] | |
414 |
|
414 | |||
415 | $ cd .. |
|
415 | $ cd .. | |
416 |
|
416 | |||
417 | stderr from remote commands should be printed before stdout from local code (issue4336) |
|
417 | stderr from remote commands should be printed before stdout from local code (issue4336) | |
418 |
|
418 | |||
419 | $ hg clone remote stderr-ordering |
|
419 | $ hg clone remote stderr-ordering | |
420 | updating to branch default |
|
420 | updating to branch default | |
421 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
421 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
422 | $ cd stderr-ordering |
|
422 | $ cd stderr-ordering | |
423 | $ cat >> localwrite.py << EOF |
|
423 | $ cat >> localwrite.py << EOF | |
424 | > from mercurial import exchange, extensions |
|
424 | > from mercurial import exchange, extensions | |
425 | > |
|
425 | > | |
426 | > def wrappedpush(orig, repo, *args, **kwargs): |
|
426 | > def wrappedpush(orig, repo, *args, **kwargs): | |
427 | > res = orig(repo, *args, **kwargs) |
|
427 | > res = orig(repo, *args, **kwargs) | |
428 | > repo.ui.write('local stdout\n') |
|
428 | > repo.ui.write('local stdout\n') | |
429 | > return res |
|
429 | > return res | |
430 | > |
|
430 | > | |
431 | > def extsetup(ui): |
|
431 | > def extsetup(ui): | |
432 | > extensions.wrapfunction(exchange, 'push', wrappedpush) |
|
432 | > extensions.wrapfunction(exchange, 'push', wrappedpush) | |
433 | > EOF |
|
433 | > EOF | |
434 |
|
434 | |||
435 | $ cat >> .hg/hgrc << EOF |
|
435 | $ cat >> .hg/hgrc << EOF | |
436 | > [paths] |
|
436 | > [paths] | |
437 | > default-push = ssh://user@dummy/remote |
|
437 | > default-push = ssh://user@dummy/remote | |
438 | > [ui] |
|
438 | > [ui] | |
439 |
> ssh = |
|
439 | > ssh = dummyssh | |
440 | > [extensions] |
|
440 | > [extensions] | |
441 | > localwrite = localwrite.py |
|
441 | > localwrite = localwrite.py | |
442 | > EOF |
|
442 | > EOF | |
443 |
|
443 | |||
444 | $ echo localwrite > foo |
|
444 | $ echo localwrite > foo | |
445 | $ hg commit -m 'testing localwrite' |
|
445 | $ hg commit -m 'testing localwrite' | |
446 | $ hg push |
|
446 | $ hg push | |
447 | pushing to ssh://user@dummy/remote |
|
447 | pushing to ssh://user@dummy/remote | |
448 | searching for changes |
|
448 | searching for changes | |
449 | remote: adding changesets |
|
449 | remote: adding changesets | |
450 | remote: adding manifests |
|
450 | remote: adding manifests | |
451 | remote: adding file changes |
|
451 | remote: adding file changes | |
452 | remote: added 1 changesets with 1 changes to 1 files |
|
452 | remote: added 1 changesets with 1 changes to 1 files | |
453 | remote: KABOOM |
|
453 | remote: KABOOM | |
454 | local stdout |
|
454 | local stdout | |
455 |
|
455 | |||
456 | debug output |
|
456 | debug output | |
457 |
|
457 | |||
458 | $ hg pull --debug ssh://user@dummy/remote |
|
458 | $ hg pull --debug ssh://user@dummy/remote | |
459 | pulling from ssh://user@dummy/remote |
|
459 | pulling from ssh://user@dummy/remote | |
460 |
running |
|
460 | running dummyssh user@dummy 'hg -R remote serve --stdio' | |
461 | sending hello command |
|
461 | sending hello command | |
462 | sending between command |
|
462 | sending between command | |
463 | remote: 286 |
|
463 | remote: 286 | |
464 | remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 |
|
464 | remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 | |
465 | remote: 1 |
|
465 | remote: 1 | |
466 | preparing listkeys for "bookmarks" |
|
466 | preparing listkeys for "bookmarks" | |
467 | sending listkeys command |
|
467 | sending listkeys command | |
468 | received listkey for "bookmarks": 45 bytes |
|
468 | received listkey for "bookmarks": 45 bytes | |
469 | query 1; heads |
|
469 | query 1; heads | |
470 | sending batch command |
|
470 | sending batch command | |
471 | searching for changes |
|
471 | searching for changes | |
472 | all remote heads known locally |
|
472 | all remote heads known locally | |
473 | no changes found |
|
473 | no changes found | |
474 | preparing listkeys for "phases" |
|
474 | preparing listkeys for "phases" | |
475 | sending listkeys command |
|
475 | sending listkeys command | |
476 | received listkey for "phases": 15 bytes |
|
476 | received listkey for "phases": 15 bytes | |
477 | checking for updated bookmarks |
|
477 | checking for updated bookmarks | |
478 |
|
478 | |||
479 | $ cd .. |
|
479 | $ cd .. | |
480 |
|
480 | |||
481 | $ cat dummylog |
|
481 | $ cat dummylog | |
482 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
482 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
483 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio |
|
483 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio | |
484 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
484 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
485 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio |
|
485 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio | |
486 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
486 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
487 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
487 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
488 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio |
|
488 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio | |
489 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
489 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
490 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
490 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
491 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
491 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio | |
492 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
492 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
493 | changegroup-in-remote hook: HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
493 | changegroup-in-remote hook: HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
494 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
494 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
495 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
495 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
496 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
496 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
497 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
497 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
498 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
498 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
499 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
499 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
500 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
500 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
501 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
501 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
502 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
502 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
503 | changegroup-in-remote hook: HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
503 | changegroup-in-remote hook: HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
504 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
504 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
505 | Got arguments 1:user@dummy 2:hg init 'a repo' |
|
505 | Got arguments 1:user@dummy 2:hg init 'a repo' | |
506 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
506 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
507 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
507 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
508 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
508 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
509 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
509 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
510 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
510 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
511 | changegroup-in-remote hook: HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
511 | changegroup-in-remote hook: HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
512 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
512 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
@@ -1,195 +1,195 b'' | |||||
1 | This test tries to exercise the ssh functionality with a dummy script |
|
1 | This test tries to exercise the ssh functionality with a dummy script | |
2 |
|
2 | |||
3 | creating 'remote' repo |
|
3 | creating 'remote' repo | |
4 |
|
4 | |||
5 | $ hg init remote |
|
5 | $ hg init remote | |
6 | $ cd remote |
|
6 | $ cd remote | |
7 | $ hg unbundle "$TESTDIR/bundles/remote.hg" |
|
7 | $ hg unbundle "$TESTDIR/bundles/remote.hg" | |
8 | adding changesets |
|
8 | adding changesets | |
9 | adding manifests |
|
9 | adding manifests | |
10 | adding file changes |
|
10 | adding file changes | |
11 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
11 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
12 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
12 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
13 | $ hg up tip |
|
13 | $ hg up tip | |
14 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
14 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
15 | $ cd .. |
|
15 | $ cd .. | |
16 |
|
16 | |||
17 | clone remote via stream |
|
17 | clone remote via stream | |
18 |
|
18 | |||
19 | $ for i in 0 1 2 3 4 5 6 7 8; do |
|
19 | $ for i in 0 1 2 3 4 5 6 7 8; do | |
20 |
> hg clone -e |
|
20 | > hg clone -e dummyssh --uncompressed -r "$i" ssh://user@dummy/remote test-"$i" | |
21 | > if cd test-"$i"; then |
|
21 | > if cd test-"$i"; then | |
22 | > hg verify |
|
22 | > hg verify | |
23 | > cd .. |
|
23 | > cd .. | |
24 | > fi |
|
24 | > fi | |
25 | > done |
|
25 | > done | |
26 | adding changesets |
|
26 | adding changesets | |
27 | adding manifests |
|
27 | adding manifests | |
28 | adding file changes |
|
28 | adding file changes | |
29 | added 1 changesets with 1 changes to 1 files |
|
29 | added 1 changesets with 1 changes to 1 files | |
30 | updating to branch default |
|
30 | updating to branch default | |
31 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
31 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
32 | checking changesets |
|
32 | checking changesets | |
33 | checking manifests |
|
33 | checking manifests | |
34 | crosschecking files in changesets and manifests |
|
34 | crosschecking files in changesets and manifests | |
35 | checking files |
|
35 | checking files | |
36 | 1 files, 1 changesets, 1 total revisions |
|
36 | 1 files, 1 changesets, 1 total revisions | |
37 | adding changesets |
|
37 | adding changesets | |
38 | adding manifests |
|
38 | adding manifests | |
39 | adding file changes |
|
39 | adding file changes | |
40 | added 2 changesets with 2 changes to 1 files |
|
40 | added 2 changesets with 2 changes to 1 files | |
41 | updating to branch default |
|
41 | updating to branch default | |
42 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
42 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
43 | checking changesets |
|
43 | checking changesets | |
44 | checking manifests |
|
44 | checking manifests | |
45 | crosschecking files in changesets and manifests |
|
45 | crosschecking files in changesets and manifests | |
46 | checking files |
|
46 | checking files | |
47 | 1 files, 2 changesets, 2 total revisions |
|
47 | 1 files, 2 changesets, 2 total revisions | |
48 | adding changesets |
|
48 | adding changesets | |
49 | adding manifests |
|
49 | adding manifests | |
50 | adding file changes |
|
50 | adding file changes | |
51 | added 3 changesets with 3 changes to 1 files |
|
51 | added 3 changesets with 3 changes to 1 files | |
52 | updating to branch default |
|
52 | updating to branch default | |
53 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
53 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
54 | checking changesets |
|
54 | checking changesets | |
55 | checking manifests |
|
55 | checking manifests | |
56 | crosschecking files in changesets and manifests |
|
56 | crosschecking files in changesets and manifests | |
57 | checking files |
|
57 | checking files | |
58 | 1 files, 3 changesets, 3 total revisions |
|
58 | 1 files, 3 changesets, 3 total revisions | |
59 | adding changesets |
|
59 | adding changesets | |
60 | adding manifests |
|
60 | adding manifests | |
61 | adding file changes |
|
61 | adding file changes | |
62 | added 4 changesets with 4 changes to 1 files |
|
62 | added 4 changesets with 4 changes to 1 files | |
63 | updating to branch default |
|
63 | updating to branch default | |
64 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
64 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
65 | checking changesets |
|
65 | checking changesets | |
66 | checking manifests |
|
66 | checking manifests | |
67 | crosschecking files in changesets and manifests |
|
67 | crosschecking files in changesets and manifests | |
68 | checking files |
|
68 | checking files | |
69 | 1 files, 4 changesets, 4 total revisions |
|
69 | 1 files, 4 changesets, 4 total revisions | |
70 | adding changesets |
|
70 | adding changesets | |
71 | adding manifests |
|
71 | adding manifests | |
72 | adding file changes |
|
72 | adding file changes | |
73 | added 2 changesets with 2 changes to 1 files |
|
73 | added 2 changesets with 2 changes to 1 files | |
74 | updating to branch default |
|
74 | updating to branch default | |
75 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
75 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
76 | checking changesets |
|
76 | checking changesets | |
77 | checking manifests |
|
77 | checking manifests | |
78 | crosschecking files in changesets and manifests |
|
78 | crosschecking files in changesets and manifests | |
79 | checking files |
|
79 | checking files | |
80 | 1 files, 2 changesets, 2 total revisions |
|
80 | 1 files, 2 changesets, 2 total revisions | |
81 | adding changesets |
|
81 | adding changesets | |
82 | adding manifests |
|
82 | adding manifests | |
83 | adding file changes |
|
83 | adding file changes | |
84 | added 3 changesets with 3 changes to 1 files |
|
84 | added 3 changesets with 3 changes to 1 files | |
85 | updating to branch default |
|
85 | updating to branch default | |
86 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
86 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
87 | checking changesets |
|
87 | checking changesets | |
88 | checking manifests |
|
88 | checking manifests | |
89 | crosschecking files in changesets and manifests |
|
89 | crosschecking files in changesets and manifests | |
90 | checking files |
|
90 | checking files | |
91 | 1 files, 3 changesets, 3 total revisions |
|
91 | 1 files, 3 changesets, 3 total revisions | |
92 | adding changesets |
|
92 | adding changesets | |
93 | adding manifests |
|
93 | adding manifests | |
94 | adding file changes |
|
94 | adding file changes | |
95 | added 4 changesets with 5 changes to 2 files |
|
95 | added 4 changesets with 5 changes to 2 files | |
96 | updating to branch default |
|
96 | updating to branch default | |
97 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
97 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
98 | checking changesets |
|
98 | checking changesets | |
99 | checking manifests |
|
99 | checking manifests | |
100 | crosschecking files in changesets and manifests |
|
100 | crosschecking files in changesets and manifests | |
101 | checking files |
|
101 | checking files | |
102 | 2 files, 4 changesets, 5 total revisions |
|
102 | 2 files, 4 changesets, 5 total revisions | |
103 | adding changesets |
|
103 | adding changesets | |
104 | adding manifests |
|
104 | adding manifests | |
105 | adding file changes |
|
105 | adding file changes | |
106 | added 5 changesets with 6 changes to 3 files |
|
106 | added 5 changesets with 6 changes to 3 files | |
107 | updating to branch default |
|
107 | updating to branch default | |
108 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
108 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
109 | checking changesets |
|
109 | checking changesets | |
110 | checking manifests |
|
110 | checking manifests | |
111 | crosschecking files in changesets and manifests |
|
111 | crosschecking files in changesets and manifests | |
112 | checking files |
|
112 | checking files | |
113 | 3 files, 5 changesets, 6 total revisions |
|
113 | 3 files, 5 changesets, 6 total revisions | |
114 | adding changesets |
|
114 | adding changesets | |
115 | adding manifests |
|
115 | adding manifests | |
116 | adding file changes |
|
116 | adding file changes | |
117 | added 5 changesets with 5 changes to 2 files |
|
117 | added 5 changesets with 5 changes to 2 files | |
118 | updating to branch default |
|
118 | updating to branch default | |
119 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
119 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
120 | checking changesets |
|
120 | checking changesets | |
121 | checking manifests |
|
121 | checking manifests | |
122 | crosschecking files in changesets and manifests |
|
122 | crosschecking files in changesets and manifests | |
123 | checking files |
|
123 | checking files | |
124 | 2 files, 5 changesets, 5 total revisions |
|
124 | 2 files, 5 changesets, 5 total revisions | |
125 | $ cd test-8 |
|
125 | $ cd test-8 | |
126 | $ hg pull ../test-7 |
|
126 | $ hg pull ../test-7 | |
127 | pulling from ../test-7 |
|
127 | pulling from ../test-7 | |
128 | searching for changes |
|
128 | searching for changes | |
129 | adding changesets |
|
129 | adding changesets | |
130 | adding manifests |
|
130 | adding manifests | |
131 | adding file changes |
|
131 | adding file changes | |
132 | added 4 changesets with 2 changes to 3 files (+1 heads) |
|
132 | added 4 changesets with 2 changes to 3 files (+1 heads) | |
133 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
133 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
134 | $ hg verify |
|
134 | $ hg verify | |
135 | checking changesets |
|
135 | checking changesets | |
136 | checking manifests |
|
136 | checking manifests | |
137 | crosschecking files in changesets and manifests |
|
137 | crosschecking files in changesets and manifests | |
138 | checking files |
|
138 | checking files | |
139 | 4 files, 9 changesets, 7 total revisions |
|
139 | 4 files, 9 changesets, 7 total revisions | |
140 | $ cd .. |
|
140 | $ cd .. | |
141 | $ cd test-1 |
|
141 | $ cd test-1 | |
142 |
$ hg pull -e |
|
142 | $ hg pull -e dummyssh -r 4 ssh://user@dummy/remote | |
143 | pulling from ssh://user@dummy/remote |
|
143 | pulling from ssh://user@dummy/remote | |
144 | searching for changes |
|
144 | searching for changes | |
145 | adding changesets |
|
145 | adding changesets | |
146 | adding manifests |
|
146 | adding manifests | |
147 | adding file changes |
|
147 | adding file changes | |
148 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
148 | added 1 changesets with 0 changes to 0 files (+1 heads) | |
149 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
149 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
150 | $ hg verify |
|
150 | $ hg verify | |
151 | checking changesets |
|
151 | checking changesets | |
152 | checking manifests |
|
152 | checking manifests | |
153 | crosschecking files in changesets and manifests |
|
153 | crosschecking files in changesets and manifests | |
154 | checking files |
|
154 | checking files | |
155 | 1 files, 3 changesets, 2 total revisions |
|
155 | 1 files, 3 changesets, 2 total revisions | |
156 |
$ hg pull -e |
|
156 | $ hg pull -e dummyssh ssh://user@dummy/remote | |
157 | pulling from ssh://user@dummy/remote |
|
157 | pulling from ssh://user@dummy/remote | |
158 | searching for changes |
|
158 | searching for changes | |
159 | adding changesets |
|
159 | adding changesets | |
160 | adding manifests |
|
160 | adding manifests | |
161 | adding file changes |
|
161 | adding file changes | |
162 | added 6 changesets with 5 changes to 4 files |
|
162 | added 6 changesets with 5 changes to 4 files | |
163 | (run 'hg update' to get a working copy) |
|
163 | (run 'hg update' to get a working copy) | |
164 | $ cd .. |
|
164 | $ cd .. | |
165 | $ cd test-2 |
|
165 | $ cd test-2 | |
166 |
$ hg pull -e |
|
166 | $ hg pull -e dummyssh -r 5 ssh://user@dummy/remote | |
167 | pulling from ssh://user@dummy/remote |
|
167 | pulling from ssh://user@dummy/remote | |
168 | searching for changes |
|
168 | searching for changes | |
169 | adding changesets |
|
169 | adding changesets | |
170 | adding manifests |
|
170 | adding manifests | |
171 | adding file changes |
|
171 | adding file changes | |
172 | added 2 changesets with 0 changes to 0 files (+1 heads) |
|
172 | added 2 changesets with 0 changes to 0 files (+1 heads) | |
173 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
173 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
174 | $ hg verify |
|
174 | $ hg verify | |
175 | checking changesets |
|
175 | checking changesets | |
176 | checking manifests |
|
176 | checking manifests | |
177 | crosschecking files in changesets and manifests |
|
177 | crosschecking files in changesets and manifests | |
178 | checking files |
|
178 | checking files | |
179 | 1 files, 5 changesets, 3 total revisions |
|
179 | 1 files, 5 changesets, 3 total revisions | |
180 |
$ hg pull -e |
|
180 | $ hg pull -e dummyssh ssh://user@dummy/remote | |
181 | pulling from ssh://user@dummy/remote |
|
181 | pulling from ssh://user@dummy/remote | |
182 | searching for changes |
|
182 | searching for changes | |
183 | adding changesets |
|
183 | adding changesets | |
184 | adding manifests |
|
184 | adding manifests | |
185 | adding file changes |
|
185 | adding file changes | |
186 | added 4 changesets with 4 changes to 4 files |
|
186 | added 4 changesets with 4 changes to 4 files | |
187 | (run 'hg update' to get a working copy) |
|
187 | (run 'hg update' to get a working copy) | |
188 | $ hg verify |
|
188 | $ hg verify | |
189 | checking changesets |
|
189 | checking changesets | |
190 | checking manifests |
|
190 | checking manifests | |
191 | crosschecking files in changesets and manifests |
|
191 | crosschecking files in changesets and manifests | |
192 | checking files |
|
192 | checking files | |
193 | 4 files, 9 changesets, 7 total revisions |
|
193 | 4 files, 9 changesets, 7 total revisions | |
194 |
|
194 | |||
195 | $ cd .. |
|
195 | $ cd .. |
@@ -1,503 +1,503 b'' | |||||
1 |
|
1 | |||
2 | This test tries to exercise the ssh functionality with a dummy script |
|
2 | This test tries to exercise the ssh functionality with a dummy script | |
3 |
|
3 | |||
4 | creating 'remote' repo |
|
4 | creating 'remote' repo | |
5 |
|
5 | |||
6 | $ hg init remote |
|
6 | $ hg init remote | |
7 | $ cd remote |
|
7 | $ cd remote | |
8 | $ echo this > foo |
|
8 | $ echo this > foo | |
9 | $ echo this > fooO |
|
9 | $ echo this > fooO | |
10 | $ hg ci -A -m "init" foo fooO |
|
10 | $ hg ci -A -m "init" foo fooO | |
11 |
|
11 | |||
12 | insert a closed branch (issue4428) |
|
12 | insert a closed branch (issue4428) | |
13 |
|
13 | |||
14 | $ hg up null |
|
14 | $ hg up null | |
15 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
15 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
16 | $ hg branch closed |
|
16 | $ hg branch closed | |
17 | marked working directory as branch closed |
|
17 | marked working directory as branch closed | |
18 | (branches are permanent and global, did you want a bookmark?) |
|
18 | (branches are permanent and global, did you want a bookmark?) | |
19 | $ hg ci -mc0 |
|
19 | $ hg ci -mc0 | |
20 | $ hg ci --close-branch -mc1 |
|
20 | $ hg ci --close-branch -mc1 | |
21 | $ hg up -q default |
|
21 | $ hg up -q default | |
22 |
|
22 | |||
23 | configure for serving |
|
23 | configure for serving | |
24 |
|
24 | |||
25 | $ cat <<EOF > .hg/hgrc |
|
25 | $ cat <<EOF > .hg/hgrc | |
26 | > [server] |
|
26 | > [server] | |
27 | > uncompressed = True |
|
27 | > uncompressed = True | |
28 | > |
|
28 | > | |
29 | > [hooks] |
|
29 | > [hooks] | |
30 | > changegroup = python "$TESTDIR/printenv.py" changegroup-in-remote 0 ../dummylog |
|
30 | > changegroup = python "$TESTDIR/printenv.py" changegroup-in-remote 0 ../dummylog | |
31 | > EOF |
|
31 | > EOF | |
32 | $ cd .. |
|
32 | $ cd .. | |
33 |
|
33 | |||
34 | repo not found error |
|
34 | repo not found error | |
35 |
|
35 | |||
36 |
$ hg clone -e |
|
36 | $ hg clone -e dummyssh ssh://user@dummy/nonexistent local | |
37 | remote: abort: there is no Mercurial repository here (.hg not found)! |
|
37 | remote: abort: there is no Mercurial repository here (.hg not found)! | |
38 | abort: no suitable response from remote hg! |
|
38 | abort: no suitable response from remote hg! | |
39 | [255] |
|
39 | [255] | |
40 |
|
40 | |||
41 | non-existent absolute path |
|
41 | non-existent absolute path | |
42 |
|
42 | |||
43 |
$ hg clone -e |
|
43 | $ hg clone -e dummyssh ssh://user@dummy//`pwd`/nonexistent local | |
44 | remote: abort: there is no Mercurial repository here (.hg not found)! |
|
44 | remote: abort: there is no Mercurial repository here (.hg not found)! | |
45 | abort: no suitable response from remote hg! |
|
45 | abort: no suitable response from remote hg! | |
46 | [255] |
|
46 | [255] | |
47 |
|
47 | |||
48 | clone remote via stream |
|
48 | clone remote via stream | |
49 |
|
49 | |||
50 |
$ hg clone -e |
|
50 | $ hg clone -e dummyssh --uncompressed ssh://user@dummy/remote local-stream | |
51 | streaming all changes |
|
51 | streaming all changes | |
52 | 4 files to transfer, 615 bytes of data |
|
52 | 4 files to transfer, 615 bytes of data | |
53 | transferred 615 bytes in * seconds (*) (glob) |
|
53 | transferred 615 bytes in * seconds (*) (glob) | |
54 | searching for changes |
|
54 | searching for changes | |
55 | no changes found |
|
55 | no changes found | |
56 | updating to branch default |
|
56 | updating to branch default | |
57 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
57 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
58 | $ cd local-stream |
|
58 | $ cd local-stream | |
59 | $ hg verify |
|
59 | $ hg verify | |
60 | checking changesets |
|
60 | checking changesets | |
61 | checking manifests |
|
61 | checking manifests | |
62 | crosschecking files in changesets and manifests |
|
62 | crosschecking files in changesets and manifests | |
63 | checking files |
|
63 | checking files | |
64 | 2 files, 3 changesets, 2 total revisions |
|
64 | 2 files, 3 changesets, 2 total revisions | |
65 | $ hg branches |
|
65 | $ hg branches | |
66 | default 0:1160648e36ce |
|
66 | default 0:1160648e36ce | |
67 | $ cd .. |
|
67 | $ cd .. | |
68 |
|
68 | |||
69 | clone bookmarks via stream |
|
69 | clone bookmarks via stream | |
70 |
|
70 | |||
71 | $ hg -R local-stream book mybook |
|
71 | $ hg -R local-stream book mybook | |
72 |
$ hg clone -e |
|
72 | $ hg clone -e dummyssh --uncompressed ssh://user@dummy/local-stream stream2 | |
73 | streaming all changes |
|
73 | streaming all changes | |
74 | 4 files to transfer, 615 bytes of data |
|
74 | 4 files to transfer, 615 bytes of data | |
75 | transferred 615 bytes in * seconds (*) (glob) |
|
75 | transferred 615 bytes in * seconds (*) (glob) | |
76 | searching for changes |
|
76 | searching for changes | |
77 | no changes found |
|
77 | no changes found | |
78 | updating to branch default |
|
78 | updating to branch default | |
79 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
79 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
80 | $ cd stream2 |
|
80 | $ cd stream2 | |
81 | $ hg book |
|
81 | $ hg book | |
82 | mybook 0:1160648e36ce |
|
82 | mybook 0:1160648e36ce | |
83 | $ cd .. |
|
83 | $ cd .. | |
84 | $ rm -rf local-stream stream2 |
|
84 | $ rm -rf local-stream stream2 | |
85 |
|
85 | |||
86 | clone remote via pull |
|
86 | clone remote via pull | |
87 |
|
87 | |||
88 |
$ hg clone -e |
|
88 | $ hg clone -e dummyssh ssh://user@dummy/remote local | |
89 | requesting all changes |
|
89 | requesting all changes | |
90 | adding changesets |
|
90 | adding changesets | |
91 | adding manifests |
|
91 | adding manifests | |
92 | adding file changes |
|
92 | adding file changes | |
93 | added 3 changesets with 2 changes to 2 files |
|
93 | added 3 changesets with 2 changes to 2 files | |
94 | updating to branch default |
|
94 | updating to branch default | |
95 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
95 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
96 |
|
96 | |||
97 | verify |
|
97 | verify | |
98 |
|
98 | |||
99 | $ cd local |
|
99 | $ cd local | |
100 | $ hg verify |
|
100 | $ hg verify | |
101 | checking changesets |
|
101 | checking changesets | |
102 | checking manifests |
|
102 | checking manifests | |
103 | crosschecking files in changesets and manifests |
|
103 | crosschecking files in changesets and manifests | |
104 | checking files |
|
104 | checking files | |
105 | 2 files, 3 changesets, 2 total revisions |
|
105 | 2 files, 3 changesets, 2 total revisions | |
106 | $ echo '[hooks]' >> .hg/hgrc |
|
106 | $ echo '[hooks]' >> .hg/hgrc | |
107 | $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup-in-local 0 ../dummylog" >> .hg/hgrc |
|
107 | $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup-in-local 0 ../dummylog" >> .hg/hgrc | |
108 |
|
108 | |||
109 | empty default pull |
|
109 | empty default pull | |
110 |
|
110 | |||
111 | $ hg paths |
|
111 | $ hg paths | |
112 | default = ssh://user@dummy/remote |
|
112 | default = ssh://user@dummy/remote | |
113 |
$ hg pull -e |
|
113 | $ hg pull -e dummyssh | |
114 | pulling from ssh://user@dummy/remote |
|
114 | pulling from ssh://user@dummy/remote | |
115 | searching for changes |
|
115 | searching for changes | |
116 | no changes found |
|
116 | no changes found | |
117 |
|
117 | |||
118 | pull from wrong ssh URL |
|
118 | pull from wrong ssh URL | |
119 |
|
119 | |||
120 |
$ hg pull -e |
|
120 | $ hg pull -e dummyssh ssh://user@dummy/doesnotexist | |
121 | pulling from ssh://user@dummy/doesnotexist |
|
121 | pulling from ssh://user@dummy/doesnotexist | |
122 | remote: abort: there is no Mercurial repository here (.hg not found)! |
|
122 | remote: abort: there is no Mercurial repository here (.hg not found)! | |
123 | abort: no suitable response from remote hg! |
|
123 | abort: no suitable response from remote hg! | |
124 | [255] |
|
124 | [255] | |
125 |
|
125 | |||
126 | local change |
|
126 | local change | |
127 |
|
127 | |||
128 | $ echo bleah > foo |
|
128 | $ echo bleah > foo | |
129 | $ hg ci -m "add" |
|
129 | $ hg ci -m "add" | |
130 |
|
130 | |||
131 | updating rc |
|
131 | updating rc | |
132 |
|
132 | |||
133 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
133 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
134 | $ echo "[ui]" >> .hg/hgrc |
|
134 | $ echo "[ui]" >> .hg/hgrc | |
135 |
$ echo "ssh = |
|
135 | $ echo "ssh = dummyssh" >> .hg/hgrc | |
136 |
|
136 | |||
137 | find outgoing |
|
137 | find outgoing | |
138 |
|
138 | |||
139 | $ hg out ssh://user@dummy/remote |
|
139 | $ hg out ssh://user@dummy/remote | |
140 | comparing with ssh://user@dummy/remote |
|
140 | comparing with ssh://user@dummy/remote | |
141 | searching for changes |
|
141 | searching for changes | |
142 | changeset: 3:a28a9d1a809c |
|
142 | changeset: 3:a28a9d1a809c | |
143 | tag: tip |
|
143 | tag: tip | |
144 | parent: 0:1160648e36ce |
|
144 | parent: 0:1160648e36ce | |
145 | user: test |
|
145 | user: test | |
146 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
146 | date: Thu Jan 01 00:00:00 1970 +0000 | |
147 | summary: add |
|
147 | summary: add | |
148 |
|
148 | |||
149 |
|
149 | |||
150 | find incoming on the remote side |
|
150 | find incoming on the remote side | |
151 |
|
151 | |||
152 |
$ hg incoming -R ../remote -e |
|
152 | $ hg incoming -R ../remote -e dummyssh ssh://user@dummy/local | |
153 | comparing with ssh://user@dummy/local |
|
153 | comparing with ssh://user@dummy/local | |
154 | searching for changes |
|
154 | searching for changes | |
155 | changeset: 3:a28a9d1a809c |
|
155 | changeset: 3:a28a9d1a809c | |
156 | tag: tip |
|
156 | tag: tip | |
157 | parent: 0:1160648e36ce |
|
157 | parent: 0:1160648e36ce | |
158 | user: test |
|
158 | user: test | |
159 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
159 | date: Thu Jan 01 00:00:00 1970 +0000 | |
160 | summary: add |
|
160 | summary: add | |
161 |
|
161 | |||
162 |
|
162 | |||
163 | find incoming on the remote side (using absolute path) |
|
163 | find incoming on the remote side (using absolute path) | |
164 |
|
164 | |||
165 |
$ hg incoming -R ../remote -e |
|
165 | $ hg incoming -R ../remote -e dummyssh "ssh://user@dummy/`pwd`" | |
166 | comparing with ssh://user@dummy/$TESTTMP/local |
|
166 | comparing with ssh://user@dummy/$TESTTMP/local | |
167 | searching for changes |
|
167 | searching for changes | |
168 | changeset: 3:a28a9d1a809c |
|
168 | changeset: 3:a28a9d1a809c | |
169 | tag: tip |
|
169 | tag: tip | |
170 | parent: 0:1160648e36ce |
|
170 | parent: 0:1160648e36ce | |
171 | user: test |
|
171 | user: test | |
172 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
172 | date: Thu Jan 01 00:00:00 1970 +0000 | |
173 | summary: add |
|
173 | summary: add | |
174 |
|
174 | |||
175 |
|
175 | |||
176 | push |
|
176 | push | |
177 |
|
177 | |||
178 | $ hg push |
|
178 | $ hg push | |
179 | pushing to ssh://user@dummy/remote |
|
179 | pushing to ssh://user@dummy/remote | |
180 | searching for changes |
|
180 | searching for changes | |
181 | remote: adding changesets |
|
181 | remote: adding changesets | |
182 | remote: adding manifests |
|
182 | remote: adding manifests | |
183 | remote: adding file changes |
|
183 | remote: adding file changes | |
184 | remote: added 1 changesets with 1 changes to 1 files |
|
184 | remote: added 1 changesets with 1 changes to 1 files | |
185 | $ cd ../remote |
|
185 | $ cd ../remote | |
186 |
|
186 | |||
187 | check remote tip |
|
187 | check remote tip | |
188 |
|
188 | |||
189 | $ hg tip |
|
189 | $ hg tip | |
190 | changeset: 3:a28a9d1a809c |
|
190 | changeset: 3:a28a9d1a809c | |
191 | tag: tip |
|
191 | tag: tip | |
192 | parent: 0:1160648e36ce |
|
192 | parent: 0:1160648e36ce | |
193 | user: test |
|
193 | user: test | |
194 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
194 | date: Thu Jan 01 00:00:00 1970 +0000 | |
195 | summary: add |
|
195 | summary: add | |
196 |
|
196 | |||
197 | $ hg verify |
|
197 | $ hg verify | |
198 | checking changesets |
|
198 | checking changesets | |
199 | checking manifests |
|
199 | checking manifests | |
200 | crosschecking files in changesets and manifests |
|
200 | crosschecking files in changesets and manifests | |
201 | checking files |
|
201 | checking files | |
202 | 2 files, 4 changesets, 3 total revisions |
|
202 | 2 files, 4 changesets, 3 total revisions | |
203 | $ hg cat -r tip foo |
|
203 | $ hg cat -r tip foo | |
204 | bleah |
|
204 | bleah | |
205 | $ echo z > z |
|
205 | $ echo z > z | |
206 | $ hg ci -A -m z z |
|
206 | $ hg ci -A -m z z | |
207 | created new head |
|
207 | created new head | |
208 |
|
208 | |||
209 | test pushkeys and bookmarks |
|
209 | test pushkeys and bookmarks | |
210 |
|
210 | |||
211 | $ cd ../local |
|
211 | $ cd ../local | |
212 |
$ hg debugpushkey --config ui.ssh= |
|
212 | $ hg debugpushkey --config ui.ssh=dummyssh ssh://user@dummy/remote namespaces | |
213 | bookmarks |
|
213 | bookmarks | |
214 | namespaces |
|
214 | namespaces | |
215 | phases |
|
215 | phases | |
216 | $ hg book foo -r 0 |
|
216 | $ hg book foo -r 0 | |
217 | $ hg out -B |
|
217 | $ hg out -B | |
218 | comparing with ssh://user@dummy/remote |
|
218 | comparing with ssh://user@dummy/remote | |
219 | searching for changed bookmarks |
|
219 | searching for changed bookmarks | |
220 | foo 1160648e36ce |
|
220 | foo 1160648e36ce | |
221 | $ hg push -B foo |
|
221 | $ hg push -B foo | |
222 | pushing to ssh://user@dummy/remote |
|
222 | pushing to ssh://user@dummy/remote | |
223 | searching for changes |
|
223 | searching for changes | |
224 | no changes found |
|
224 | no changes found | |
225 | exporting bookmark foo |
|
225 | exporting bookmark foo | |
226 | [1] |
|
226 | [1] | |
227 |
$ hg debugpushkey --config ui.ssh= |
|
227 | $ hg debugpushkey --config ui.ssh=dummyssh ssh://user@dummy/remote bookmarks | |
228 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
228 | foo 1160648e36cec0054048a7edc4110c6f84fde594 | |
229 | $ hg book -f foo |
|
229 | $ hg book -f foo | |
230 | $ hg push --traceback |
|
230 | $ hg push --traceback | |
231 | pushing to ssh://user@dummy/remote |
|
231 | pushing to ssh://user@dummy/remote | |
232 | searching for changes |
|
232 | searching for changes | |
233 | no changes found |
|
233 | no changes found | |
234 | updating bookmark foo |
|
234 | updating bookmark foo | |
235 | [1] |
|
235 | [1] | |
236 | $ hg book -d foo |
|
236 | $ hg book -d foo | |
237 | $ hg in -B |
|
237 | $ hg in -B | |
238 | comparing with ssh://user@dummy/remote |
|
238 | comparing with ssh://user@dummy/remote | |
239 | searching for changed bookmarks |
|
239 | searching for changed bookmarks | |
240 | foo a28a9d1a809c |
|
240 | foo a28a9d1a809c | |
241 | $ hg book -f -r 0 foo |
|
241 | $ hg book -f -r 0 foo | |
242 | $ hg pull -B foo |
|
242 | $ hg pull -B foo | |
243 | pulling from ssh://user@dummy/remote |
|
243 | pulling from ssh://user@dummy/remote | |
244 | no changes found |
|
244 | no changes found | |
245 | updating bookmark foo |
|
245 | updating bookmark foo | |
246 | $ hg book -d foo |
|
246 | $ hg book -d foo | |
247 | $ hg push -B foo |
|
247 | $ hg push -B foo | |
248 | pushing to ssh://user@dummy/remote |
|
248 | pushing to ssh://user@dummy/remote | |
249 | searching for changes |
|
249 | searching for changes | |
250 | no changes found |
|
250 | no changes found | |
251 | deleting remote bookmark foo |
|
251 | deleting remote bookmark foo | |
252 | [1] |
|
252 | [1] | |
253 |
|
253 | |||
254 | a bad, evil hook that prints to stdout |
|
254 | a bad, evil hook that prints to stdout | |
255 |
|
255 | |||
256 | $ cat <<EOF > $TESTTMP/badhook |
|
256 | $ cat <<EOF > $TESTTMP/badhook | |
257 | > import sys |
|
257 | > import sys | |
258 | > sys.stdout.write("KABOOM\n") |
|
258 | > sys.stdout.write("KABOOM\n") | |
259 | > EOF |
|
259 | > EOF | |
260 |
|
260 | |||
261 | $ echo '[hooks]' >> ../remote/.hg/hgrc |
|
261 | $ echo '[hooks]' >> ../remote/.hg/hgrc | |
262 | $ echo "changegroup.stdout = python $TESTTMP/badhook" >> ../remote/.hg/hgrc |
|
262 | $ echo "changegroup.stdout = python $TESTTMP/badhook" >> ../remote/.hg/hgrc | |
263 | $ echo r > r |
|
263 | $ echo r > r | |
264 | $ hg ci -A -m z r |
|
264 | $ hg ci -A -m z r | |
265 |
|
265 | |||
266 | push should succeed even though it has an unexpected response |
|
266 | push should succeed even though it has an unexpected response | |
267 |
|
267 | |||
268 | $ hg push |
|
268 | $ hg push | |
269 | pushing to ssh://user@dummy/remote |
|
269 | pushing to ssh://user@dummy/remote | |
270 | searching for changes |
|
270 | searching for changes | |
271 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
271 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
272 | remote: adding changesets |
|
272 | remote: adding changesets | |
273 | remote: adding manifests |
|
273 | remote: adding manifests | |
274 | remote: adding file changes |
|
274 | remote: adding file changes | |
275 | remote: added 1 changesets with 1 changes to 1 files |
|
275 | remote: added 1 changesets with 1 changes to 1 files | |
276 | remote: KABOOM |
|
276 | remote: KABOOM | |
277 | $ hg -R ../remote heads |
|
277 | $ hg -R ../remote heads | |
278 | changeset: 5:1383141674ec |
|
278 | changeset: 5:1383141674ec | |
279 | tag: tip |
|
279 | tag: tip | |
280 | parent: 3:a28a9d1a809c |
|
280 | parent: 3:a28a9d1a809c | |
281 | user: test |
|
281 | user: test | |
282 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
282 | date: Thu Jan 01 00:00:00 1970 +0000 | |
283 | summary: z |
|
283 | summary: z | |
284 |
|
284 | |||
285 | changeset: 4:6c0482d977a3 |
|
285 | changeset: 4:6c0482d977a3 | |
286 | parent: 0:1160648e36ce |
|
286 | parent: 0:1160648e36ce | |
287 | user: test |
|
287 | user: test | |
288 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
288 | date: Thu Jan 01 00:00:00 1970 +0000 | |
289 | summary: z |
|
289 | summary: z | |
290 |
|
290 | |||
291 |
|
291 | |||
292 | clone bookmarks |
|
292 | clone bookmarks | |
293 |
|
293 | |||
294 | $ hg -R ../remote bookmark test |
|
294 | $ hg -R ../remote bookmark test | |
295 | $ hg -R ../remote bookmarks |
|
295 | $ hg -R ../remote bookmarks | |
296 | * test 4:6c0482d977a3 |
|
296 | * test 4:6c0482d977a3 | |
297 |
$ hg clone -e |
|
297 | $ hg clone -e dummyssh ssh://user@dummy/remote local-bookmarks | |
298 | requesting all changes |
|
298 | requesting all changes | |
299 | adding changesets |
|
299 | adding changesets | |
300 | adding manifests |
|
300 | adding manifests | |
301 | adding file changes |
|
301 | adding file changes | |
302 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
302 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
303 | updating to branch default |
|
303 | updating to branch default | |
304 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
304 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
305 | $ hg -R local-bookmarks bookmarks |
|
305 | $ hg -R local-bookmarks bookmarks | |
306 | test 4:6c0482d977a3 |
|
306 | test 4:6c0482d977a3 | |
307 |
|
307 | |||
308 | passwords in ssh urls are not supported |
|
308 | passwords in ssh urls are not supported | |
309 | (we use a glob here because different Python versions give different |
|
309 | (we use a glob here because different Python versions give different | |
310 | results here) |
|
310 | results here) | |
311 |
|
311 | |||
312 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
312 | $ hg push ssh://user:erroneouspwd@dummy/remote | |
313 | pushing to ssh://user:*@dummy/remote (glob) |
|
313 | pushing to ssh://user:*@dummy/remote (glob) | |
314 | abort: password in URL not supported! |
|
314 | abort: password in URL not supported! | |
315 | [255] |
|
315 | [255] | |
316 |
|
316 | |||
317 | $ cd .. |
|
317 | $ cd .. | |
318 |
|
318 | |||
319 | hide outer repo |
|
319 | hide outer repo | |
320 | $ hg init |
|
320 | $ hg init | |
321 |
|
321 | |||
322 | Test remote paths with spaces (issue2983): |
|
322 | Test remote paths with spaces (issue2983): | |
323 |
|
323 | |||
324 |
$ hg init --ssh |
|
324 | $ hg init --ssh dummyssh "ssh://user@dummy/a repo" | |
325 |
$ |
|
325 | $ touch "$TESTTMP/a repo/test" | |
326 |
$ |
|
326 | $ hg -R 'a repo' commit -A -m "test" | |
327 | adding test |
|
327 | adding test | |
328 | $ hg -R 'a repo' tag tag |
|
328 | $ hg -R 'a repo' tag tag | |
329 |
$ hg id --ssh |
|
329 | $ hg id --ssh dummyssh "ssh://user@dummy/a repo" | |
330 | 73649e48688a |
|
330 | 73649e48688a | |
331 |
|
331 | |||
332 |
$ hg id --ssh |
|
332 | $ hg id --ssh dummyssh "ssh://user@dummy/a repo#noNoNO" | |
333 | abort: unknown revision 'noNoNO'! |
|
333 | abort: unknown revision 'noNoNO'! | |
334 | [255] |
|
334 | [255] | |
335 |
|
335 | |||
336 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
|
336 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): | |
337 |
|
337 | |||
338 |
$ hg clone --ssh |
|
338 | $ hg clone --ssh dummyssh "ssh://user@dummy/a repo" | |
339 | destination directory: a repo |
|
339 | destination directory: a repo | |
340 | abort: destination 'a repo' is not empty |
|
340 | abort: destination 'a repo' is not empty | |
341 | [255] |
|
341 | [255] | |
342 |
|
342 | |||
343 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
|
343 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might | |
344 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right |
|
344 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right | |
345 | parameters: |
|
345 | parameters: | |
346 |
|
346 | |||
347 | $ cat > ssh.sh << EOF |
|
347 | $ cat > ssh.sh << EOF | |
348 | > userhost="\$1" |
|
348 | > userhost="\$1" | |
349 | > SSH_ORIGINAL_COMMAND="\$2" |
|
349 | > SSH_ORIGINAL_COMMAND="\$2" | |
350 | > export SSH_ORIGINAL_COMMAND |
|
350 | > export SSH_ORIGINAL_COMMAND | |
351 | > PYTHONPATH="$PYTHONPATH" |
|
351 | > PYTHONPATH="$PYTHONPATH" | |
352 | > export PYTHONPATH |
|
352 | > export PYTHONPATH | |
353 | > python "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
|
353 | > python "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" | |
354 | > EOF |
|
354 | > EOF | |
355 |
|
355 | |||
356 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
|
356 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" | |
357 | 73649e48688a |
|
357 | 73649e48688a | |
358 |
|
358 | |||
359 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" |
|
359 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" | |
360 | remote: Illegal repository "$TESTTMP/a'repo" (glob) |
|
360 | remote: Illegal repository "$TESTTMP/a'repo" (glob) | |
361 | abort: no suitable response from remote hg! |
|
361 | abort: no suitable response from remote hg! | |
362 | [255] |
|
362 | [255] | |
363 |
|
363 | |||
364 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" |
|
364 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" | |
365 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" |
|
365 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" | |
366 | abort: no suitable response from remote hg! |
|
366 | abort: no suitable response from remote hg! | |
367 | [255] |
|
367 | [255] | |
368 |
|
368 | |||
369 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" python "$TESTDIR/../contrib/hg-ssh" |
|
369 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" python "$TESTDIR/../contrib/hg-ssh" | |
370 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation |
|
370 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation | |
371 | [255] |
|
371 | [255] | |
372 |
|
372 | |||
373 | Test hg-ssh in read-only mode: |
|
373 | Test hg-ssh in read-only mode: | |
374 |
|
374 | |||
375 | $ cat > ssh.sh << EOF |
|
375 | $ cat > ssh.sh << EOF | |
376 | > userhost="\$1" |
|
376 | > userhost="\$1" | |
377 | > SSH_ORIGINAL_COMMAND="\$2" |
|
377 | > SSH_ORIGINAL_COMMAND="\$2" | |
378 | > export SSH_ORIGINAL_COMMAND |
|
378 | > export SSH_ORIGINAL_COMMAND | |
379 | > PYTHONPATH="$PYTHONPATH" |
|
379 | > PYTHONPATH="$PYTHONPATH" | |
380 | > export PYTHONPATH |
|
380 | > export PYTHONPATH | |
381 | > python "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
|
381 | > python "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" | |
382 | > EOF |
|
382 | > EOF | |
383 |
|
383 | |||
384 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
|
384 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local | |
385 | requesting all changes |
|
385 | requesting all changes | |
386 | adding changesets |
|
386 | adding changesets | |
387 | adding manifests |
|
387 | adding manifests | |
388 | adding file changes |
|
388 | adding file changes | |
389 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
389 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
390 | updating to branch default |
|
390 | updating to branch default | |
391 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
391 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
392 |
|
392 | |||
393 | $ cd read-only-local |
|
393 | $ cd read-only-local | |
394 | $ echo "baz" > bar |
|
394 | $ echo "baz" > bar | |
395 | $ hg ci -A -m "unpushable commit" bar |
|
395 | $ hg ci -A -m "unpushable commit" bar | |
396 | $ hg push --ssh "sh ../ssh.sh" |
|
396 | $ hg push --ssh "sh ../ssh.sh" | |
397 | pushing to ssh://user@dummy/*/remote (glob) |
|
397 | pushing to ssh://user@dummy/*/remote (glob) | |
398 | searching for changes |
|
398 | searching for changes | |
399 | remote: Permission denied |
|
399 | remote: Permission denied | |
400 | abort: pretxnopen.hg-ssh hook failed |
|
400 | abort: pretxnopen.hg-ssh hook failed | |
401 | [255] |
|
401 | [255] | |
402 |
|
402 | |||
403 | $ cd .. |
|
403 | $ cd .. | |
404 |
|
404 | |||
405 | stderr from remote commands should be printed before stdout from local code (issue4336) |
|
405 | stderr from remote commands should be printed before stdout from local code (issue4336) | |
406 |
|
406 | |||
407 | $ hg clone remote stderr-ordering |
|
407 | $ hg clone remote stderr-ordering | |
408 | updating to branch default |
|
408 | updating to branch default | |
409 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
409 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
410 | $ cd stderr-ordering |
|
410 | $ cd stderr-ordering | |
411 | $ cat >> localwrite.py << EOF |
|
411 | $ cat >> localwrite.py << EOF | |
412 | > from mercurial import exchange, extensions |
|
412 | > from mercurial import exchange, extensions | |
413 | > |
|
413 | > | |
414 | > def wrappedpush(orig, repo, *args, **kwargs): |
|
414 | > def wrappedpush(orig, repo, *args, **kwargs): | |
415 | > res = orig(repo, *args, **kwargs) |
|
415 | > res = orig(repo, *args, **kwargs) | |
416 | > repo.ui.write('local stdout\n') |
|
416 | > repo.ui.write('local stdout\n') | |
417 | > return res |
|
417 | > return res | |
418 | > |
|
418 | > | |
419 | > def extsetup(ui): |
|
419 | > def extsetup(ui): | |
420 | > extensions.wrapfunction(exchange, 'push', wrappedpush) |
|
420 | > extensions.wrapfunction(exchange, 'push', wrappedpush) | |
421 | > EOF |
|
421 | > EOF | |
422 |
|
422 | |||
423 | $ cat >> .hg/hgrc << EOF |
|
423 | $ cat >> .hg/hgrc << EOF | |
424 | > [paths] |
|
424 | > [paths] | |
425 | > default-push = ssh://user@dummy/remote |
|
425 | > default-push = ssh://user@dummy/remote | |
426 | > [ui] |
|
426 | > [ui] | |
427 |
> ssh = |
|
427 | > ssh = dummyssh | |
428 | > [extensions] |
|
428 | > [extensions] | |
429 | > localwrite = localwrite.py |
|
429 | > localwrite = localwrite.py | |
430 | > EOF |
|
430 | > EOF | |
431 |
|
431 | |||
432 | $ echo localwrite > foo |
|
432 | $ echo localwrite > foo | |
433 | $ hg commit -m 'testing localwrite' |
|
433 | $ hg commit -m 'testing localwrite' | |
434 | $ hg push |
|
434 | $ hg push | |
435 | pushing to ssh://user@dummy/remote |
|
435 | pushing to ssh://user@dummy/remote | |
436 | searching for changes |
|
436 | searching for changes | |
437 | remote: adding changesets |
|
437 | remote: adding changesets | |
438 | remote: adding manifests |
|
438 | remote: adding manifests | |
439 | remote: adding file changes |
|
439 | remote: adding file changes | |
440 | remote: added 1 changesets with 1 changes to 1 files |
|
440 | remote: added 1 changesets with 1 changes to 1 files | |
441 | remote: KABOOM |
|
441 | remote: KABOOM | |
442 | local stdout |
|
442 | local stdout | |
443 |
|
443 | |||
444 | debug output |
|
444 | debug output | |
445 |
|
445 | |||
446 | $ hg pull --debug ssh://user@dummy/remote |
|
446 | $ hg pull --debug ssh://user@dummy/remote | |
447 | pulling from ssh://user@dummy/remote |
|
447 | pulling from ssh://user@dummy/remote | |
448 |
running |
|
448 | running dummyssh user@dummy 'hg -R remote serve --stdio' | |
449 | sending hello command |
|
449 | sending hello command | |
450 | sending between command |
|
450 | sending between command | |
451 | remote: 286 |
|
451 | remote: 286 | |
452 | remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 |
|
452 | remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 | |
453 | remote: 1 |
|
453 | remote: 1 | |
454 | query 1; heads |
|
454 | query 1; heads | |
455 | sending batch command |
|
455 | sending batch command | |
456 | searching for changes |
|
456 | searching for changes | |
457 | all remote heads known locally |
|
457 | all remote heads known locally | |
458 | no changes found |
|
458 | no changes found | |
459 | sending getbundle command |
|
459 | sending getbundle command | |
460 | bundle2-input-bundle: with-transaction |
|
460 | bundle2-input-bundle: with-transaction | |
461 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
461 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
462 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
462 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
463 | bundle2-input-part: total payload size 45 |
|
463 | bundle2-input-part: total payload size 45 | |
464 | bundle2-input-bundle: 1 parts total |
|
464 | bundle2-input-bundle: 1 parts total | |
465 | checking for updated bookmarks |
|
465 | checking for updated bookmarks | |
466 | preparing listkeys for "phases" |
|
466 | preparing listkeys for "phases" | |
467 | sending listkeys command |
|
467 | sending listkeys command | |
468 | received listkey for "phases": 15 bytes |
|
468 | received listkey for "phases": 15 bytes | |
469 |
|
469 | |||
470 | $ cd .. |
|
470 | $ cd .. | |
471 |
|
471 | |||
472 | $ cat dummylog |
|
472 | $ cat dummylog | |
473 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
473 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
474 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio |
|
474 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio | |
475 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
475 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
476 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio |
|
476 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio | |
477 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
477 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
478 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
478 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
479 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio |
|
479 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio | |
480 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
480 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
481 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
481 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
482 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
482 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio | |
483 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
483 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
484 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
484 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
485 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
485 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
486 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
486 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
487 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
487 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
488 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
488 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
489 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
489 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
490 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
490 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
491 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
491 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
492 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
492 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
493 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
493 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
494 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
494 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
495 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
495 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
496 | Got arguments 1:user@dummy 2:hg init 'a repo' |
|
496 | Got arguments 1:user@dummy 2:hg init 'a repo' | |
497 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
497 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
498 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
498 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
499 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
499 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
500 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
500 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
501 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
501 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
502 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
502 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
503 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
503 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
@@ -1,105 +1,105 b'' | |||||
1 | #require killdaemons |
|
1 | #require killdaemons | |
2 |
|
2 | |||
3 | Preparing the subrepository 'sub' |
|
3 | Preparing the subrepository 'sub' | |
4 |
|
4 | |||
5 | $ hg init sub |
|
5 | $ hg init sub | |
6 | $ echo sub > sub/sub |
|
6 | $ echo sub > sub/sub | |
7 | $ hg add -R sub |
|
7 | $ hg add -R sub | |
8 | adding sub/sub (glob) |
|
8 | adding sub/sub (glob) | |
9 | $ hg commit -R sub -m "sub import" |
|
9 | $ hg commit -R sub -m "sub import" | |
10 |
|
10 | |||
11 | Preparing the 'main' repo which depends on the subrepo 'sub' |
|
11 | Preparing the 'main' repo which depends on the subrepo 'sub' | |
12 |
|
12 | |||
13 | $ hg init main |
|
13 | $ hg init main | |
14 | $ echo main > main/main |
|
14 | $ echo main > main/main | |
15 | $ echo "sub = ../sub" > main/.hgsub |
|
15 | $ echo "sub = ../sub" > main/.hgsub | |
16 | $ hg clone sub main/sub |
|
16 | $ hg clone sub main/sub | |
17 | updating to branch default |
|
17 | updating to branch default | |
18 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
18 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
19 | $ hg add -R main |
|
19 | $ hg add -R main | |
20 | adding main/.hgsub (glob) |
|
20 | adding main/.hgsub (glob) | |
21 | adding main/main (glob) |
|
21 | adding main/main (glob) | |
22 | $ hg commit -R main -m "main import" |
|
22 | $ hg commit -R main -m "main import" | |
23 |
|
23 | |||
24 | Cleaning both repositories, just as a clone -U |
|
24 | Cleaning both repositories, just as a clone -U | |
25 |
|
25 | |||
26 | $ hg up -C -R sub null |
|
26 | $ hg up -C -R sub null | |
27 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
27 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
28 | $ hg up -C -R main null |
|
28 | $ hg up -C -R main null | |
29 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
29 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
30 | $ rm -rf main/sub |
|
30 | $ rm -rf main/sub | |
31 |
|
31 | |||
32 | hide outer repo |
|
32 | hide outer repo | |
33 | $ hg init |
|
33 | $ hg init | |
34 |
|
34 | |||
35 | Serving them both using hgweb |
|
35 | Serving them both using hgweb | |
36 |
|
36 | |||
37 | $ printf '[paths]\n/main = main\nsub = sub\n' > webdir.conf |
|
37 | $ printf '[paths]\n/main = main\nsub = sub\n' > webdir.conf | |
38 | $ hg serve --webdir-conf webdir.conf -a localhost -p $HGPORT \ |
|
38 | $ hg serve --webdir-conf webdir.conf -a localhost -p $HGPORT \ | |
39 | > -A /dev/null -E /dev/null --pid-file hg.pid -d |
|
39 | > -A /dev/null -E /dev/null --pid-file hg.pid -d | |
40 | $ cat hg.pid >> $DAEMON_PIDS |
|
40 | $ cat hg.pid >> $DAEMON_PIDS | |
41 |
|
41 | |||
42 | Clone main from hgweb |
|
42 | Clone main from hgweb | |
43 |
|
43 | |||
44 | $ hg clone "http://localhost:$HGPORT/main" cloned |
|
44 | $ hg clone "http://localhost:$HGPORT/main" cloned | |
45 | requesting all changes |
|
45 | requesting all changes | |
46 | adding changesets |
|
46 | adding changesets | |
47 | adding manifests |
|
47 | adding manifests | |
48 | adding file changes |
|
48 | adding file changes | |
49 | added 1 changesets with 3 changes to 3 files |
|
49 | added 1 changesets with 3 changes to 3 files | |
50 | updating to branch default |
|
50 | updating to branch default | |
51 | cloning subrepo sub from http://localhost:$HGPORT/sub |
|
51 | cloning subrepo sub from http://localhost:$HGPORT/sub | |
52 | requesting all changes |
|
52 | requesting all changes | |
53 | adding changesets |
|
53 | adding changesets | |
54 | adding manifests |
|
54 | adding manifests | |
55 | adding file changes |
|
55 | adding file changes | |
56 | added 1 changesets with 1 changes to 1 files |
|
56 | added 1 changesets with 1 changes to 1 files | |
57 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
57 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
58 |
|
58 | |||
59 | Checking cloned repo ids |
|
59 | Checking cloned repo ids | |
60 |
|
60 | |||
61 | $ hg id -R cloned |
|
61 | $ hg id -R cloned | |
62 | fdfeeb3e979e tip |
|
62 | fdfeeb3e979e tip | |
63 | $ hg id -R cloned/sub |
|
63 | $ hg id -R cloned/sub | |
64 | 863c1745b441 tip |
|
64 | 863c1745b441 tip | |
65 |
|
65 | |||
66 | subrepo debug for 'main' clone |
|
66 | subrepo debug for 'main' clone | |
67 |
|
67 | |||
68 | $ hg debugsub -R cloned |
|
68 | $ hg debugsub -R cloned | |
69 | path sub |
|
69 | path sub | |
70 | source ../sub |
|
70 | source ../sub | |
71 | revision 863c1745b441bd97a8c4a096e87793073f4fb215 |
|
71 | revision 863c1745b441bd97a8c4a096e87793073f4fb215 | |
72 |
|
72 | |||
73 | $ killdaemons.py |
|
73 | $ killdaemons.py | |
74 |
|
74 | |||
75 | subrepo paths with ssh urls |
|
75 | subrepo paths with ssh urls | |
76 |
|
76 | |||
77 |
$ hg clone -e |
|
77 | $ hg clone -e dummyssh ssh://user@dummy/cloned sshclone | |
78 | requesting all changes |
|
78 | requesting all changes | |
79 | adding changesets |
|
79 | adding changesets | |
80 | adding manifests |
|
80 | adding manifests | |
81 | adding file changes |
|
81 | adding file changes | |
82 | added 1 changesets with 3 changes to 3 files |
|
82 | added 1 changesets with 3 changes to 3 files | |
83 | updating to branch default |
|
83 | updating to branch default | |
84 | cloning subrepo sub from ssh://user@dummy/sub |
|
84 | cloning subrepo sub from ssh://user@dummy/sub | |
85 | requesting all changes |
|
85 | requesting all changes | |
86 | adding changesets |
|
86 | adding changesets | |
87 | adding manifests |
|
87 | adding manifests | |
88 | adding file changes |
|
88 | adding file changes | |
89 | added 1 changesets with 1 changes to 1 files |
|
89 | added 1 changesets with 1 changes to 1 files | |
90 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
90 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
91 |
|
91 | |||
92 |
$ hg -R sshclone push -e |
|
92 | $ hg -R sshclone push -e dummyssh ssh://user@dummy/`pwd`/cloned | |
93 | pushing to ssh://user@dummy/$TESTTMP/cloned |
|
93 | pushing to ssh://user@dummy/$TESTTMP/cloned | |
94 | pushing subrepo sub to ssh://user@dummy/$TESTTMP/sub |
|
94 | pushing subrepo sub to ssh://user@dummy/$TESTTMP/sub | |
95 | searching for changes |
|
95 | searching for changes | |
96 | no changes found |
|
96 | no changes found | |
97 | searching for changes |
|
97 | searching for changes | |
98 | no changes found |
|
98 | no changes found | |
99 | [1] |
|
99 | [1] | |
100 |
|
100 | |||
101 | $ cat dummylog |
|
101 | $ cat dummylog | |
102 | Got arguments 1:user@dummy 2:hg -R cloned serve --stdio |
|
102 | Got arguments 1:user@dummy 2:hg -R cloned serve --stdio | |
103 | Got arguments 1:user@dummy 2:hg -R sub serve --stdio |
|
103 | Got arguments 1:user@dummy 2:hg -R sub serve --stdio | |
104 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/cloned serve --stdio |
|
104 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/cloned serve --stdio | |
105 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/sub serve --stdio |
|
105 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/sub serve --stdio |
General Comments 0
You need to be logged in to leave comments.
Login now