##// END OF EJS Templates
test-bookmarks.t: avoid nested repo...
Siddharth Agarwal -
r25893:04ae6feb default
parent child Browse files
Show More
@@ -1,737 +1,737 b''
1 $ hg init
1 $ hg init
2
2
3 no bookmarks
3 no bookmarks
4
4
5 $ hg bookmarks
5 $ hg bookmarks
6 no bookmarks set
6 no bookmarks set
7
7
8 $ hg bookmarks -Tjson
8 $ hg bookmarks -Tjson
9 [
9 [
10 ]
10 ]
11
11
12 bookmark rev -1
12 bookmark rev -1
13
13
14 $ hg bookmark X
14 $ hg bookmark X
15
15
16 list bookmarks
16 list bookmarks
17
17
18 $ hg bookmarks
18 $ hg bookmarks
19 * X -1:000000000000
19 * X -1:000000000000
20
20
21 list bookmarks with color
21 list bookmarks with color
22
22
23 $ hg --config extensions.color= --config color.mode=ansi \
23 $ hg --config extensions.color= --config color.mode=ansi \
24 > bookmarks --color=always
24 > bookmarks --color=always
25 \x1b[0;32m * \x1b[0m\x1b[0;32mX\x1b[0m\x1b[0;32m -1:000000000000\x1b[0m (esc)
25 \x1b[0;32m * \x1b[0m\x1b[0;32mX\x1b[0m\x1b[0;32m -1:000000000000\x1b[0m (esc)
26
26
27 $ echo a > a
27 $ echo a > a
28 $ hg add a
28 $ hg add a
29 $ hg commit -m 0
29 $ hg commit -m 0
30
30
31 bookmark X moved to rev 0
31 bookmark X moved to rev 0
32
32
33 $ hg bookmarks
33 $ hg bookmarks
34 * X 0:f7b1eb17ad24
34 * X 0:f7b1eb17ad24
35
35
36 look up bookmark
36 look up bookmark
37
37
38 $ hg log -r X
38 $ hg log -r X
39 changeset: 0:f7b1eb17ad24
39 changeset: 0:f7b1eb17ad24
40 bookmark: X
40 bookmark: X
41 tag: tip
41 tag: tip
42 user: test
42 user: test
43 date: Thu Jan 01 00:00:00 1970 +0000
43 date: Thu Jan 01 00:00:00 1970 +0000
44 summary: 0
44 summary: 0
45
45
46
46
47 second bookmark for rev 0, command should work even with ui.strict on
47 second bookmark for rev 0, command should work even with ui.strict on
48
48
49 $ hg --config ui.strict=1 bookmark X2
49 $ hg --config ui.strict=1 bookmark X2
50
50
51 bookmark rev -1 again
51 bookmark rev -1 again
52
52
53 $ hg bookmark -r null Y
53 $ hg bookmark -r null Y
54
54
55 list bookmarks
55 list bookmarks
56
56
57 $ hg bookmarks
57 $ hg bookmarks
58 X 0:f7b1eb17ad24
58 X 0:f7b1eb17ad24
59 * X2 0:f7b1eb17ad24
59 * X2 0:f7b1eb17ad24
60 Y -1:000000000000
60 Y -1:000000000000
61
61
62 $ echo b > b
62 $ echo b > b
63 $ hg add b
63 $ hg add b
64 $ hg commit -m 1
64 $ hg commit -m 1
65
65
66 $ hg bookmarks -Tjson
66 $ hg bookmarks -Tjson
67 [
67 [
68 {
68 {
69 "active": false,
69 "active": false,
70 "bookmark": "X",
70 "bookmark": "X",
71 "node": "f7b1eb17ad24730a1651fccd46c43826d1bbc2ac",
71 "node": "f7b1eb17ad24730a1651fccd46c43826d1bbc2ac",
72 "rev": 0
72 "rev": 0
73 },
73 },
74 {
74 {
75 "active": true,
75 "active": true,
76 "bookmark": "X2",
76 "bookmark": "X2",
77 "node": "925d80f479bb026b0fb3deb27503780b13f74123",
77 "node": "925d80f479bb026b0fb3deb27503780b13f74123",
78 "rev": 1
78 "rev": 1
79 },
79 },
80 {
80 {
81 "active": false,
81 "active": false,
82 "bookmark": "Y",
82 "bookmark": "Y",
83 "node": "0000000000000000000000000000000000000000",
83 "node": "0000000000000000000000000000000000000000",
84 "rev": -1
84 "rev": -1
85 }
85 }
86 ]
86 ]
87
87
88 bookmarks revset
88 bookmarks revset
89
89
90 $ hg log -r 'bookmark()'
90 $ hg log -r 'bookmark()'
91 changeset: 0:f7b1eb17ad24
91 changeset: 0:f7b1eb17ad24
92 bookmark: X
92 bookmark: X
93 user: test
93 user: test
94 date: Thu Jan 01 00:00:00 1970 +0000
94 date: Thu Jan 01 00:00:00 1970 +0000
95 summary: 0
95 summary: 0
96
96
97 changeset: 1:925d80f479bb
97 changeset: 1:925d80f479bb
98 bookmark: X2
98 bookmark: X2
99 tag: tip
99 tag: tip
100 user: test
100 user: test
101 date: Thu Jan 01 00:00:00 1970 +0000
101 date: Thu Jan 01 00:00:00 1970 +0000
102 summary: 1
102 summary: 1
103
103
104 $ hg log -r 'bookmark(Y)'
104 $ hg log -r 'bookmark(Y)'
105 $ hg log -r 'bookmark(X2)'
105 $ hg log -r 'bookmark(X2)'
106 changeset: 1:925d80f479bb
106 changeset: 1:925d80f479bb
107 bookmark: X2
107 bookmark: X2
108 tag: tip
108 tag: tip
109 user: test
109 user: test
110 date: Thu Jan 01 00:00:00 1970 +0000
110 date: Thu Jan 01 00:00:00 1970 +0000
111 summary: 1
111 summary: 1
112
112
113 $ hg log -r 'bookmark("re:X")'
113 $ hg log -r 'bookmark("re:X")'
114 changeset: 0:f7b1eb17ad24
114 changeset: 0:f7b1eb17ad24
115 bookmark: X
115 bookmark: X
116 user: test
116 user: test
117 date: Thu Jan 01 00:00:00 1970 +0000
117 date: Thu Jan 01 00:00:00 1970 +0000
118 summary: 0
118 summary: 0
119
119
120 changeset: 1:925d80f479bb
120 changeset: 1:925d80f479bb
121 bookmark: X2
121 bookmark: X2
122 tag: tip
122 tag: tip
123 user: test
123 user: test
124 date: Thu Jan 01 00:00:00 1970 +0000
124 date: Thu Jan 01 00:00:00 1970 +0000
125 summary: 1
125 summary: 1
126
126
127 $ hg log -r 'bookmark("literal:X")'
127 $ hg log -r 'bookmark("literal:X")'
128 changeset: 0:f7b1eb17ad24
128 changeset: 0:f7b1eb17ad24
129 bookmark: X
129 bookmark: X
130 user: test
130 user: test
131 date: Thu Jan 01 00:00:00 1970 +0000
131 date: Thu Jan 01 00:00:00 1970 +0000
132 summary: 0
132 summary: 0
133
133
134
134
135 $ hg log -r 'bookmark(unknown)'
135 $ hg log -r 'bookmark(unknown)'
136 abort: bookmark 'unknown' does not exist!
136 abort: bookmark 'unknown' does not exist!
137 [255]
137 [255]
138 $ hg log -r 'bookmark("re:unknown")'
138 $ hg log -r 'bookmark("re:unknown")'
139 abort: no bookmarks exist that match 'unknown'!
139 abort: no bookmarks exist that match 'unknown'!
140 [255]
140 [255]
141 $ hg log -r 'present(bookmark("literal:unknown"))'
141 $ hg log -r 'present(bookmark("literal:unknown"))'
142 $ hg log -r 'present(bookmark("re:unknown"))'
142 $ hg log -r 'present(bookmark("re:unknown"))'
143
143
144 $ hg help revsets | grep 'bookmark('
144 $ hg help revsets | grep 'bookmark('
145 "bookmark([name])"
145 "bookmark([name])"
146
146
147 bookmarks X and X2 moved to rev 1, Y at rev -1
147 bookmarks X and X2 moved to rev 1, Y at rev -1
148
148
149 $ hg bookmarks
149 $ hg bookmarks
150 X 0:f7b1eb17ad24
150 X 0:f7b1eb17ad24
151 * X2 1:925d80f479bb
151 * X2 1:925d80f479bb
152 Y -1:000000000000
152 Y -1:000000000000
153
153
154 bookmark rev 0 again
154 bookmark rev 0 again
155
155
156 $ hg bookmark -r 0 Z
156 $ hg bookmark -r 0 Z
157
157
158 $ hg update X
158 $ hg update X
159 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
159 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
160 (activating bookmark X)
160 (activating bookmark X)
161 $ echo c > c
161 $ echo c > c
162 $ hg add c
162 $ hg add c
163 $ hg commit -m 2
163 $ hg commit -m 2
164 created new head
164 created new head
165
165
166 bookmarks X moved to rev 2, Y at rev -1, Z at rev 0
166 bookmarks X moved to rev 2, Y at rev -1, Z at rev 0
167
167
168 $ hg bookmarks
168 $ hg bookmarks
169 * X 2:db815d6d32e6
169 * X 2:db815d6d32e6
170 X2 1:925d80f479bb
170 X2 1:925d80f479bb
171 Y -1:000000000000
171 Y -1:000000000000
172 Z 0:f7b1eb17ad24
172 Z 0:f7b1eb17ad24
173
173
174 rename nonexistent bookmark
174 rename nonexistent bookmark
175
175
176 $ hg bookmark -m A B
176 $ hg bookmark -m A B
177 abort: bookmark 'A' does not exist
177 abort: bookmark 'A' does not exist
178 [255]
178 [255]
179
179
180 rename to existent bookmark
180 rename to existent bookmark
181
181
182 $ hg bookmark -m X Y
182 $ hg bookmark -m X Y
183 abort: bookmark 'Y' already exists (use -f to force)
183 abort: bookmark 'Y' already exists (use -f to force)
184 [255]
184 [255]
185
185
186 force rename to existent bookmark
186 force rename to existent bookmark
187
187
188 $ hg bookmark -f -m X Y
188 $ hg bookmark -f -m X Y
189
189
190 list bookmarks
190 list bookmarks
191
191
192 $ hg bookmark
192 $ hg bookmark
193 X2 1:925d80f479bb
193 X2 1:925d80f479bb
194 * Y 2:db815d6d32e6
194 * Y 2:db815d6d32e6
195 Z 0:f7b1eb17ad24
195 Z 0:f7b1eb17ad24
196
196
197 bookmarks from a revset
197 bookmarks from a revset
198 $ hg bookmark -r '.^1' REVSET
198 $ hg bookmark -r '.^1' REVSET
199 $ hg bookmark -r ':tip' TIP
199 $ hg bookmark -r ':tip' TIP
200 $ hg up -q TIP
200 $ hg up -q TIP
201 $ hg bookmarks
201 $ hg bookmarks
202 REVSET 0:f7b1eb17ad24
202 REVSET 0:f7b1eb17ad24
203 * TIP 2:db815d6d32e6
203 * TIP 2:db815d6d32e6
204 X2 1:925d80f479bb
204 X2 1:925d80f479bb
205 Y 2:db815d6d32e6
205 Y 2:db815d6d32e6
206 Z 0:f7b1eb17ad24
206 Z 0:f7b1eb17ad24
207
207
208 $ hg bookmark -d REVSET
208 $ hg bookmark -d REVSET
209 $ hg bookmark -d TIP
209 $ hg bookmark -d TIP
210
210
211 rename without new name or multiple names
211 rename without new name or multiple names
212
212
213 $ hg bookmark -m Y
213 $ hg bookmark -m Y
214 abort: new bookmark name required
214 abort: new bookmark name required
215 [255]
215 [255]
216 $ hg bookmark -m Y Y2 Y3
216 $ hg bookmark -m Y Y2 Y3
217 abort: only one new bookmark name allowed
217 abort: only one new bookmark name allowed
218 [255]
218 [255]
219
219
220 delete without name
220 delete without name
221
221
222 $ hg bookmark -d
222 $ hg bookmark -d
223 abort: bookmark name required
223 abort: bookmark name required
224 [255]
224 [255]
225
225
226 delete nonexistent bookmark
226 delete nonexistent bookmark
227
227
228 $ hg bookmark -d A
228 $ hg bookmark -d A
229 abort: bookmark 'A' does not exist
229 abort: bookmark 'A' does not exist
230 [255]
230 [255]
231
231
232 bookmark name with spaces should be stripped
232 bookmark name with spaces should be stripped
233
233
234 $ hg bookmark ' x y '
234 $ hg bookmark ' x y '
235
235
236 list bookmarks
236 list bookmarks
237
237
238 $ hg bookmarks
238 $ hg bookmarks
239 X2 1:925d80f479bb
239 X2 1:925d80f479bb
240 Y 2:db815d6d32e6
240 Y 2:db815d6d32e6
241 Z 0:f7b1eb17ad24
241 Z 0:f7b1eb17ad24
242 * x y 2:db815d6d32e6
242 * x y 2:db815d6d32e6
243
243
244 look up stripped bookmark name
244 look up stripped bookmark name
245
245
246 $ hg log -r '"x y"'
246 $ hg log -r '"x y"'
247 changeset: 2:db815d6d32e6
247 changeset: 2:db815d6d32e6
248 bookmark: Y
248 bookmark: Y
249 bookmark: x y
249 bookmark: x y
250 tag: tip
250 tag: tip
251 parent: 0:f7b1eb17ad24
251 parent: 0:f7b1eb17ad24
252 user: test
252 user: test
253 date: Thu Jan 01 00:00:00 1970 +0000
253 date: Thu Jan 01 00:00:00 1970 +0000
254 summary: 2
254 summary: 2
255
255
256
256
257 reject bookmark name with newline
257 reject bookmark name with newline
258
258
259 $ hg bookmark '
259 $ hg bookmark '
260 > '
260 > '
261 abort: bookmark names cannot consist entirely of whitespace
261 abort: bookmark names cannot consist entirely of whitespace
262 [255]
262 [255]
263
263
264 $ hg bookmark -m Z '
264 $ hg bookmark -m Z '
265 > '
265 > '
266 abort: bookmark names cannot consist entirely of whitespace
266 abort: bookmark names cannot consist entirely of whitespace
267 [255]
267 [255]
268
268
269 bookmark with reserved name
269 bookmark with reserved name
270
270
271 $ hg bookmark tip
271 $ hg bookmark tip
272 abort: the name 'tip' is reserved
272 abort: the name 'tip' is reserved
273 [255]
273 [255]
274
274
275 $ hg bookmark .
275 $ hg bookmark .
276 abort: the name '.' is reserved
276 abort: the name '.' is reserved
277 [255]
277 [255]
278
278
279 $ hg bookmark null
279 $ hg bookmark null
280 abort: the name 'null' is reserved
280 abort: the name 'null' is reserved
281 [255]
281 [255]
282
282
283
283
284 bookmark with existing name
284 bookmark with existing name
285
285
286 $ hg bookmark X2
286 $ hg bookmark X2
287 abort: bookmark 'X2' already exists (use -f to force)
287 abort: bookmark 'X2' already exists (use -f to force)
288 [255]
288 [255]
289
289
290 $ hg bookmark -m Y Z
290 $ hg bookmark -m Y Z
291 abort: bookmark 'Z' already exists (use -f to force)
291 abort: bookmark 'Z' already exists (use -f to force)
292 [255]
292 [255]
293
293
294 bookmark with name of branch
294 bookmark with name of branch
295
295
296 $ hg bookmark default
296 $ hg bookmark default
297 abort: a bookmark cannot have the name of an existing branch
297 abort: a bookmark cannot have the name of an existing branch
298 [255]
298 [255]
299
299
300 $ hg bookmark -m Y default
300 $ hg bookmark -m Y default
301 abort: a bookmark cannot have the name of an existing branch
301 abort: a bookmark cannot have the name of an existing branch
302 [255]
302 [255]
303
303
304 bookmark with integer name
304 bookmark with integer name
305
305
306 $ hg bookmark 10
306 $ hg bookmark 10
307 abort: cannot use an integer as a name
307 abort: cannot use an integer as a name
308 [255]
308 [255]
309
309
310 incompatible options
310 incompatible options
311
311
312 $ hg bookmark -m Y -d Z
312 $ hg bookmark -m Y -d Z
313 abort: --delete and --rename are incompatible
313 abort: --delete and --rename are incompatible
314 [255]
314 [255]
315
315
316 $ hg bookmark -r 1 -d Z
316 $ hg bookmark -r 1 -d Z
317 abort: --rev is incompatible with --delete
317 abort: --rev is incompatible with --delete
318 [255]
318 [255]
319
319
320 $ hg bookmark -r 1 -m Z Y
320 $ hg bookmark -r 1 -m Z Y
321 abort: --rev is incompatible with --rename
321 abort: --rev is incompatible with --rename
322 [255]
322 [255]
323
323
324 force bookmark with existing name
324 force bookmark with existing name
325
325
326 $ hg bookmark -f X2
326 $ hg bookmark -f X2
327
327
328 force bookmark back to where it was, should deactivate it
328 force bookmark back to where it was, should deactivate it
329
329
330 $ hg bookmark -fr1 X2
330 $ hg bookmark -fr1 X2
331 $ hg bookmarks
331 $ hg bookmarks
332 X2 1:925d80f479bb
332 X2 1:925d80f479bb
333 Y 2:db815d6d32e6
333 Y 2:db815d6d32e6
334 Z 0:f7b1eb17ad24
334 Z 0:f7b1eb17ad24
335 x y 2:db815d6d32e6
335 x y 2:db815d6d32e6
336
336
337 forward bookmark to descendant without --force
337 forward bookmark to descendant without --force
338
338
339 $ hg bookmark Z
339 $ hg bookmark Z
340 moving bookmark 'Z' forward from f7b1eb17ad24
340 moving bookmark 'Z' forward from f7b1eb17ad24
341
341
342 list bookmarks
342 list bookmarks
343
343
344 $ hg bookmark
344 $ hg bookmark
345 X2 1:925d80f479bb
345 X2 1:925d80f479bb
346 Y 2:db815d6d32e6
346 Y 2:db815d6d32e6
347 * Z 2:db815d6d32e6
347 * Z 2:db815d6d32e6
348 x y 2:db815d6d32e6
348 x y 2:db815d6d32e6
349
349
350 revision but no bookmark name
350 revision but no bookmark name
351
351
352 $ hg bookmark -r .
352 $ hg bookmark -r .
353 abort: bookmark name required
353 abort: bookmark name required
354 [255]
354 [255]
355
355
356 bookmark name with whitespace only
356 bookmark name with whitespace only
357
357
358 $ hg bookmark ' '
358 $ hg bookmark ' '
359 abort: bookmark names cannot consist entirely of whitespace
359 abort: bookmark names cannot consist entirely of whitespace
360 [255]
360 [255]
361
361
362 $ hg bookmark -m Y ' '
362 $ hg bookmark -m Y ' '
363 abort: bookmark names cannot consist entirely of whitespace
363 abort: bookmark names cannot consist entirely of whitespace
364 [255]
364 [255]
365
365
366 invalid bookmark
366 invalid bookmark
367
367
368 $ hg bookmark 'foo:bar'
368 $ hg bookmark 'foo:bar'
369 abort: ':' cannot be used in a name
369 abort: ':' cannot be used in a name
370 [255]
370 [255]
371
371
372 $ hg bookmark 'foo
372 $ hg bookmark 'foo
373 > bar'
373 > bar'
374 abort: '\n' cannot be used in a name
374 abort: '\n' cannot be used in a name
375 [255]
375 [255]
376
376
377 the bookmark extension should be ignored now that it is part of core
377 the bookmark extension should be ignored now that it is part of core
378
378
379 $ echo "[extensions]" >> $HGRCPATH
379 $ echo "[extensions]" >> $HGRCPATH
380 $ echo "bookmarks=" >> $HGRCPATH
380 $ echo "bookmarks=" >> $HGRCPATH
381 $ hg bookmarks
381 $ hg bookmarks
382 X2 1:925d80f479bb
382 X2 1:925d80f479bb
383 Y 2:db815d6d32e6
383 Y 2:db815d6d32e6
384 * Z 2:db815d6d32e6
384 * Z 2:db815d6d32e6
385 x y 2:db815d6d32e6
385 x y 2:db815d6d32e6
386
386
387 test summary
387 test summary
388
388
389 $ hg summary
389 $ hg summary
390 parent: 2:db815d6d32e6 tip
390 parent: 2:db815d6d32e6 tip
391 2
391 2
392 branch: default
392 branch: default
393 bookmarks: *Z Y x y
393 bookmarks: *Z Y x y
394 commit: (clean)
394 commit: (clean)
395 update: 1 new changesets, 2 branch heads (merge)
395 update: 1 new changesets, 2 branch heads (merge)
396 phases: 3 draft
396 phases: 3 draft
397
397
398 test id
398 test id
399
399
400 $ hg id
400 $ hg id
401 db815d6d32e6 tip Y/Z/x y
401 db815d6d32e6 tip Y/Z/x y
402
402
403 test rollback
403 test rollback
404
404
405 $ echo foo > f1
405 $ echo foo > f1
406 $ hg bookmark tmp-rollback
406 $ hg bookmark tmp-rollback
407 $ hg ci -Amr
407 $ hg ci -Amr
408 adding f1
408 adding f1
409 $ hg bookmarks
409 $ hg bookmarks
410 X2 1:925d80f479bb
410 X2 1:925d80f479bb
411 Y 2:db815d6d32e6
411 Y 2:db815d6d32e6
412 Z 2:db815d6d32e6
412 Z 2:db815d6d32e6
413 * tmp-rollback 3:2bf5cfec5864
413 * tmp-rollback 3:2bf5cfec5864
414 x y 2:db815d6d32e6
414 x y 2:db815d6d32e6
415 $ hg rollback
415 $ hg rollback
416 repository tip rolled back to revision 2 (undo commit)
416 repository tip rolled back to revision 2 (undo commit)
417 working directory now based on revision 2
417 working directory now based on revision 2
418 $ hg bookmarks
418 $ hg bookmarks
419 X2 1:925d80f479bb
419 X2 1:925d80f479bb
420 Y 2:db815d6d32e6
420 Y 2:db815d6d32e6
421 Z 2:db815d6d32e6
421 Z 2:db815d6d32e6
422 * tmp-rollback 2:db815d6d32e6
422 * tmp-rollback 2:db815d6d32e6
423 x y 2:db815d6d32e6
423 x y 2:db815d6d32e6
424 $ hg bookmark -f Z -r 1
424 $ hg bookmark -f Z -r 1
425 $ hg rollback
425 $ hg rollback
426 repository tip rolled back to revision 2 (undo bookmark)
426 repository tip rolled back to revision 2 (undo bookmark)
427 $ hg bookmarks
427 $ hg bookmarks
428 X2 1:925d80f479bb
428 X2 1:925d80f479bb
429 Y 2:db815d6d32e6
429 Y 2:db815d6d32e6
430 Z 2:db815d6d32e6
430 Z 2:db815d6d32e6
431 * tmp-rollback 2:db815d6d32e6
431 * tmp-rollback 2:db815d6d32e6
432 x y 2:db815d6d32e6
432 x y 2:db815d6d32e6
433 $ hg bookmark -d tmp-rollback
433 $ hg bookmark -d tmp-rollback
434
434
435 activate bookmark on working dir parent without --force
435 activate bookmark on working dir parent without --force
436
436
437 $ hg bookmark --inactive Z
437 $ hg bookmark --inactive Z
438 $ hg bookmark Z
438 $ hg bookmark Z
439
439
440 test clone
440 test clone
441
441
442 $ hg bookmark -r 2 -i @
442 $ hg bookmark -r 2 -i @
443 $ hg bookmark -r 2 -i a@
443 $ hg bookmark -r 2 -i a@
444 $ hg bookmarks
444 $ hg bookmarks
445 @ 2:db815d6d32e6
445 @ 2:db815d6d32e6
446 X2 1:925d80f479bb
446 X2 1:925d80f479bb
447 Y 2:db815d6d32e6
447 Y 2:db815d6d32e6
448 * Z 2:db815d6d32e6
448 * Z 2:db815d6d32e6
449 a@ 2:db815d6d32e6
449 a@ 2:db815d6d32e6
450 x y 2:db815d6d32e6
450 x y 2:db815d6d32e6
451 $ hg clone . cloned-bookmarks
451 $ hg clone . cloned-bookmarks
452 updating to bookmark @
452 updating to bookmark @
453 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
453 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
454 $ hg -R cloned-bookmarks bookmarks
454 $ hg -R cloned-bookmarks bookmarks
455 * @ 2:db815d6d32e6
455 * @ 2:db815d6d32e6
456 X2 1:925d80f479bb
456 X2 1:925d80f479bb
457 Y 2:db815d6d32e6
457 Y 2:db815d6d32e6
458 Z 2:db815d6d32e6
458 Z 2:db815d6d32e6
459 a@ 2:db815d6d32e6
459 a@ 2:db815d6d32e6
460 x y 2:db815d6d32e6
460 x y 2:db815d6d32e6
461
461
462 test clone with pull protocol
462 test clone with pull protocol
463
463
464 $ hg clone --pull . cloned-bookmarks-pull
464 $ hg clone --pull . cloned-bookmarks-pull
465 requesting all changes
465 requesting all changes
466 adding changesets
466 adding changesets
467 adding manifests
467 adding manifests
468 adding file changes
468 adding file changes
469 added 3 changesets with 3 changes to 3 files (+1 heads)
469 added 3 changesets with 3 changes to 3 files (+1 heads)
470 updating to bookmark @
470 updating to bookmark @
471 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
471 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
472 $ hg -R cloned-bookmarks-pull bookmarks
472 $ hg -R cloned-bookmarks-pull bookmarks
473 * @ 2:db815d6d32e6
473 * @ 2:db815d6d32e6
474 X2 1:925d80f479bb
474 X2 1:925d80f479bb
475 Y 2:db815d6d32e6
475 Y 2:db815d6d32e6
476 Z 2:db815d6d32e6
476 Z 2:db815d6d32e6
477 a@ 2:db815d6d32e6
477 a@ 2:db815d6d32e6
478 x y 2:db815d6d32e6
478 x y 2:db815d6d32e6
479
479
480 delete multiple bookmarks at once
480 delete multiple bookmarks at once
481
481
482 $ hg bookmark -d @ a@
482 $ hg bookmark -d @ a@
483
483
484 test clone with a bookmark named "default" (issue3677)
484 test clone with a bookmark named "default" (issue3677)
485
485
486 $ hg bookmark -r 1 -f -i default
486 $ hg bookmark -r 1 -f -i default
487 $ hg clone . cloned-bookmark-default
487 $ hg clone . cloned-bookmark-default
488 updating to branch default
488 updating to branch default
489 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
489 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
490 $ hg -R cloned-bookmark-default bookmarks
490 $ hg -R cloned-bookmark-default bookmarks
491 X2 1:925d80f479bb
491 X2 1:925d80f479bb
492 Y 2:db815d6d32e6
492 Y 2:db815d6d32e6
493 Z 2:db815d6d32e6
493 Z 2:db815d6d32e6
494 default 1:925d80f479bb
494 default 1:925d80f479bb
495 x y 2:db815d6d32e6
495 x y 2:db815d6d32e6
496 $ hg -R cloned-bookmark-default parents -q
496 $ hg -R cloned-bookmark-default parents -q
497 2:db815d6d32e6
497 2:db815d6d32e6
498 $ hg bookmark -d default
498 $ hg bookmark -d default
499
499
500 test clone with a specific revision
500 test clone with a specific revision
501
501
502 $ hg clone -r 925d80 . cloned-bookmarks-rev
502 $ hg clone -r 925d80 . cloned-bookmarks-rev
503 adding changesets
503 adding changesets
504 adding manifests
504 adding manifests
505 adding file changes
505 adding file changes
506 added 2 changesets with 2 changes to 2 files
506 added 2 changesets with 2 changes to 2 files
507 updating to branch default
507 updating to branch default
508 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
508 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
509 $ hg -R cloned-bookmarks-rev bookmarks
509 $ hg -R cloned-bookmarks-rev bookmarks
510 X2 1:925d80f479bb
510 X2 1:925d80f479bb
511
511
512 test clone with update to a bookmark
512 test clone with update to a bookmark
513
513
514 $ hg clone -u Z . cloned-bookmarks-update
514 $ hg clone -u Z . ../cloned-bookmarks-update
515 updating to branch default
515 updating to branch default
516 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
516 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
517 $ hg -R cloned-bookmarks-update bookmarks
517 $ hg -R ../cloned-bookmarks-update bookmarks
518 X2 1:925d80f479bb
518 X2 1:925d80f479bb
519 Y 2:db815d6d32e6
519 Y 2:db815d6d32e6
520 * Z 2:db815d6d32e6
520 * Z 2:db815d6d32e6
521 x y 2:db815d6d32e6
521 x y 2:db815d6d32e6
522
522
523 create bundle with two heads
523 create bundle with two heads
524
524
525 $ hg clone . tobundle
525 $ hg clone . tobundle
526 updating to branch default
526 updating to branch default
527 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
527 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
528 $ echo x > tobundle/x
528 $ echo x > tobundle/x
529 $ hg -R tobundle add tobundle/x
529 $ hg -R tobundle add tobundle/x
530 $ hg -R tobundle commit -m'x'
530 $ hg -R tobundle commit -m'x'
531 $ hg -R tobundle update -r -2
531 $ hg -R tobundle update -r -2
532 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
532 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
533 $ echo y > tobundle/y
533 $ echo y > tobundle/y
534 $ hg -R tobundle branch test
534 $ hg -R tobundle branch test
535 marked working directory as branch test
535 marked working directory as branch test
536 (branches are permanent and global, did you want a bookmark?)
536 (branches are permanent and global, did you want a bookmark?)
537 $ hg -R tobundle add tobundle/y
537 $ hg -R tobundle add tobundle/y
538 $ hg -R tobundle commit -m'y'
538 $ hg -R tobundle commit -m'y'
539 $ hg -R tobundle bundle tobundle.hg
539 $ hg -R tobundle bundle tobundle.hg
540 searching for changes
540 searching for changes
541 2 changesets found
541 2 changesets found
542 $ hg unbundle tobundle.hg
542 $ hg unbundle tobundle.hg
543 adding changesets
543 adding changesets
544 adding manifests
544 adding manifests
545 adding file changes
545 adding file changes
546 added 2 changesets with 2 changes to 2 files (+1 heads)
546 added 2 changesets with 2 changes to 2 files (+1 heads)
547 (run 'hg heads' to see heads, 'hg merge' to merge)
547 (run 'hg heads' to see heads, 'hg merge' to merge)
548
548
549 update to active bookmark if it's not the parent
549 update to active bookmark if it's not the parent
550
550
551 $ hg summary
551 $ hg summary
552 parent: 2:db815d6d32e6
552 parent: 2:db815d6d32e6
553 2
553 2
554 branch: default
554 branch: default
555 bookmarks: *Z Y x y
555 bookmarks: *Z Y x y
556 commit: 1 added, 1 unknown (new branch head)
556 commit: 1 added, 1 unknown (new branch head)
557 update: 2 new changesets (update)
557 update: 2 new changesets (update)
558 phases: 5 draft
558 phases: 5 draft
559 $ hg update
559 $ hg update
560 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
560 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
561 updating bookmark Z
561 updating bookmark Z
562 $ hg bookmarks
562 $ hg bookmarks
563 X2 1:925d80f479bb
563 X2 1:925d80f479bb
564 Y 2:db815d6d32e6
564 Y 2:db815d6d32e6
565 * Z 3:125c9a1d6df6
565 * Z 3:125c9a1d6df6
566 x y 2:db815d6d32e6
566 x y 2:db815d6d32e6
567
567
568 pull --update works the same as pull && update
568 pull --update works the same as pull && update
569
569
570 $ hg bookmark -r3 Y
570 $ hg bookmark -r3 Y
571 moving bookmark 'Y' forward from db815d6d32e6
571 moving bookmark 'Y' forward from db815d6d32e6
572 $ hg -R cloned-bookmarks-update update Y
572 $ hg -R ../cloned-bookmarks-update update Y
573 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
573 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
574 (activating bookmark Y)
574 (activating bookmark Y)
575 $ hg -R cloned-bookmarks-update pull --update .
575 $ hg -R ../cloned-bookmarks-update pull --update .
576 pulling from .
576 pulling from .
577 searching for changes
577 searching for changes
578 adding changesets
578 adding changesets
579 adding manifests
579 adding manifests
580 adding file changes
580 adding file changes
581 added 2 changesets with 2 changes to 2 files (+1 heads)
581 added 2 changesets with 2 changes to 2 files (+1 heads)
582 updating bookmark Y
582 updating bookmark Y
583 updating bookmark Z
583 updating bookmark Z
584 updating to active bookmark Y
584 updating to active bookmark Y
585 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
585 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
586
586
587 test wrongly formated bookmark
587 test wrongly formated bookmark
588
588
589 $ echo '' >> .hg/bookmarks
589 $ echo '' >> .hg/bookmarks
590 $ hg bookmarks
590 $ hg bookmarks
591 X2 1:925d80f479bb
591 X2 1:925d80f479bb
592 Y 3:125c9a1d6df6
592 Y 3:125c9a1d6df6
593 * Z 3:125c9a1d6df6
593 * Z 3:125c9a1d6df6
594 x y 2:db815d6d32e6
594 x y 2:db815d6d32e6
595 $ echo "Ican'thasformatedlines" >> .hg/bookmarks
595 $ echo "Ican'thasformatedlines" >> .hg/bookmarks
596 $ hg bookmarks
596 $ hg bookmarks
597 malformed line in .hg/bookmarks: "Ican'thasformatedlines"
597 malformed line in .hg/bookmarks: "Ican'thasformatedlines"
598 X2 1:925d80f479bb
598 X2 1:925d80f479bb
599 Y 3:125c9a1d6df6
599 Y 3:125c9a1d6df6
600 * Z 3:125c9a1d6df6
600 * Z 3:125c9a1d6df6
601 x y 2:db815d6d32e6
601 x y 2:db815d6d32e6
602
602
603 test missing revisions
603 test missing revisions
604
604
605 $ echo "925d80f479bc z" > .hg/bookmarks
605 $ echo "925d80f479bc z" > .hg/bookmarks
606 $ hg book
606 $ hg book
607 no bookmarks set
607 no bookmarks set
608
608
609 test stripping a non-checked-out but bookmarked revision
609 test stripping a non-checked-out but bookmarked revision
610
610
611 $ hg log --graph
611 $ hg log --graph
612 o changeset: 4:9ba5f110a0b3
612 o changeset: 4:9ba5f110a0b3
613 | branch: test
613 | branch: test
614 | tag: tip
614 | tag: tip
615 | parent: 2:db815d6d32e6
615 | parent: 2:db815d6d32e6
616 | user: test
616 | user: test
617 | date: Thu Jan 01 00:00:00 1970 +0000
617 | date: Thu Jan 01 00:00:00 1970 +0000
618 | summary: y
618 | summary: y
619 |
619 |
620 | @ changeset: 3:125c9a1d6df6
620 | @ changeset: 3:125c9a1d6df6
621 |/ user: test
621 |/ user: test
622 | date: Thu Jan 01 00:00:00 1970 +0000
622 | date: Thu Jan 01 00:00:00 1970 +0000
623 | summary: x
623 | summary: x
624 |
624 |
625 o changeset: 2:db815d6d32e6
625 o changeset: 2:db815d6d32e6
626 | parent: 0:f7b1eb17ad24
626 | parent: 0:f7b1eb17ad24
627 | user: test
627 | user: test
628 | date: Thu Jan 01 00:00:00 1970 +0000
628 | date: Thu Jan 01 00:00:00 1970 +0000
629 | summary: 2
629 | summary: 2
630 |
630 |
631 | o changeset: 1:925d80f479bb
631 | o changeset: 1:925d80f479bb
632 |/ user: test
632 |/ user: test
633 | date: Thu Jan 01 00:00:00 1970 +0000
633 | date: Thu Jan 01 00:00:00 1970 +0000
634 | summary: 1
634 | summary: 1
635 |
635 |
636 o changeset: 0:f7b1eb17ad24
636 o changeset: 0:f7b1eb17ad24
637 user: test
637 user: test
638 date: Thu Jan 01 00:00:00 1970 +0000
638 date: Thu Jan 01 00:00:00 1970 +0000
639 summary: 0
639 summary: 0
640
640
641 $ hg book should-end-on-two
641 $ hg book should-end-on-two
642 $ hg co --clean 4
642 $ hg co --clean 4
643 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
643 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
644 (leaving bookmark should-end-on-two)
644 (leaving bookmark should-end-on-two)
645 $ hg book four
645 $ hg book four
646 $ hg --config extensions.mq= strip 3
646 $ hg --config extensions.mq= strip 3
647 saved backup bundle to * (glob)
647 saved backup bundle to * (glob)
648 should-end-on-two should end up pointing to revision 2, as that's the
648 should-end-on-two should end up pointing to revision 2, as that's the
649 tipmost surviving ancestor of the stripped revision.
649 tipmost surviving ancestor of the stripped revision.
650 $ hg log --graph
650 $ hg log --graph
651 @ changeset: 3:9ba5f110a0b3
651 @ changeset: 3:9ba5f110a0b3
652 | branch: test
652 | branch: test
653 | bookmark: four
653 | bookmark: four
654 | tag: tip
654 | tag: tip
655 | user: test
655 | user: test
656 | date: Thu Jan 01 00:00:00 1970 +0000
656 | date: Thu Jan 01 00:00:00 1970 +0000
657 | summary: y
657 | summary: y
658 |
658 |
659 o changeset: 2:db815d6d32e6
659 o changeset: 2:db815d6d32e6
660 | bookmark: should-end-on-two
660 | bookmark: should-end-on-two
661 | parent: 0:f7b1eb17ad24
661 | parent: 0:f7b1eb17ad24
662 | user: test
662 | user: test
663 | date: Thu Jan 01 00:00:00 1970 +0000
663 | date: Thu Jan 01 00:00:00 1970 +0000
664 | summary: 2
664 | summary: 2
665 |
665 |
666 | o changeset: 1:925d80f479bb
666 | o changeset: 1:925d80f479bb
667 |/ user: test
667 |/ user: test
668 | date: Thu Jan 01 00:00:00 1970 +0000
668 | date: Thu Jan 01 00:00:00 1970 +0000
669 | summary: 1
669 | summary: 1
670 |
670 |
671 o changeset: 0:f7b1eb17ad24
671 o changeset: 0:f7b1eb17ad24
672 user: test
672 user: test
673 date: Thu Jan 01 00:00:00 1970 +0000
673 date: Thu Jan 01 00:00:00 1970 +0000
674 summary: 0
674 summary: 0
675
675
676 test non-linear update not clearing active bookmark
676 test non-linear update not clearing active bookmark
677
677
678 $ hg up 1
678 $ hg up 1
679 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
679 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
680 (leaving bookmark four)
680 (leaving bookmark four)
681 $ hg book drop
681 $ hg book drop
682 $ hg up -C
682 $ hg up -C
683 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
683 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
684 (leaving bookmark drop)
684 (leaving bookmark drop)
685 $ hg sum
685 $ hg sum
686 parent: 2:db815d6d32e6
686 parent: 2:db815d6d32e6
687 2
687 2
688 branch: default
688 branch: default
689 bookmarks: should-end-on-two
689 bookmarks: should-end-on-two
690 commit: 2 unknown (clean)
690 commit: 2 unknown (clean)
691 update: 1 new changesets, 2 branch heads (merge)
691 update: 1 new changesets, 2 branch heads (merge)
692 phases: 4 draft
692 phases: 4 draft
693 $ hg book
693 $ hg book
694 drop 1:925d80f479bb
694 drop 1:925d80f479bb
695 four 3:9ba5f110a0b3
695 four 3:9ba5f110a0b3
696 should-end-on-two 2:db815d6d32e6
696 should-end-on-two 2:db815d6d32e6
697 $ hg book -d drop
697 $ hg book -d drop
698 $ hg up four
698 $ hg up four
699 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
699 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
700 (activating bookmark four)
700 (activating bookmark four)
701
701
702 test clearing divergent bookmarks of linear ancestors
702 test clearing divergent bookmarks of linear ancestors
703
703
704 $ hg bookmark Z -r 0
704 $ hg bookmark Z -r 0
705 $ hg bookmark Z@1 -r 1
705 $ hg bookmark Z@1 -r 1
706 $ hg bookmark Z@2 -r 2
706 $ hg bookmark Z@2 -r 2
707 $ hg bookmark Z@3 -r 3
707 $ hg bookmark Z@3 -r 3
708 $ hg book
708 $ hg book
709 Z 0:f7b1eb17ad24
709 Z 0:f7b1eb17ad24
710 Z@1 1:925d80f479bb
710 Z@1 1:925d80f479bb
711 Z@2 2:db815d6d32e6
711 Z@2 2:db815d6d32e6
712 Z@3 3:9ba5f110a0b3
712 Z@3 3:9ba5f110a0b3
713 * four 3:9ba5f110a0b3
713 * four 3:9ba5f110a0b3
714 should-end-on-two 2:db815d6d32e6
714 should-end-on-two 2:db815d6d32e6
715 $ hg bookmark Z
715 $ hg bookmark Z
716 moving bookmark 'Z' forward from f7b1eb17ad24
716 moving bookmark 'Z' forward from f7b1eb17ad24
717 $ hg book
717 $ hg book
718 * Z 3:9ba5f110a0b3
718 * Z 3:9ba5f110a0b3
719 Z@1 1:925d80f479bb
719 Z@1 1:925d80f479bb
720 four 3:9ba5f110a0b3
720 four 3:9ba5f110a0b3
721 should-end-on-two 2:db815d6d32e6
721 should-end-on-two 2:db815d6d32e6
722
722
723 test clearing only a single divergent bookmark across branches
723 test clearing only a single divergent bookmark across branches
724
724
725 $ hg book foo -r 1
725 $ hg book foo -r 1
726 $ hg book foo@1 -r 0
726 $ hg book foo@1 -r 0
727 $ hg book foo@2 -r 2
727 $ hg book foo@2 -r 2
728 $ hg book foo@3 -r 3
728 $ hg book foo@3 -r 3
729 $ hg book foo -r foo@3
729 $ hg book foo -r foo@3
730 $ hg book
730 $ hg book
731 * Z 3:9ba5f110a0b3
731 * Z 3:9ba5f110a0b3
732 Z@1 1:925d80f479bb
732 Z@1 1:925d80f479bb
733 foo 3:9ba5f110a0b3
733 foo 3:9ba5f110a0b3
734 foo@1 0:f7b1eb17ad24
734 foo@1 0:f7b1eb17ad24
735 foo@2 2:db815d6d32e6
735 foo@2 2:db815d6d32e6
736 four 3:9ba5f110a0b3
736 four 3:9ba5f110a0b3
737 should-end-on-two 2:db815d6d32e6
737 should-end-on-two 2:db815d6d32e6
General Comments 0
You need to be logged in to leave comments. Login now