##// END OF EJS Templates
test-bookmarks: factor hooks out to a shell script for Windows...
Matt Harbison -
r32077:de115db3 stable
parent child Browse files
Show More
@@ -1,866 +1,881 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 > EOF
10 > EOF
11
11
12 initialize
12 initialize
13
13
14 $ hg init a
14 $ hg init a
15 $ cd a
15 $ cd a
16 $ echo 'test' > test
16 $ echo 'test' > test
17 $ hg commit -Am'test'
17 $ hg commit -Am'test'
18 adding test
18 adding test
19
19
20 set bookmarks
20 set bookmarks
21
21
22 $ hg bookmark X
22 $ hg bookmark X
23 $ hg bookmark Y
23 $ hg bookmark Y
24 $ hg bookmark Z
24 $ hg bookmark Z
25
25
26 import bookmark by name
26 import bookmark by name
27
27
28 $ hg init ../b
28 $ hg init ../b
29 $ cd ../b
29 $ cd ../b
30 $ hg book Y
30 $ hg book Y
31 $ hg book
31 $ hg book
32 * Y -1:000000000000
32 * Y -1:000000000000
33 $ hg pull ../a
33 $ hg pull ../a
34 pulling from ../a
34 pulling from ../a
35 requesting all changes
35 requesting all changes
36 adding changesets
36 adding changesets
37 adding manifests
37 adding manifests
38 adding file changes
38 adding file changes
39 added 1 changesets with 1 changes to 1 files
39 added 1 changesets with 1 changes to 1 files
40 adding remote bookmark X
40 adding remote bookmark X
41 updating bookmark Y
41 updating bookmark Y
42 adding remote bookmark Z
42 adding remote bookmark Z
43 (run 'hg update' to get a working copy)
43 (run 'hg update' to get a working copy)
44 $ hg bookmarks
44 $ hg bookmarks
45 X 0:4e3505fd9583
45 X 0:4e3505fd9583
46 * Y 0:4e3505fd9583
46 * Y 0:4e3505fd9583
47 Z 0:4e3505fd9583
47 Z 0:4e3505fd9583
48 $ hg debugpushkey ../a namespaces
48 $ hg debugpushkey ../a namespaces
49 bookmarks
49 bookmarks
50 namespaces
50 namespaces
51 obsolete
51 obsolete
52 phases
52 phases
53 $ hg debugpushkey ../a bookmarks
53 $ hg debugpushkey ../a bookmarks
54 X 4e3505fd95835d721066b76e75dbb8cc554d7f77
54 X 4e3505fd95835d721066b76e75dbb8cc554d7f77
55 Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
55 Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
56 Z 4e3505fd95835d721066b76e75dbb8cc554d7f77
56 Z 4e3505fd95835d721066b76e75dbb8cc554d7f77
57
57
58 delete the bookmark to re-pull it
58 delete the bookmark to re-pull it
59
59
60 $ hg book -d X
60 $ hg book -d X
61 $ hg pull -B X ../a
61 $ hg pull -B X ../a
62 pulling from ../a
62 pulling from ../a
63 no changes found
63 no changes found
64 adding remote bookmark X
64 adding remote bookmark X
65
65
66 finally no-op pull
66 finally no-op pull
67
67
68 $ hg pull -B X ../a
68 $ hg pull -B X ../a
69 pulling from ../a
69 pulling from ../a
70 no changes found
70 no changes found
71 $ hg bookmark
71 $ hg bookmark
72 X 0:4e3505fd9583
72 X 0:4e3505fd9583
73 * Y 0:4e3505fd9583
73 * Y 0:4e3505fd9583
74 Z 0:4e3505fd9583
74 Z 0:4e3505fd9583
75
75
76 export bookmark by name
76 export bookmark by name
77
77
78 $ hg bookmark W
78 $ hg bookmark W
79 $ hg bookmark foo
79 $ hg bookmark foo
80 $ hg bookmark foobar
80 $ hg bookmark foobar
81 $ hg push -B W ../a
81 $ hg push -B W ../a
82 pushing to ../a
82 pushing to ../a
83 searching for changes
83 searching for changes
84 no changes found
84 no changes found
85 exporting bookmark W
85 exporting bookmark W
86 [1]
86 [1]
87 $ hg -R ../a bookmarks
87 $ hg -R ../a bookmarks
88 W -1:000000000000
88 W -1:000000000000
89 X 0:4e3505fd9583
89 X 0:4e3505fd9583
90 Y 0:4e3505fd9583
90 Y 0:4e3505fd9583
91 * Z 0:4e3505fd9583
91 * Z 0:4e3505fd9583
92
92
93 delete a remote bookmark
93 delete a remote bookmark
94
94
95 $ hg book -d W
95 $ hg book -d W
96 $ hg push -B W ../a
96 $ hg push -B W ../a
97 pushing to ../a
97 pushing to ../a
98 searching for changes
98 searching for changes
99 no changes found
99 no changes found
100 deleting remote bookmark W
100 deleting remote bookmark W
101 [1]
101 [1]
102
102
103 export the active bookmark
103 export the active bookmark
104
104
105 $ hg bookmark V
105 $ hg bookmark V
106 $ hg push -B . ../a
106 $ hg push -B . ../a
107 pushing to ../a
107 pushing to ../a
108 searching for changes
108 searching for changes
109 no changes found
109 no changes found
110 exporting bookmark V
110 exporting bookmark V
111 [1]
111 [1]
112
112
113 exporting the active bookmark with 'push -B .'
113 exporting the active bookmark with 'push -B .'
114 demand that one of the bookmarks is activated
114 demand that one of the bookmarks is activated
115
115
116 $ hg update -r default
116 $ hg update -r default
117 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
117 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
118 (leaving bookmark V)
118 (leaving bookmark V)
119 $ hg push -B . ../a
119 $ hg push -B . ../a
120 abort: no active bookmark
120 abort: no active bookmark
121 [255]
121 [255]
122 $ hg update -r V
122 $ hg update -r V
123 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
123 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
124 (activating bookmark V)
124 (activating bookmark V)
125
125
126 delete the bookmark
126 delete the bookmark
127
127
128 $ hg book -d V
128 $ hg book -d V
129 $ hg push -B V ../a
129 $ hg push -B V ../a
130 pushing to ../a
130 pushing to ../a
131 searching for changes
131 searching for changes
132 no changes found
132 no changes found
133 deleting remote bookmark V
133 deleting remote bookmark V
134 [1]
134 [1]
135 $ hg up foobar
135 $ hg up foobar
136 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
136 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
137 (activating bookmark foobar)
137 (activating bookmark foobar)
138
138
139 push/pull name that doesn't exist
139 push/pull name that doesn't exist
140
140
141 $ hg push -B badname ../a
141 $ hg push -B badname ../a
142 pushing to ../a
142 pushing to ../a
143 searching for changes
143 searching for changes
144 bookmark badname does not exist on the local or remote repository!
144 bookmark badname does not exist on the local or remote repository!
145 no changes found
145 no changes found
146 [2]
146 [2]
147 $ hg pull -B anotherbadname ../a
147 $ hg pull -B anotherbadname ../a
148 pulling from ../a
148 pulling from ../a
149 abort: remote bookmark anotherbadname not found!
149 abort: remote bookmark anotherbadname not found!
150 [255]
150 [255]
151
151
152 divergent bookmarks
152 divergent bookmarks
153
153
154 $ cd ../a
154 $ cd ../a
155 $ echo c1 > f1
155 $ echo c1 > f1
156 $ hg ci -Am1
156 $ hg ci -Am1
157 adding f1
157 adding f1
158 $ hg book -f @
158 $ hg book -f @
159 $ hg book -f X
159 $ hg book -f X
160 $ hg book
160 $ hg book
161 @ 1:0d2164f0ce0d
161 @ 1:0d2164f0ce0d
162 * X 1:0d2164f0ce0d
162 * X 1:0d2164f0ce0d
163 Y 0:4e3505fd9583
163 Y 0:4e3505fd9583
164 Z 1:0d2164f0ce0d
164 Z 1:0d2164f0ce0d
165
165
166 $ cd ../b
166 $ cd ../b
167 $ hg up
167 $ hg up
168 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
168 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
169 updating bookmark foobar
169 updating bookmark foobar
170 $ echo c2 > f2
170 $ echo c2 > f2
171 $ hg ci -Am2
171 $ hg ci -Am2
172 adding f2
172 adding f2
173 $ hg book -if @
173 $ hg book -if @
174 $ hg book -if X
174 $ hg book -if X
175 $ hg book
175 $ hg book
176 @ 1:9b140be10808
176 @ 1:9b140be10808
177 X 1:9b140be10808
177 X 1:9b140be10808
178 Y 0:4e3505fd9583
178 Y 0:4e3505fd9583
179 Z 0:4e3505fd9583
179 Z 0:4e3505fd9583
180 foo -1:000000000000
180 foo -1:000000000000
181 * foobar 1:9b140be10808
181 * foobar 1:9b140be10808
182
182
183 $ hg pull --config paths.foo=../a foo
183 $ hg pull --config paths.foo=../a foo
184 pulling from $TESTTMP/a (glob)
184 pulling from $TESTTMP/a (glob)
185 searching for changes
185 searching for changes
186 adding changesets
186 adding changesets
187 adding manifests
187 adding manifests
188 adding file changes
188 adding file changes
189 added 1 changesets with 1 changes to 1 files (+1 heads)
189 added 1 changesets with 1 changes to 1 files (+1 heads)
190 divergent bookmark @ stored as @foo
190 divergent bookmark @ stored as @foo
191 divergent bookmark X stored as X@foo
191 divergent bookmark X stored as X@foo
192 updating bookmark Z
192 updating bookmark Z
193 (run 'hg heads' to see heads, 'hg merge' to merge)
193 (run 'hg heads' to see heads, 'hg merge' to merge)
194 $ hg book
194 $ hg book
195 @ 1:9b140be10808
195 @ 1:9b140be10808
196 @foo 2:0d2164f0ce0d
196 @foo 2:0d2164f0ce0d
197 X 1:9b140be10808
197 X 1:9b140be10808
198 X@foo 2:0d2164f0ce0d
198 X@foo 2:0d2164f0ce0d
199 Y 0:4e3505fd9583
199 Y 0:4e3505fd9583
200 Z 2:0d2164f0ce0d
200 Z 2:0d2164f0ce0d
201 foo -1:000000000000
201 foo -1:000000000000
202 * foobar 1:9b140be10808
202 * foobar 1:9b140be10808
203
203
204 (test that too many divergence of bookmark)
204 (test that too many divergence of bookmark)
205
205
206 $ python $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -r 000000000000 "X@${i}"; done
206 $ python $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -r 000000000000 "X@${i}"; done
207 $ hg pull ../a
207 $ hg pull ../a
208 pulling from ../a
208 pulling from ../a
209 searching for changes
209 searching for changes
210 no changes found
210 no changes found
211 warning: failed to assign numbered name to divergent bookmark X
211 warning: failed to assign numbered name to divergent bookmark X
212 divergent bookmark @ stored as @1
212 divergent bookmark @ stored as @1
213 $ hg bookmarks | grep '^ X' | grep -v ':000000000000'
213 $ hg bookmarks | grep '^ X' | grep -v ':000000000000'
214 X 1:9b140be10808
214 X 1:9b140be10808
215 X@foo 2:0d2164f0ce0d
215 X@foo 2:0d2164f0ce0d
216
216
217 (test that remotely diverged bookmarks are reused if they aren't changed)
217 (test that remotely diverged bookmarks are reused if they aren't changed)
218
218
219 $ hg bookmarks | grep '^ @'
219 $ hg bookmarks | grep '^ @'
220 @ 1:9b140be10808
220 @ 1:9b140be10808
221 @1 2:0d2164f0ce0d
221 @1 2:0d2164f0ce0d
222 @foo 2:0d2164f0ce0d
222 @foo 2:0d2164f0ce0d
223 $ hg pull ../a
223 $ hg pull ../a
224 pulling from ../a
224 pulling from ../a
225 searching for changes
225 searching for changes
226 no changes found
226 no changes found
227 warning: failed to assign numbered name to divergent bookmark X
227 warning: failed to assign numbered name to divergent bookmark X
228 divergent bookmark @ stored as @1
228 divergent bookmark @ stored as @1
229 $ hg bookmarks | grep '^ @'
229 $ hg bookmarks | grep '^ @'
230 @ 1:9b140be10808
230 @ 1:9b140be10808
231 @1 2:0d2164f0ce0d
231 @1 2:0d2164f0ce0d
232 @foo 2:0d2164f0ce0d
232 @foo 2:0d2164f0ce0d
233
233
234 $ python $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -d "X@${i}"; done
234 $ python $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -d "X@${i}"; done
235 $ hg bookmarks -d "@1"
235 $ hg bookmarks -d "@1"
236
236
237 $ hg push -f ../a
237 $ hg push -f ../a
238 pushing to ../a
238 pushing to ../a
239 searching for changes
239 searching for changes
240 adding changesets
240 adding changesets
241 adding manifests
241 adding manifests
242 adding file changes
242 adding file changes
243 added 1 changesets with 1 changes to 1 files (+1 heads)
243 added 1 changesets with 1 changes to 1 files (+1 heads)
244 $ hg -R ../a book
244 $ hg -R ../a book
245 @ 1:0d2164f0ce0d
245 @ 1:0d2164f0ce0d
246 * X 1:0d2164f0ce0d
246 * X 1:0d2164f0ce0d
247 Y 0:4e3505fd9583
247 Y 0:4e3505fd9583
248 Z 1:0d2164f0ce0d
248 Z 1:0d2164f0ce0d
249
249
250 explicit pull should overwrite the local version (issue4439)
250 explicit pull should overwrite the local version (issue4439)
251
251
252 $ hg update -r X
252 $ hg update -r X
253 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
253 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
254 (activating bookmark X)
254 (activating bookmark X)
255 $ hg pull --config paths.foo=../a foo -B .
255 $ hg pull --config paths.foo=../a foo -B .
256 pulling from $TESTTMP/a (glob)
256 pulling from $TESTTMP/a (glob)
257 no changes found
257 no changes found
258 divergent bookmark @ stored as @foo
258 divergent bookmark @ stored as @foo
259 importing bookmark X
259 importing bookmark X
260
260
261 reinstall state for further testing:
261 reinstall state for further testing:
262
262
263 $ hg book -fr 9b140be10808 X
263 $ hg book -fr 9b140be10808 X
264
264
265 revsets should not ignore divergent bookmarks
265 revsets should not ignore divergent bookmarks
266
266
267 $ hg bookmark -fr 1 Z
267 $ hg bookmark -fr 1 Z
268 $ hg log -r 'bookmark()' --template '{rev}:{node|short} {bookmarks}\n'
268 $ hg log -r 'bookmark()' --template '{rev}:{node|short} {bookmarks}\n'
269 0:4e3505fd9583 Y
269 0:4e3505fd9583 Y
270 1:9b140be10808 @ X Z foobar
270 1:9b140be10808 @ X Z foobar
271 2:0d2164f0ce0d @foo X@foo
271 2:0d2164f0ce0d @foo X@foo
272 $ hg log -r 'bookmark("X@foo")' --template '{rev}:{node|short} {bookmarks}\n'
272 $ hg log -r 'bookmark("X@foo")' --template '{rev}:{node|short} {bookmarks}\n'
273 2:0d2164f0ce0d @foo X@foo
273 2:0d2164f0ce0d @foo X@foo
274 $ hg log -r 'bookmark("re:X@foo")' --template '{rev}:{node|short} {bookmarks}\n'
274 $ hg log -r 'bookmark("re:X@foo")' --template '{rev}:{node|short} {bookmarks}\n'
275 2:0d2164f0ce0d @foo X@foo
275 2:0d2164f0ce0d @foo X@foo
276
276
277 update a remote bookmark from a non-head to a head
277 update a remote bookmark from a non-head to a head
278
278
279 $ hg up -q Y
279 $ hg up -q Y
280 $ echo c3 > f2
280 $ echo c3 > f2
281 $ hg ci -Am3
281 $ hg ci -Am3
282 adding f2
282 adding f2
283 created new head
283 created new head
284 $ hg push ../a
284 $ hg push ../a
285 pushing to ../a
285 pushing to ../a
286 searching for changes
286 searching for changes
287 adding changesets
287 adding changesets
288 adding manifests
288 adding manifests
289 adding file changes
289 adding file changes
290 added 1 changesets with 1 changes to 1 files (+1 heads)
290 added 1 changesets with 1 changes to 1 files (+1 heads)
291 updating bookmark Y
291 updating bookmark Y
292 $ hg -R ../a book
292 $ hg -R ../a book
293 @ 1:0d2164f0ce0d
293 @ 1:0d2164f0ce0d
294 * X 1:0d2164f0ce0d
294 * X 1:0d2164f0ce0d
295 Y 3:f6fc62dde3c0
295 Y 3:f6fc62dde3c0
296 Z 1:0d2164f0ce0d
296 Z 1:0d2164f0ce0d
297
297
298 update a bookmark in the middle of a client pulling changes
298 update a bookmark in the middle of a client pulling changes
299
299
300 $ cd ..
300 $ cd ..
301 $ hg clone -q a pull-race
301 $ hg clone -q a pull-race
302
302
303 We want to use http because it is stateless and therefore more susceptible to
303 We want to use http because it is stateless and therefore more susceptible to
304 race conditions
304 race conditions
305
305
306 $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
306 $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
307 $ cat pull-race.pid >> $DAEMON_PIDS
307 $ cat pull-race.pid >> $DAEMON_PIDS
308
308
309 $ cat <<EOF > $TESTTMP/out_makecommit.sh
310 > #!/bin/sh
311 > hg ci -Am5
312 > echo committed in pull-race
313 > EOF
314
309 $ hg clone -q http://localhost:$HGPORT/ pull-race2
315 $ hg clone -q http://localhost:$HGPORT/ pull-race2
310 $ cd pull-race
316 $ cd pull-race
311 $ hg up -q Y
317 $ hg up -q Y
312 $ echo c4 > f2
318 $ echo c4 > f2
313 $ hg ci -Am4
319 $ hg ci -Am4
314 $ echo c5 > f3
320 $ echo c5 > f3
315 $ cat <<EOF > .hg/hgrc
321 $ cat <<EOF > .hg/hgrc
316 > [hooks]
322 > [hooks]
317 > outgoing.makecommit = hg ci -Am5; echo committed in pull-race
323 > outgoing.makecommit = sh $TESTTMP/out_makecommit.sh
318 > EOF
324 > EOF
319
325
320 (new config needs a server restart)
326 (new config needs a server restart)
321
327
322 $ cd ..
328 $ cd ..
323 $ killdaemons.py
329 $ killdaemons.py
324 $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
330 $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
325 $ cat pull-race.pid >> $DAEMON_PIDS
331 $ cat pull-race.pid >> $DAEMON_PIDS
326 $ cd pull-race2
332 $ cd pull-race2
327 $ hg -R $TESTTMP/pull-race book
333 $ hg -R $TESTTMP/pull-race book
328 @ 1:0d2164f0ce0d
334 @ 1:0d2164f0ce0d
329 X 1:0d2164f0ce0d
335 X 1:0d2164f0ce0d
330 * Y 4:b0a5eff05604
336 * Y 4:b0a5eff05604
331 Z 1:0d2164f0ce0d
337 Z 1:0d2164f0ce0d
332 $ hg pull
338 $ hg pull
333 pulling from http://localhost:$HGPORT/
339 pulling from http://localhost:$HGPORT/
334 searching for changes
340 searching for changes
335 adding changesets
341 adding changesets
336 adding manifests
342 adding manifests
337 adding file changes
343 adding file changes
338 added 1 changesets with 1 changes to 1 files
344 added 1 changesets with 1 changes to 1 files
339 updating bookmark Y
345 updating bookmark Y
340 (run 'hg update' to get a working copy)
346 (run 'hg update' to get a working copy)
341 $ hg book
347 $ hg book
342 * @ 1:0d2164f0ce0d
348 * @ 1:0d2164f0ce0d
343 X 1:0d2164f0ce0d
349 X 1:0d2164f0ce0d
344 Y 4:b0a5eff05604
350 Y 4:b0a5eff05604
345 Z 1:0d2164f0ce0d
351 Z 1:0d2164f0ce0d
346
352
347 Update a bookmark right after the initial lookup -B (issue4689)
353 Update a bookmark right after the initial lookup -B (issue4689)
348
354
349 $ echo c6 > ../pull-race/f3 # to be committed during the race
355 $ echo c6 > ../pull-race/f3 # to be committed during the race
356 $ cat <<EOF > $TESTTMP/listkeys_makecommit.sh
357 > #!/bin/sh
358 > if hg st | grep -q M; then
359 > hg commit -m race
360 > echo committed in pull-race
361 > else
362 > exit 0
363 > fi
364 > EOF
350 $ cat <<EOF > ../pull-race/.hg/hgrc
365 $ cat <<EOF > ../pull-race/.hg/hgrc
351 > [hooks]
366 > [hooks]
352 > # If anything to commit, commit it right after the first key listing used
367 > # If anything to commit, commit it right after the first key listing used
353 > # during lookup. This makes the commit appear before the actual getbundle
368 > # during lookup. This makes the commit appear before the actual getbundle
354 > # call.
369 > # call.
355 > listkeys.makecommit= ((hg st | grep -q M) && (hg commit -m race; echo commited in pull-race)) || exit 0
370 > listkeys.makecommit= sh $TESTTMP/listkeys_makecommit.sh
356 > EOF
371 > EOF
357
372
358 (new config need server restart)
373 (new config need server restart)
359
374
360 $ killdaemons.py
375 $ killdaemons.py
361 $ hg serve -R ../pull-race -p $HGPORT -d --pid-file=../pull-race.pid -E main-error.log
376 $ hg serve -R ../pull-race -p $HGPORT -d --pid-file=../pull-race.pid -E main-error.log
362 $ cat ../pull-race.pid >> $DAEMON_PIDS
377 $ cat ../pull-race.pid >> $DAEMON_PIDS
363
378
364 $ hg -R $TESTTMP/pull-race book
379 $ hg -R $TESTTMP/pull-race book
365 @ 1:0d2164f0ce0d
380 @ 1:0d2164f0ce0d
366 X 1:0d2164f0ce0d
381 X 1:0d2164f0ce0d
367 * Y 5:35d1ef0a8d1b
382 * Y 5:35d1ef0a8d1b
368 Z 1:0d2164f0ce0d
383 Z 1:0d2164f0ce0d
369 $ hg update -r Y
384 $ hg update -r Y
370 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
385 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
371 (activating bookmark Y)
386 (activating bookmark Y)
372 $ hg pull -B .
387 $ hg pull -B .
373 pulling from http://localhost:$HGPORT/
388 pulling from http://localhost:$HGPORT/
374 searching for changes
389 searching for changes
375 adding changesets
390 adding changesets
376 adding manifests
391 adding manifests
377 adding file changes
392 adding file changes
378 added 1 changesets with 1 changes to 1 files
393 added 1 changesets with 1 changes to 1 files
379 updating bookmark Y
394 updating bookmark Y
380 (run 'hg update' to get a working copy)
395 (run 'hg update' to get a working copy)
381 $ hg book
396 $ hg book
382 @ 1:0d2164f0ce0d
397 @ 1:0d2164f0ce0d
383 X 1:0d2164f0ce0d
398 X 1:0d2164f0ce0d
384 * Y 5:35d1ef0a8d1b
399 * Y 5:35d1ef0a8d1b
385 Z 1:0d2164f0ce0d
400 Z 1:0d2164f0ce0d
386
401
387 (done with this section of the test)
402 (done with this section of the test)
388
403
389 $ killdaemons.py
404 $ killdaemons.py
390 $ cd ../b
405 $ cd ../b
391
406
392 diverging a remote bookmark fails
407 diverging a remote bookmark fails
393
408
394 $ hg up -q 4e3505fd9583
409 $ hg up -q 4e3505fd9583
395 $ echo c4 > f2
410 $ echo c4 > f2
396 $ hg ci -Am4
411 $ hg ci -Am4
397 adding f2
412 adding f2
398 created new head
413 created new head
399 $ echo c5 > f2
414 $ echo c5 > f2
400 $ hg ci -Am5
415 $ hg ci -Am5
401 $ hg log -G
416 $ hg log -G
402 @ 5:c922c0139ca0 5
417 @ 5:c922c0139ca0 5
403 |
418 |
404 o 4:4efff6d98829 4
419 o 4:4efff6d98829 4
405 |
420 |
406 | o 3:f6fc62dde3c0 3
421 | o 3:f6fc62dde3c0 3
407 |/
422 |/
408 | o 2:0d2164f0ce0d 1
423 | o 2:0d2164f0ce0d 1
409 |/
424 |/
410 | o 1:9b140be10808 2
425 | o 1:9b140be10808 2
411 |/
426 |/
412 o 0:4e3505fd9583 test
427 o 0:4e3505fd9583 test
413
428
414
429
415 $ hg book -f Y
430 $ hg book -f Y
416
431
417 $ cat <<EOF > ../a/.hg/hgrc
432 $ cat <<EOF > ../a/.hg/hgrc
418 > [web]
433 > [web]
419 > push_ssl = false
434 > push_ssl = false
420 > allow_push = *
435 > allow_push = *
421 > EOF
436 > EOF
422
437
423 $ hg serve -R ../a -p $HGPORT2 -d --pid-file=../hg2.pid
438 $ hg serve -R ../a -p $HGPORT2 -d --pid-file=../hg2.pid
424 $ cat ../hg2.pid >> $DAEMON_PIDS
439 $ cat ../hg2.pid >> $DAEMON_PIDS
425
440
426 $ hg push http://localhost:$HGPORT2/
441 $ hg push http://localhost:$HGPORT2/
427 pushing to http://localhost:$HGPORT2/
442 pushing to http://localhost:$HGPORT2/
428 searching for changes
443 searching for changes
429 abort: push creates new remote head c922c0139ca0 with bookmark 'Y'!
444 abort: push creates new remote head c922c0139ca0 with bookmark 'Y'!
430 (merge or see 'hg help push' for details about pushing new heads)
445 (merge or see 'hg help push' for details about pushing new heads)
431 [255]
446 [255]
432 $ hg -R ../a book
447 $ hg -R ../a book
433 @ 1:0d2164f0ce0d
448 @ 1:0d2164f0ce0d
434 * X 1:0d2164f0ce0d
449 * X 1:0d2164f0ce0d
435 Y 3:f6fc62dde3c0
450 Y 3:f6fc62dde3c0
436 Z 1:0d2164f0ce0d
451 Z 1:0d2164f0ce0d
437
452
438
453
439 Unrelated marker does not alter the decision
454 Unrelated marker does not alter the decision
440
455
441 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
456 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
442 $ hg push http://localhost:$HGPORT2/
457 $ hg push http://localhost:$HGPORT2/
443 pushing to http://localhost:$HGPORT2/
458 pushing to http://localhost:$HGPORT2/
444 searching for changes
459 searching for changes
445 abort: push creates new remote head c922c0139ca0 with bookmark 'Y'!
460 abort: push creates new remote head c922c0139ca0 with bookmark 'Y'!
446 (merge or see 'hg help push' for details about pushing new heads)
461 (merge or see 'hg help push' for details about pushing new heads)
447 [255]
462 [255]
448 $ hg -R ../a book
463 $ hg -R ../a book
449 @ 1:0d2164f0ce0d
464 @ 1:0d2164f0ce0d
450 * X 1:0d2164f0ce0d
465 * X 1:0d2164f0ce0d
451 Y 3:f6fc62dde3c0
466 Y 3:f6fc62dde3c0
452 Z 1:0d2164f0ce0d
467 Z 1:0d2164f0ce0d
453
468
454 Update to a successor works
469 Update to a successor works
455
470
456 $ hg id --debug -r 3
471 $ hg id --debug -r 3
457 f6fc62dde3c0771e29704af56ba4d8af77abcc2f
472 f6fc62dde3c0771e29704af56ba4d8af77abcc2f
458 $ hg id --debug -r 4
473 $ hg id --debug -r 4
459 4efff6d98829d9c824c621afd6e3f01865f5439f
474 4efff6d98829d9c824c621afd6e3f01865f5439f
460 $ hg id --debug -r 5
475 $ hg id --debug -r 5
461 c922c0139ca03858f655e4a2af4dd02796a63969 tip Y
476 c922c0139ca03858f655e4a2af4dd02796a63969 tip Y
462 $ hg debugobsolete f6fc62dde3c0771e29704af56ba4d8af77abcc2f cccccccccccccccccccccccccccccccccccccccc
477 $ hg debugobsolete f6fc62dde3c0771e29704af56ba4d8af77abcc2f cccccccccccccccccccccccccccccccccccccccc
463 $ hg debugobsolete cccccccccccccccccccccccccccccccccccccccc 4efff6d98829d9c824c621afd6e3f01865f5439f
478 $ hg debugobsolete cccccccccccccccccccccccccccccccccccccccc 4efff6d98829d9c824c621afd6e3f01865f5439f
464 $ hg push http://localhost:$HGPORT2/
479 $ hg push http://localhost:$HGPORT2/
465 pushing to http://localhost:$HGPORT2/
480 pushing to http://localhost:$HGPORT2/
466 searching for changes
481 searching for changes
467 remote: adding changesets
482 remote: adding changesets
468 remote: adding manifests
483 remote: adding manifests
469 remote: adding file changes
484 remote: adding file changes
470 remote: added 2 changesets with 2 changes to 1 files (+1 heads)
485 remote: added 2 changesets with 2 changes to 1 files (+1 heads)
471 remote: 2 new obsolescence markers
486 remote: 2 new obsolescence markers
472 updating bookmark Y
487 updating bookmark Y
473 $ hg -R ../a book
488 $ hg -R ../a book
474 @ 1:0d2164f0ce0d
489 @ 1:0d2164f0ce0d
475 * X 1:0d2164f0ce0d
490 * X 1:0d2164f0ce0d
476 Y 5:c922c0139ca0
491 Y 5:c922c0139ca0
477 Z 1:0d2164f0ce0d
492 Z 1:0d2164f0ce0d
478
493
479 hgweb
494 hgweb
480
495
481 $ cat <<EOF > .hg/hgrc
496 $ cat <<EOF > .hg/hgrc
482 > [web]
497 > [web]
483 > push_ssl = false
498 > push_ssl = false
484 > allow_push = *
499 > allow_push = *
485 > EOF
500 > EOF
486
501
487 $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log
502 $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log
488 $ cat ../hg.pid >> $DAEMON_PIDS
503 $ cat ../hg.pid >> $DAEMON_PIDS
489 $ cd ../a
504 $ cd ../a
490
505
491 $ hg debugpushkey http://localhost:$HGPORT/ namespaces
506 $ hg debugpushkey http://localhost:$HGPORT/ namespaces
492 bookmarks
507 bookmarks
493 namespaces
508 namespaces
494 obsolete
509 obsolete
495 phases
510 phases
496 $ hg debugpushkey http://localhost:$HGPORT/ bookmarks
511 $ hg debugpushkey http://localhost:$HGPORT/ bookmarks
497 @ 9b140be1080824d768c5a4691a564088eede71f9
512 @ 9b140be1080824d768c5a4691a564088eede71f9
498 X 9b140be1080824d768c5a4691a564088eede71f9
513 X 9b140be1080824d768c5a4691a564088eede71f9
499 Y c922c0139ca03858f655e4a2af4dd02796a63969
514 Y c922c0139ca03858f655e4a2af4dd02796a63969
500 Z 9b140be1080824d768c5a4691a564088eede71f9
515 Z 9b140be1080824d768c5a4691a564088eede71f9
501 foo 0000000000000000000000000000000000000000
516 foo 0000000000000000000000000000000000000000
502 foobar 9b140be1080824d768c5a4691a564088eede71f9
517 foobar 9b140be1080824d768c5a4691a564088eede71f9
503 $ hg out -B http://localhost:$HGPORT/
518 $ hg out -B http://localhost:$HGPORT/
504 comparing with http://localhost:$HGPORT/
519 comparing with http://localhost:$HGPORT/
505 searching for changed bookmarks
520 searching for changed bookmarks
506 @ 0d2164f0ce0d
521 @ 0d2164f0ce0d
507 X 0d2164f0ce0d
522 X 0d2164f0ce0d
508 Z 0d2164f0ce0d
523 Z 0d2164f0ce0d
509 foo
524 foo
510 foobar
525 foobar
511 $ hg push -B Z http://localhost:$HGPORT/
526 $ hg push -B Z http://localhost:$HGPORT/
512 pushing to http://localhost:$HGPORT/
527 pushing to http://localhost:$HGPORT/
513 searching for changes
528 searching for changes
514 no changes found
529 no changes found
515 updating bookmark Z
530 updating bookmark Z
516 [1]
531 [1]
517 $ hg book -d Z
532 $ hg book -d Z
518 $ hg in -B http://localhost:$HGPORT/
533 $ hg in -B http://localhost:$HGPORT/
519 comparing with http://localhost:$HGPORT/
534 comparing with http://localhost:$HGPORT/
520 searching for changed bookmarks
535 searching for changed bookmarks
521 @ 9b140be10808
536 @ 9b140be10808
522 X 9b140be10808
537 X 9b140be10808
523 Z 0d2164f0ce0d
538 Z 0d2164f0ce0d
524 foo 000000000000
539 foo 000000000000
525 foobar 9b140be10808
540 foobar 9b140be10808
526 $ hg pull -B Z http://localhost:$HGPORT/
541 $ hg pull -B Z http://localhost:$HGPORT/
527 pulling from http://localhost:$HGPORT/
542 pulling from http://localhost:$HGPORT/
528 no changes found
543 no changes found
529 divergent bookmark @ stored as @1
544 divergent bookmark @ stored as @1
530 divergent bookmark X stored as X@1
545 divergent bookmark X stored as X@1
531 adding remote bookmark Z
546 adding remote bookmark Z
532 adding remote bookmark foo
547 adding remote bookmark foo
533 adding remote bookmark foobar
548 adding remote bookmark foobar
534 $ hg clone http://localhost:$HGPORT/ cloned-bookmarks
549 $ hg clone http://localhost:$HGPORT/ cloned-bookmarks
535 requesting all changes
550 requesting all changes
536 adding changesets
551 adding changesets
537 adding manifests
552 adding manifests
538 adding file changes
553 adding file changes
539 added 5 changesets with 5 changes to 3 files (+2 heads)
554 added 5 changesets with 5 changes to 3 files (+2 heads)
540 2 new obsolescence markers
555 2 new obsolescence markers
541 updating to bookmark @
556 updating to bookmark @
542 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
557 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
543 $ hg -R cloned-bookmarks bookmarks
558 $ hg -R cloned-bookmarks bookmarks
544 * @ 1:9b140be10808
559 * @ 1:9b140be10808
545 X 1:9b140be10808
560 X 1:9b140be10808
546 Y 4:c922c0139ca0
561 Y 4:c922c0139ca0
547 Z 2:0d2164f0ce0d
562 Z 2:0d2164f0ce0d
548 foo -1:000000000000
563 foo -1:000000000000
549 foobar 1:9b140be10808
564 foobar 1:9b140be10808
550
565
551 $ cd ..
566 $ cd ..
552
567
553 Test to show result of bookmarks comparison
568 Test to show result of bookmarks comparison
554
569
555 $ mkdir bmcomparison
570 $ mkdir bmcomparison
556 $ cd bmcomparison
571 $ cd bmcomparison
557
572
558 $ hg init source
573 $ hg init source
559 $ hg -R source debugbuilddag '+2*2*3*4'
574 $ hg -R source debugbuilddag '+2*2*3*4'
560 $ hg -R source log -G --template '{rev}:{node|short}'
575 $ hg -R source log -G --template '{rev}:{node|short}'
561 o 4:e7bd5218ca15
576 o 4:e7bd5218ca15
562 |
577 |
563 | o 3:6100d3090acf
578 | o 3:6100d3090acf
564 |/
579 |/
565 | o 2:fa942426a6fd
580 | o 2:fa942426a6fd
566 |/
581 |/
567 | o 1:66f7d451a68b
582 | o 1:66f7d451a68b
568 |/
583 |/
569 o 0:1ea73414a91b
584 o 0:1ea73414a91b
570
585
571 $ hg -R source bookmarks -r 0 SAME
586 $ hg -R source bookmarks -r 0 SAME
572 $ hg -R source bookmarks -r 0 ADV_ON_REPO1
587 $ hg -R source bookmarks -r 0 ADV_ON_REPO1
573 $ hg -R source bookmarks -r 0 ADV_ON_REPO2
588 $ hg -R source bookmarks -r 0 ADV_ON_REPO2
574 $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO1
589 $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO1
575 $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO2
590 $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO2
576 $ hg -R source bookmarks -r 1 DIVERGED
591 $ hg -R source bookmarks -r 1 DIVERGED
577
592
578 $ hg clone -U source repo1
593 $ hg clone -U source repo1
579
594
580 (test that incoming/outgoing exit with 1, if there is no bookmark to
595 (test that incoming/outgoing exit with 1, if there is no bookmark to
581 be exchanged)
596 be exchanged)
582
597
583 $ hg -R repo1 incoming -B
598 $ hg -R repo1 incoming -B
584 comparing with $TESTTMP/bmcomparison/source (glob)
599 comparing with $TESTTMP/bmcomparison/source (glob)
585 searching for changed bookmarks
600 searching for changed bookmarks
586 no changed bookmarks found
601 no changed bookmarks found
587 [1]
602 [1]
588 $ hg -R repo1 outgoing -B
603 $ hg -R repo1 outgoing -B
589 comparing with $TESTTMP/bmcomparison/source (glob)
604 comparing with $TESTTMP/bmcomparison/source (glob)
590 searching for changed bookmarks
605 searching for changed bookmarks
591 no changed bookmarks found
606 no changed bookmarks found
592 [1]
607 [1]
593
608
594 $ hg -R repo1 bookmarks -f -r 1 ADD_ON_REPO1
609 $ hg -R repo1 bookmarks -f -r 1 ADD_ON_REPO1
595 $ hg -R repo1 bookmarks -f -r 2 ADV_ON_REPO1
610 $ hg -R repo1 bookmarks -f -r 2 ADV_ON_REPO1
596 $ hg -R repo1 bookmarks -f -r 3 DIFF_ADV_ON_REPO1
611 $ hg -R repo1 bookmarks -f -r 3 DIFF_ADV_ON_REPO1
597 $ hg -R repo1 bookmarks -f -r 3 DIFF_DIVERGED
612 $ hg -R repo1 bookmarks -f -r 3 DIFF_DIVERGED
598 $ hg -R repo1 -q --config extensions.mq= strip 4
613 $ hg -R repo1 -q --config extensions.mq= strip 4
599 $ hg -R repo1 log -G --template '{node|short} ({bookmarks})'
614 $ hg -R repo1 log -G --template '{node|short} ({bookmarks})'
600 o 6100d3090acf (DIFF_ADV_ON_REPO1 DIFF_DIVERGED)
615 o 6100d3090acf (DIFF_ADV_ON_REPO1 DIFF_DIVERGED)
601 |
616 |
602 | o fa942426a6fd (ADV_ON_REPO1)
617 | o fa942426a6fd (ADV_ON_REPO1)
603 |/
618 |/
604 | o 66f7d451a68b (ADD_ON_REPO1 DIVERGED)
619 | o 66f7d451a68b (ADD_ON_REPO1 DIVERGED)
605 |/
620 |/
606 o 1ea73414a91b (ADV_ON_REPO2 DIFF_ADV_ON_REPO2 SAME)
621 o 1ea73414a91b (ADV_ON_REPO2 DIFF_ADV_ON_REPO2 SAME)
607
622
608
623
609 $ hg clone -U source repo2
624 $ hg clone -U source repo2
610 $ hg -R repo2 bookmarks -f -r 1 ADD_ON_REPO2
625 $ hg -R repo2 bookmarks -f -r 1 ADD_ON_REPO2
611 $ hg -R repo2 bookmarks -f -r 1 ADV_ON_REPO2
626 $ hg -R repo2 bookmarks -f -r 1 ADV_ON_REPO2
612 $ hg -R repo2 bookmarks -f -r 2 DIVERGED
627 $ hg -R repo2 bookmarks -f -r 2 DIVERGED
613 $ hg -R repo2 bookmarks -f -r 4 DIFF_ADV_ON_REPO2
628 $ hg -R repo2 bookmarks -f -r 4 DIFF_ADV_ON_REPO2
614 $ hg -R repo2 bookmarks -f -r 4 DIFF_DIVERGED
629 $ hg -R repo2 bookmarks -f -r 4 DIFF_DIVERGED
615 $ hg -R repo2 -q --config extensions.mq= strip 3
630 $ hg -R repo2 -q --config extensions.mq= strip 3
616 $ hg -R repo2 log -G --template '{node|short} ({bookmarks})'
631 $ hg -R repo2 log -G --template '{node|short} ({bookmarks})'
617 o e7bd5218ca15 (DIFF_ADV_ON_REPO2 DIFF_DIVERGED)
632 o e7bd5218ca15 (DIFF_ADV_ON_REPO2 DIFF_DIVERGED)
618 |
633 |
619 | o fa942426a6fd (DIVERGED)
634 | o fa942426a6fd (DIVERGED)
620 |/
635 |/
621 | o 66f7d451a68b (ADD_ON_REPO2 ADV_ON_REPO2)
636 | o 66f7d451a68b (ADD_ON_REPO2 ADV_ON_REPO2)
622 |/
637 |/
623 o 1ea73414a91b (ADV_ON_REPO1 DIFF_ADV_ON_REPO1 SAME)
638 o 1ea73414a91b (ADV_ON_REPO1 DIFF_ADV_ON_REPO1 SAME)
624
639
625
640
626 (test that difference of bookmarks between repositories are fully shown)
641 (test that difference of bookmarks between repositories are fully shown)
627
642
628 $ hg -R repo1 incoming -B repo2 -v
643 $ hg -R repo1 incoming -B repo2 -v
629 comparing with repo2
644 comparing with repo2
630 searching for changed bookmarks
645 searching for changed bookmarks
631 ADD_ON_REPO2 66f7d451a68b added
646 ADD_ON_REPO2 66f7d451a68b added
632 ADV_ON_REPO2 66f7d451a68b advanced
647 ADV_ON_REPO2 66f7d451a68b advanced
633 DIFF_ADV_ON_REPO2 e7bd5218ca15 changed
648 DIFF_ADV_ON_REPO2 e7bd5218ca15 changed
634 DIFF_DIVERGED e7bd5218ca15 changed
649 DIFF_DIVERGED e7bd5218ca15 changed
635 DIVERGED fa942426a6fd diverged
650 DIVERGED fa942426a6fd diverged
636 $ hg -R repo1 outgoing -B repo2 -v
651 $ hg -R repo1 outgoing -B repo2 -v
637 comparing with repo2
652 comparing with repo2
638 searching for changed bookmarks
653 searching for changed bookmarks
639 ADD_ON_REPO1 66f7d451a68b added
654 ADD_ON_REPO1 66f7d451a68b added
640 ADD_ON_REPO2 deleted
655 ADD_ON_REPO2 deleted
641 ADV_ON_REPO1 fa942426a6fd advanced
656 ADV_ON_REPO1 fa942426a6fd advanced
642 DIFF_ADV_ON_REPO1 6100d3090acf advanced
657 DIFF_ADV_ON_REPO1 6100d3090acf advanced
643 DIFF_ADV_ON_REPO2 1ea73414a91b changed
658 DIFF_ADV_ON_REPO2 1ea73414a91b changed
644 DIFF_DIVERGED 6100d3090acf changed
659 DIFF_DIVERGED 6100d3090acf changed
645 DIVERGED 66f7d451a68b diverged
660 DIVERGED 66f7d451a68b diverged
646
661
647 $ hg -R repo2 incoming -B repo1 -v
662 $ hg -R repo2 incoming -B repo1 -v
648 comparing with repo1
663 comparing with repo1
649 searching for changed bookmarks
664 searching for changed bookmarks
650 ADD_ON_REPO1 66f7d451a68b added
665 ADD_ON_REPO1 66f7d451a68b added
651 ADV_ON_REPO1 fa942426a6fd advanced
666 ADV_ON_REPO1 fa942426a6fd advanced
652 DIFF_ADV_ON_REPO1 6100d3090acf changed
667 DIFF_ADV_ON_REPO1 6100d3090acf changed
653 DIFF_DIVERGED 6100d3090acf changed
668 DIFF_DIVERGED 6100d3090acf changed
654 DIVERGED 66f7d451a68b diverged
669 DIVERGED 66f7d451a68b diverged
655 $ hg -R repo2 outgoing -B repo1 -v
670 $ hg -R repo2 outgoing -B repo1 -v
656 comparing with repo1
671 comparing with repo1
657 searching for changed bookmarks
672 searching for changed bookmarks
658 ADD_ON_REPO1 deleted
673 ADD_ON_REPO1 deleted
659 ADD_ON_REPO2 66f7d451a68b added
674 ADD_ON_REPO2 66f7d451a68b added
660 ADV_ON_REPO2 66f7d451a68b advanced
675 ADV_ON_REPO2 66f7d451a68b advanced
661 DIFF_ADV_ON_REPO1 1ea73414a91b changed
676 DIFF_ADV_ON_REPO1 1ea73414a91b changed
662 DIFF_ADV_ON_REPO2 e7bd5218ca15 advanced
677 DIFF_ADV_ON_REPO2 e7bd5218ca15 advanced
663 DIFF_DIVERGED e7bd5218ca15 changed
678 DIFF_DIVERGED e7bd5218ca15 changed
664 DIVERGED fa942426a6fd diverged
679 DIVERGED fa942426a6fd diverged
665
680
666 $ cd ..
681 $ cd ..
667
682
668 Pushing a bookmark should only push the changes required by that
683 Pushing a bookmark should only push the changes required by that
669 bookmark, not all outgoing changes:
684 bookmark, not all outgoing changes:
670 $ hg clone http://localhost:$HGPORT/ addmarks
685 $ hg clone http://localhost:$HGPORT/ addmarks
671 requesting all changes
686 requesting all changes
672 adding changesets
687 adding changesets
673 adding manifests
688 adding manifests
674 adding file changes
689 adding file changes
675 added 5 changesets with 5 changes to 3 files (+2 heads)
690 added 5 changesets with 5 changes to 3 files (+2 heads)
676 2 new obsolescence markers
691 2 new obsolescence markers
677 updating to bookmark @
692 updating to bookmark @
678 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
693 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
679 $ cd addmarks
694 $ cd addmarks
680 $ echo foo > foo
695 $ echo foo > foo
681 $ hg add foo
696 $ hg add foo
682 $ hg commit -m 'add foo'
697 $ hg commit -m 'add foo'
683 $ echo bar > bar
698 $ echo bar > bar
684 $ hg add bar
699 $ hg add bar
685 $ hg commit -m 'add bar'
700 $ hg commit -m 'add bar'
686 $ hg co "tip^"
701 $ hg co "tip^"
687 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
702 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
688 (leaving bookmark @)
703 (leaving bookmark @)
689 $ hg book add-foo
704 $ hg book add-foo
690 $ hg book -r tip add-bar
705 $ hg book -r tip add-bar
691 Note: this push *must* push only a single changeset, as that's the point
706 Note: this push *must* push only a single changeset, as that's the point
692 of this test.
707 of this test.
693 $ hg push -B add-foo --traceback
708 $ hg push -B add-foo --traceback
694 pushing to http://localhost:$HGPORT/
709 pushing to http://localhost:$HGPORT/
695 searching for changes
710 searching for changes
696 remote: adding changesets
711 remote: adding changesets
697 remote: adding manifests
712 remote: adding manifests
698 remote: adding file changes
713 remote: adding file changes
699 remote: added 1 changesets with 1 changes to 1 files
714 remote: added 1 changesets with 1 changes to 1 files
700 exporting bookmark add-foo
715 exporting bookmark add-foo
701
716
702 pushing a new bookmark on a new head does not require -f if -B is specified
717 pushing a new bookmark on a new head does not require -f if -B is specified
703
718
704 $ hg up -q X
719 $ hg up -q X
705 $ hg book W
720 $ hg book W
706 $ echo c5 > f2
721 $ echo c5 > f2
707 $ hg ci -Am5
722 $ hg ci -Am5
708 created new head
723 created new head
709 $ hg push -B .
724 $ hg push -B .
710 pushing to http://localhost:$HGPORT/
725 pushing to http://localhost:$HGPORT/
711 searching for changes
726 searching for changes
712 remote: adding changesets
727 remote: adding changesets
713 remote: adding manifests
728 remote: adding manifests
714 remote: adding file changes
729 remote: adding file changes
715 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
730 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
716 exporting bookmark W
731 exporting bookmark W
717 $ hg -R ../b id -r W
732 $ hg -R ../b id -r W
718 cc978a373a53 tip W
733 cc978a373a53 tip W
719
734
720 pushing an existing but divergent bookmark with -B still requires -f
735 pushing an existing but divergent bookmark with -B still requires -f
721
736
722 $ hg clone -q . ../r
737 $ hg clone -q . ../r
723 $ hg up -q X
738 $ hg up -q X
724 $ echo 1 > f2
739 $ echo 1 > f2
725 $ hg ci -qAml
740 $ hg ci -qAml
726
741
727 $ cd ../r
742 $ cd ../r
728 $ hg up -q X
743 $ hg up -q X
729 $ echo 2 > f2
744 $ echo 2 > f2
730 $ hg ci -qAmr
745 $ hg ci -qAmr
731 $ hg push -B X
746 $ hg push -B X
732 pushing to $TESTTMP/addmarks (glob)
747 pushing to $TESTTMP/addmarks (glob)
733 searching for changes
748 searching for changes
734 remote has heads on branch 'default' that are not known locally: a2a606d9ff1b
749 remote has heads on branch 'default' that are not known locally: a2a606d9ff1b
735 abort: push creates new remote head 54694f811df9 with bookmark 'X'!
750 abort: push creates new remote head 54694f811df9 with bookmark 'X'!
736 (pull and merge or see 'hg help push' for details about pushing new heads)
751 (pull and merge or see 'hg help push' for details about pushing new heads)
737 [255]
752 [255]
738 $ cd ../addmarks
753 $ cd ../addmarks
739
754
740 Check summary output for incoming/outgoing bookmarks
755 Check summary output for incoming/outgoing bookmarks
741
756
742 $ hg bookmarks -d X
757 $ hg bookmarks -d X
743 $ hg bookmarks -d Y
758 $ hg bookmarks -d Y
744 $ hg summary --remote | grep '^remote:'
759 $ hg summary --remote | grep '^remote:'
745 remote: *, 2 incoming bookmarks, 1 outgoing bookmarks (glob)
760 remote: *, 2 incoming bookmarks, 1 outgoing bookmarks (glob)
746
761
747 $ cd ..
762 $ cd ..
748
763
749 pushing an unchanged bookmark should result in no changes
764 pushing an unchanged bookmark should result in no changes
750
765
751 $ hg init unchanged-a
766 $ hg init unchanged-a
752 $ hg init unchanged-b
767 $ hg init unchanged-b
753 $ cd unchanged-a
768 $ cd unchanged-a
754 $ echo initial > foo
769 $ echo initial > foo
755 $ hg commit -A -m initial
770 $ hg commit -A -m initial
756 adding foo
771 adding foo
757 $ hg bookmark @
772 $ hg bookmark @
758 $ hg push -B @ ../unchanged-b
773 $ hg push -B @ ../unchanged-b
759 pushing to ../unchanged-b
774 pushing to ../unchanged-b
760 searching for changes
775 searching for changes
761 adding changesets
776 adding changesets
762 adding manifests
777 adding manifests
763 adding file changes
778 adding file changes
764 added 1 changesets with 1 changes to 1 files
779 added 1 changesets with 1 changes to 1 files
765 exporting bookmark @
780 exporting bookmark @
766
781
767 $ hg push -B @ ../unchanged-b
782 $ hg push -B @ ../unchanged-b
768 pushing to ../unchanged-b
783 pushing to ../unchanged-b
769 searching for changes
784 searching for changes
770 no changes found
785 no changes found
771 [1]
786 [1]
772
787
773
788
774 Check hook preventing push (issue4455)
789 Check hook preventing push (issue4455)
775 ======================================
790 ======================================
776
791
777 $ hg bookmarks
792 $ hg bookmarks
778 * @ 0:55482a6fb4b1
793 * @ 0:55482a6fb4b1
779 $ hg log -G
794 $ hg log -G
780 @ 0:55482a6fb4b1 initial
795 @ 0:55482a6fb4b1 initial
781
796
782 $ hg init ../issue4455-dest
797 $ hg init ../issue4455-dest
783 $ hg push ../issue4455-dest # changesets only
798 $ hg push ../issue4455-dest # changesets only
784 pushing to ../issue4455-dest
799 pushing to ../issue4455-dest
785 searching for changes
800 searching for changes
786 adding changesets
801 adding changesets
787 adding manifests
802 adding manifests
788 adding file changes
803 adding file changes
789 added 1 changesets with 1 changes to 1 files
804 added 1 changesets with 1 changes to 1 files
790 $ cat >> .hg/hgrc << EOF
805 $ cat >> .hg/hgrc << EOF
791 > [paths]
806 > [paths]
792 > local=../issue4455-dest/
807 > local=../issue4455-dest/
793 > ssh=ssh://user@dummy/issue4455-dest
808 > ssh=ssh://user@dummy/issue4455-dest
794 > http=http://localhost:$HGPORT/
809 > http=http://localhost:$HGPORT/
795 > [ui]
810 > [ui]
796 > ssh=python "$TESTDIR/dummyssh"
811 > ssh=python "$TESTDIR/dummyssh"
797 > EOF
812 > EOF
798 $ cat >> ../issue4455-dest/.hg/hgrc << EOF
813 $ cat >> ../issue4455-dest/.hg/hgrc << EOF
799 > [hooks]
814 > [hooks]
800 > prepushkey=false
815 > prepushkey=false
801 > [web]
816 > [web]
802 > push_ssl = false
817 > push_ssl = false
803 > allow_push = *
818 > allow_push = *
804 > EOF
819 > EOF
805 $ killdaemons.py
820 $ killdaemons.py
806 $ hg serve -R ../issue4455-dest -p $HGPORT -d --pid-file=../issue4455.pid -E ../issue4455-error.log
821 $ hg serve -R ../issue4455-dest -p $HGPORT -d --pid-file=../issue4455.pid -E ../issue4455-error.log
807 $ cat ../issue4455.pid >> $DAEMON_PIDS
822 $ cat ../issue4455.pid >> $DAEMON_PIDS
808
823
809 Local push
824 Local push
810 ----------
825 ----------
811
826
812 $ hg push -B @ local
827 $ hg push -B @ local
813 pushing to $TESTTMP/issue4455-dest (glob)
828 pushing to $TESTTMP/issue4455-dest (glob)
814 searching for changes
829 searching for changes
815 no changes found
830 no changes found
816 pushkey-abort: prepushkey hook exited with status 1
831 pushkey-abort: prepushkey hook exited with status 1
817 abort: exporting bookmark @ failed!
832 abort: exporting bookmark @ failed!
818 [255]
833 [255]
819 $ hg -R ../issue4455-dest/ bookmarks
834 $ hg -R ../issue4455-dest/ bookmarks
820 no bookmarks set
835 no bookmarks set
821
836
822 Using ssh
837 Using ssh
823 ---------
838 ---------
824
839
825 $ hg push -B @ ssh # bundle2+
840 $ hg push -B @ ssh # bundle2+
826 pushing to ssh://user@dummy/issue4455-dest
841 pushing to ssh://user@dummy/issue4455-dest
827 searching for changes
842 searching for changes
828 no changes found
843 no changes found
829 remote: pushkey-abort: prepushkey hook exited with status 1
844 remote: pushkey-abort: prepushkey hook exited with status 1
830 abort: exporting bookmark @ failed!
845 abort: exporting bookmark @ failed!
831 [255]
846 [255]
832 $ hg -R ../issue4455-dest/ bookmarks
847 $ hg -R ../issue4455-dest/ bookmarks
833 no bookmarks set
848 no bookmarks set
834
849
835 $ hg push -B @ ssh --config devel.legacy.exchange=bundle1
850 $ hg push -B @ ssh --config devel.legacy.exchange=bundle1
836 pushing to ssh://user@dummy/issue4455-dest
851 pushing to ssh://user@dummy/issue4455-dest
837 searching for changes
852 searching for changes
838 no changes found
853 no changes found
839 remote: pushkey-abort: prepushkey hook exited with status 1
854 remote: pushkey-abort: prepushkey hook exited with status 1
840 exporting bookmark @ failed!
855 exporting bookmark @ failed!
841 [1]
856 [1]
842 $ hg -R ../issue4455-dest/ bookmarks
857 $ hg -R ../issue4455-dest/ bookmarks
843 no bookmarks set
858 no bookmarks set
844
859
845 Using http
860 Using http
846 ----------
861 ----------
847
862
848 $ hg push -B @ http # bundle2+
863 $ hg push -B @ http # bundle2+
849 pushing to http://localhost:$HGPORT/
864 pushing to http://localhost:$HGPORT/
850 searching for changes
865 searching for changes
851 no changes found
866 no changes found
852 remote: pushkey-abort: prepushkey hook exited with status 1
867 remote: pushkey-abort: prepushkey hook exited with status 1
853 abort: exporting bookmark @ failed!
868 abort: exporting bookmark @ failed!
854 [255]
869 [255]
855 $ hg -R ../issue4455-dest/ bookmarks
870 $ hg -R ../issue4455-dest/ bookmarks
856 no bookmarks set
871 no bookmarks set
857
872
858 $ hg push -B @ http --config devel.legacy.exchange=bundle1
873 $ hg push -B @ http --config devel.legacy.exchange=bundle1
859 pushing to http://localhost:$HGPORT/
874 pushing to http://localhost:$HGPORT/
860 searching for changes
875 searching for changes
861 no changes found
876 no changes found
862 remote: pushkey-abort: prepushkey hook exited with status 1
877 remote: pushkey-abort: prepushkey hook exited with status 1
863 exporting bookmark @ failed!
878 exporting bookmark @ failed!
864 [1]
879 [1]
865 $ hg -R ../issue4455-dest/ bookmarks
880 $ hg -R ../issue4455-dest/ bookmarks
866 no bookmarks set
881 no bookmarks set
General Comments 0
You need to be logged in to leave comments. Login now