##// END OF EJS Templates
bookmarks: fix test broken by 0bba1ff2ac7b...
Kevin Bullock -
r18774:b616c9b8 default
parent child Browse files
Show More
@@ -1,579 +1,579 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 bookmark rev -1
8 bookmark rev -1
9
9
10 $ hg bookmark X
10 $ hg bookmark X
11
11
12 list bookmarks
12 list bookmarks
13
13
14 $ hg bookmarks
14 $ hg bookmarks
15 * X -1:000000000000
15 * X -1:000000000000
16
16
17 list bookmarks with color
17 list bookmarks with color
18
18
19 $ hg --config extensions.color= --config color.mode=ansi \
19 $ hg --config extensions.color= --config color.mode=ansi \
20 > bookmarks --color=always
20 > bookmarks --color=always
21 \x1b[0;32m * X -1:000000000000\x1b[0m (esc)
21 \x1b[0;32m * X -1:000000000000\x1b[0m (esc)
22
22
23 $ echo a > a
23 $ echo a > a
24 $ hg add a
24 $ hg add a
25 $ hg commit -m 0
25 $ hg commit -m 0
26
26
27 bookmark X moved to rev 0
27 bookmark X moved to rev 0
28
28
29 $ hg bookmarks
29 $ hg bookmarks
30 * X 0:f7b1eb17ad24
30 * X 0:f7b1eb17ad24
31
31
32 look up bookmark
32 look up bookmark
33
33
34 $ hg log -r X
34 $ hg log -r X
35 changeset: 0:f7b1eb17ad24
35 changeset: 0:f7b1eb17ad24
36 bookmark: X
36 bookmark: X
37 tag: tip
37 tag: tip
38 user: test
38 user: test
39 date: Thu Jan 01 00:00:00 1970 +0000
39 date: Thu Jan 01 00:00:00 1970 +0000
40 summary: 0
40 summary: 0
41
41
42
42
43 second bookmark for rev 0, command should work even with ui.strict on
43 second bookmark for rev 0, command should work even with ui.strict on
44
44
45 $ hg --config ui.strict=1 bookmark X2
45 $ hg --config ui.strict=1 bookmark X2
46
46
47 bookmark rev -1 again
47 bookmark rev -1 again
48
48
49 $ hg bookmark -r null Y
49 $ hg bookmark -r null Y
50
50
51 list bookmarks
51 list bookmarks
52
52
53 $ hg bookmarks
53 $ hg bookmarks
54 X 0:f7b1eb17ad24
54 X 0:f7b1eb17ad24
55 * X2 0:f7b1eb17ad24
55 * X2 0:f7b1eb17ad24
56 Y -1:000000000000
56 Y -1:000000000000
57
57
58 $ echo b > b
58 $ echo b > b
59 $ hg add b
59 $ hg add b
60 $ hg commit -m 1
60 $ hg commit -m 1
61
61
62 bookmarks revset
62 bookmarks revset
63
63
64 $ hg log -r 'bookmark()'
64 $ hg log -r 'bookmark()'
65 changeset: 0:f7b1eb17ad24
65 changeset: 0:f7b1eb17ad24
66 bookmark: X
66 bookmark: X
67 user: test
67 user: test
68 date: Thu Jan 01 00:00:00 1970 +0000
68 date: Thu Jan 01 00:00:00 1970 +0000
69 summary: 0
69 summary: 0
70
70
71 changeset: 1:925d80f479bb
71 changeset: 1:925d80f479bb
72 bookmark: X2
72 bookmark: X2
73 tag: tip
73 tag: tip
74 user: test
74 user: test
75 date: Thu Jan 01 00:00:00 1970 +0000
75 date: Thu Jan 01 00:00:00 1970 +0000
76 summary: 1
76 summary: 1
77
77
78 $ hg log -r 'bookmark(Y)'
78 $ hg log -r 'bookmark(Y)'
79 $ hg log -r 'bookmark(X2)'
79 $ hg log -r 'bookmark(X2)'
80 changeset: 1:925d80f479bb
80 changeset: 1:925d80f479bb
81 bookmark: X2
81 bookmark: X2
82 tag: tip
82 tag: tip
83 user: test
83 user: test
84 date: Thu Jan 01 00:00:00 1970 +0000
84 date: Thu Jan 01 00:00:00 1970 +0000
85 summary: 1
85 summary: 1
86
86
87 $ hg log -r 'bookmark("re:X")'
87 $ hg log -r 'bookmark("re:X")'
88 changeset: 0:f7b1eb17ad24
88 changeset: 0:f7b1eb17ad24
89 bookmark: X
89 bookmark: X
90 user: test
90 user: test
91 date: Thu Jan 01 00:00:00 1970 +0000
91 date: Thu Jan 01 00:00:00 1970 +0000
92 summary: 0
92 summary: 0
93
93
94 changeset: 1:925d80f479bb
94 changeset: 1:925d80f479bb
95 bookmark: X2
95 bookmark: X2
96 tag: tip
96 tag: tip
97 user: test
97 user: test
98 date: Thu Jan 01 00:00:00 1970 +0000
98 date: Thu Jan 01 00:00:00 1970 +0000
99 summary: 1
99 summary: 1
100
100
101 $ hg log -r 'bookmark(unknown)'
101 $ hg log -r 'bookmark(unknown)'
102 abort: bookmark 'unknown' does not exist
102 abort: bookmark 'unknown' does not exist
103 [255]
103 [255]
104
104
105 $ hg help revsets | grep 'bookmark('
105 $ hg help revsets | grep 'bookmark('
106 "bookmark([name])"
106 "bookmark([name])"
107
107
108 bookmarks X and X2 moved to rev 1, Y at rev -1
108 bookmarks X and X2 moved to rev 1, Y at rev -1
109
109
110 $ hg bookmarks
110 $ hg bookmarks
111 X 0:f7b1eb17ad24
111 X 0:f7b1eb17ad24
112 * X2 1:925d80f479bb
112 * X2 1:925d80f479bb
113 Y -1:000000000000
113 Y -1:000000000000
114
114
115 bookmark rev 0 again
115 bookmark rev 0 again
116
116
117 $ hg bookmark -r 0 Z
117 $ hg bookmark -r 0 Z
118
118
119 $ hg update X
119 $ hg update X
120 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
120 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
121 $ echo c > c
121 $ echo c > c
122 $ hg add c
122 $ hg add c
123 $ hg commit -m 2
123 $ hg commit -m 2
124 created new head
124 created new head
125
125
126 bookmarks X moved to rev 2, Y at rev -1, Z at rev 0
126 bookmarks X moved to rev 2, Y at rev -1, Z at rev 0
127
127
128 $ hg bookmarks
128 $ hg bookmarks
129 * X 2:db815d6d32e6
129 * X 2:db815d6d32e6
130 X2 1:925d80f479bb
130 X2 1:925d80f479bb
131 Y -1:000000000000
131 Y -1:000000000000
132 Z 0:f7b1eb17ad24
132 Z 0:f7b1eb17ad24
133
133
134 rename nonexistent bookmark
134 rename nonexistent bookmark
135
135
136 $ hg bookmark -m A B
136 $ hg bookmark -m A B
137 abort: bookmark 'A' does not exist
137 abort: bookmark 'A' does not exist
138 [255]
138 [255]
139
139
140 rename to existent bookmark
140 rename to existent bookmark
141
141
142 $ hg bookmark -m X Y
142 $ hg bookmark -m X Y
143 abort: bookmark 'Y' already exists (use -f to force)
143 abort: bookmark 'Y' already exists (use -f to force)
144 [255]
144 [255]
145
145
146 force rename to existent bookmark
146 force rename to existent bookmark
147
147
148 $ hg bookmark -f -m X Y
148 $ hg bookmark -f -m X Y
149
149
150 list bookmarks
150 list bookmarks
151
151
152 $ hg bookmark
152 $ hg bookmark
153 X2 1:925d80f479bb
153 X2 1:925d80f479bb
154 * Y 2:db815d6d32e6
154 * Y 2:db815d6d32e6
155 Z 0:f7b1eb17ad24
155 Z 0:f7b1eb17ad24
156
156
157 bookmarks from a revset
157 bookmarks from a revset
158 $ hg bookmark -r '.^1' REVSET
158 $ hg bookmark -r '.^1' REVSET
159 $ hg bookmark -r ':tip' TIP
159 $ hg bookmark -r ':tip' TIP
160 $ hg bookmarks
160 $ hg bookmarks
161 REVSET 0:f7b1eb17ad24
161 REVSET 0:f7b1eb17ad24
162 * TIP 2:db815d6d32e6
162 * TIP 2:db815d6d32e6
163 X2 1:925d80f479bb
163 X2 1:925d80f479bb
164 Y 2:db815d6d32e6
164 Y 2:db815d6d32e6
165 Z 0:f7b1eb17ad24
165 Z 0:f7b1eb17ad24
166
166
167 $ hg bookmark -d REVSET
167 $ hg bookmark -d REVSET
168 $ hg bookmark -d TIP
168 $ hg bookmark -d TIP
169
169
170 rename without new name
170 rename without new name
171
171
172 $ hg bookmark -m Y
172 $ hg bookmark -m Y
173 abort: new bookmark name required
173 abort: new bookmark name required
174 [255]
174 [255]
175
175
176 delete without name
176 delete without name
177
177
178 $ hg bookmark -d
178 $ hg bookmark -d
179 abort: bookmark name required
179 abort: bookmark name required
180 [255]
180 [255]
181
181
182 delete nonexistent bookmark
182 delete nonexistent bookmark
183
183
184 $ hg bookmark -d A
184 $ hg bookmark -d A
185 abort: bookmark 'A' does not exist
185 abort: bookmark 'A' does not exist
186 [255]
186 [255]
187
187
188 bookmark name with spaces should be stripped
188 bookmark name with spaces should be stripped
189
189
190 $ hg bookmark ' x y '
190 $ hg bookmark ' x y '
191
191
192 list bookmarks
192 list bookmarks
193
193
194 $ hg bookmarks
194 $ hg bookmarks
195 X2 1:925d80f479bb
195 X2 1:925d80f479bb
196 Y 2:db815d6d32e6
196 Y 2:db815d6d32e6
197 Z 0:f7b1eb17ad24
197 Z 0:f7b1eb17ad24
198 * x y 2:db815d6d32e6
198 * x y 2:db815d6d32e6
199
199
200 look up stripped bookmark name
200 look up stripped bookmark name
201
201
202 $ hg log -r '"x y"'
202 $ hg log -r '"x y"'
203 changeset: 2:db815d6d32e6
203 changeset: 2:db815d6d32e6
204 bookmark: Y
204 bookmark: Y
205 bookmark: x y
205 bookmark: x y
206 tag: tip
206 tag: tip
207 parent: 0:f7b1eb17ad24
207 parent: 0:f7b1eb17ad24
208 user: test
208 user: test
209 date: Thu Jan 01 00:00:00 1970 +0000
209 date: Thu Jan 01 00:00:00 1970 +0000
210 summary: 2
210 summary: 2
211
211
212
212
213 reject bookmark name with newline
213 reject bookmark name with newline
214
214
215 $ hg bookmark '
215 $ hg bookmark '
216 > '
216 > '
217 abort: bookmark names cannot consist entirely of whitespace
217 abort: bookmark names cannot consist entirely of whitespace
218 [255]
218 [255]
219
219
220 $ hg bookmark -m Z '
220 $ hg bookmark -m Z '
221 > '
221 > '
222 abort: bookmark names cannot consist entirely of whitespace
222 abort: bookmark names cannot consist entirely of whitespace
223 [255]
223 [255]
224
224
225 bookmark with reserved name
225 bookmark with reserved name
226
226
227 $ hg bookmark tip
227 $ hg bookmark tip
228 abort: the name 'tip' is reserved
228 abort: the name 'tip' is reserved
229 [255]
229 [255]
230
230
231 $ hg bookmark .
231 $ hg bookmark .
232 abort: the name '.' is reserved
232 abort: the name '.' is reserved
233 [255]
233 [255]
234
234
235 $ hg bookmark null
235 $ hg bookmark null
236 abort: the name 'null' is reserved
236 abort: the name 'null' is reserved
237 [255]
237 [255]
238
238
239
239
240 bookmark with existing name
240 bookmark with existing name
241
241
242 $ hg bookmark X2
242 $ hg bookmark X2
243 abort: bookmark 'X2' already exists (use -f to force)
243 abort: bookmark 'X2' already exists (use -f to force)
244 [255]
244 [255]
245
245
246 $ hg bookmark -m Y Z
246 $ hg bookmark -m Y Z
247 abort: bookmark 'Z' already exists (use -f to force)
247 abort: bookmark 'Z' already exists (use -f to force)
248 [255]
248 [255]
249
249
250 bookmark with name of branch
250 bookmark with name of branch
251
251
252 $ hg bookmark default
252 $ hg bookmark default
253 abort: a bookmark cannot have the name of an existing branch
253 abort: a bookmark cannot have the name of an existing branch
254 [255]
254 [255]
255
255
256 $ hg bookmark -m Y default
256 $ hg bookmark -m Y default
257 abort: a bookmark cannot have the name of an existing branch
257 abort: a bookmark cannot have the name of an existing branch
258 [255]
258 [255]
259
259
260 bookmark with integer name
260 bookmark with integer name
261
261
262 $ hg bookmark 10
262 $ hg bookmark 10
263 abort: a bookmark cannot have an integer as its name
263 abort: a bookmark cannot have an integer as its name
264 [255]
264 [255]
265
265
266 incompatible options
266 incompatible options
267
267
268 $ hg bookmark -m Y -d Z
268 $ hg bookmark -m Y -d Z
269 abort: --delete and --rename are incompatible
269 abort: --delete and --rename are incompatible
270 [255]
270 [255]
271
271
272 $ hg bookmark -r 1 -d Z
272 $ hg bookmark -r 1 -d Z
273 abort: --rev is incompatible with --delete
273 abort: --rev is incompatible with --delete
274 [255]
274 [255]
275
275
276 $ hg bookmark -r 1 -m Z Y
276 $ hg bookmark -r 1 -m Z Y
277 abort: --rev is incompatible with --rename
277 abort: --rev is incompatible with --rename
278 [255]
278 [255]
279
279
280 force bookmark with existing name
280 force bookmark with existing name
281
281
282 $ hg bookmark -f X2
282 $ hg bookmark -f X2
283 $ hg bookmark -fr1 X2
283 $ hg bookmark -fr1 X2
284
284
285 forward bookmark to descendant without --force
285 forward bookmark to descendant without --force
286
286
287 $ hg bookmark Z
287 $ hg bookmark Z
288 moving bookmark 'Z' forward from 663762316562
288 moving bookmark 'Z' forward from f7b1eb17ad24
289
289
290 list bookmarks
290 list bookmarks
291
291
292 $ hg bookmark
292 $ hg bookmark
293 X2 1:925d80f479bb
293 X2 1:925d80f479bb
294 Y 2:db815d6d32e6
294 Y 2:db815d6d32e6
295 * Z 2:db815d6d32e6
295 * Z 2:db815d6d32e6
296 x y 2:db815d6d32e6
296 x y 2:db815d6d32e6
297
297
298 revision but no bookmark name
298 revision but no bookmark name
299
299
300 $ hg bookmark -r .
300 $ hg bookmark -r .
301 abort: bookmark name required
301 abort: bookmark name required
302 [255]
302 [255]
303
303
304 bookmark name with whitespace only
304 bookmark name with whitespace only
305
305
306 $ hg bookmark ' '
306 $ hg bookmark ' '
307 abort: bookmark names cannot consist entirely of whitespace
307 abort: bookmark names cannot consist entirely of whitespace
308 [255]
308 [255]
309
309
310 $ hg bookmark -m Y ' '
310 $ hg bookmark -m Y ' '
311 abort: bookmark names cannot consist entirely of whitespace
311 abort: bookmark names cannot consist entirely of whitespace
312 [255]
312 [255]
313
313
314 invalid bookmark
314 invalid bookmark
315
315
316 $ hg bookmark 'foo:bar'
316 $ hg bookmark 'foo:bar'
317 abort: ':' cannot be used in a name
317 abort: ':' cannot be used in a name
318 [255]
318 [255]
319
319
320 $ hg bookmark 'foo
320 $ hg bookmark 'foo
321 > bar'
321 > bar'
322 abort: '\n' cannot be used in a name
322 abort: '\n' cannot be used in a name
323 [255]
323 [255]
324
324
325 the bookmark extension should be ignored now that it is part of core
325 the bookmark extension should be ignored now that it is part of core
326
326
327 $ echo "[extensions]" >> $HGRCPATH
327 $ echo "[extensions]" >> $HGRCPATH
328 $ echo "bookmarks=" >> $HGRCPATH
328 $ echo "bookmarks=" >> $HGRCPATH
329 $ hg bookmarks
329 $ hg bookmarks
330 X2 1:925d80f479bb
330 X2 1:925d80f479bb
331 Y 2:db815d6d32e6
331 Y 2:db815d6d32e6
332 * Z 2:db815d6d32e6
332 * Z 2:db815d6d32e6
333 x y 2:db815d6d32e6
333 x y 2:db815d6d32e6
334
334
335 test summary
335 test summary
336
336
337 $ hg summary
337 $ hg summary
338 parent: 2:db815d6d32e6 tip
338 parent: 2:db815d6d32e6 tip
339 2
339 2
340 branch: default
340 branch: default
341 bookmarks: *Z Y x y
341 bookmarks: *Z Y x y
342 commit: (clean)
342 commit: (clean)
343 update: 1 new changesets, 2 branch heads (merge)
343 update: 1 new changesets, 2 branch heads (merge)
344
344
345 test id
345 test id
346
346
347 $ hg id
347 $ hg id
348 db815d6d32e6 tip Y/Z/x y
348 db815d6d32e6 tip Y/Z/x y
349
349
350 test rollback
350 test rollback
351
351
352 $ echo foo > f1
352 $ echo foo > f1
353 $ hg ci -Amr
353 $ hg ci -Amr
354 adding f1
354 adding f1
355 $ hg bookmark -f Y -r 1
355 $ hg bookmark -f Y -r 1
356 $ hg bookmark -f Z -r 1
356 $ hg bookmark -f Z -r 1
357 $ hg rollback
357 $ hg rollback
358 repository tip rolled back to revision 2 (undo commit)
358 repository tip rolled back to revision 2 (undo commit)
359 working directory now based on revision 2
359 working directory now based on revision 2
360 $ hg bookmarks
360 $ hg bookmarks
361 X2 1:925d80f479bb
361 X2 1:925d80f479bb
362 Y 2:db815d6d32e6
362 Y 2:db815d6d32e6
363 * Z 2:db815d6d32e6
363 * Z 2:db815d6d32e6
364 x y 2:db815d6d32e6
364 x y 2:db815d6d32e6
365
365
366 test clone
366 test clone
367
367
368 $ hg bookmark -r 2 -i @
368 $ hg bookmark -r 2 -i @
369 $ hg bookmark -r 2 -i a@
369 $ hg bookmark -r 2 -i a@
370 $ hg bookmarks
370 $ hg bookmarks
371 @ 2:db815d6d32e6
371 @ 2:db815d6d32e6
372 X2 1:925d80f479bb
372 X2 1:925d80f479bb
373 Y 2:db815d6d32e6
373 Y 2:db815d6d32e6
374 * Z 2:db815d6d32e6
374 * Z 2:db815d6d32e6
375 a@ 2:db815d6d32e6
375 a@ 2:db815d6d32e6
376 x y 2:db815d6d32e6
376 x y 2:db815d6d32e6
377 $ hg clone . cloned-bookmarks
377 $ hg clone . cloned-bookmarks
378 updating to bookmark @
378 updating to bookmark @
379 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
379 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
380 $ hg -R cloned-bookmarks bookmarks
380 $ hg -R cloned-bookmarks bookmarks
381 * @ 2:db815d6d32e6
381 * @ 2:db815d6d32e6
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 a@ 2:db815d6d32e6
385 a@ 2:db815d6d32e6
386 x y 2:db815d6d32e6
386 x y 2:db815d6d32e6
387
387
388 test clone with pull protocol
388 test clone with pull protocol
389
389
390 $ hg clone --pull . cloned-bookmarks-pull
390 $ hg clone --pull . cloned-bookmarks-pull
391 requesting all changes
391 requesting all changes
392 adding changesets
392 adding changesets
393 adding manifests
393 adding manifests
394 adding file changes
394 adding file changes
395 added 3 changesets with 3 changes to 3 files (+1 heads)
395 added 3 changesets with 3 changes to 3 files (+1 heads)
396 updating to bookmark @
396 updating to bookmark @
397 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
397 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
398 $ hg -R cloned-bookmarks-pull bookmarks
398 $ hg -R cloned-bookmarks-pull bookmarks
399 * @ 2:db815d6d32e6
399 * @ 2:db815d6d32e6
400 X2 1:925d80f479bb
400 X2 1:925d80f479bb
401 Y 2:db815d6d32e6
401 Y 2:db815d6d32e6
402 Z 2:db815d6d32e6
402 Z 2:db815d6d32e6
403 a@ 2:db815d6d32e6
403 a@ 2:db815d6d32e6
404 x y 2:db815d6d32e6
404 x y 2:db815d6d32e6
405
405
406 $ hg bookmark -d @
406 $ hg bookmark -d @
407 $ hg bookmark -d a@
407 $ hg bookmark -d a@
408
408
409 test clone with a bookmark named "default" (issue3677)
409 test clone with a bookmark named "default" (issue3677)
410
410
411 $ hg bookmark -r 1 -f -i default
411 $ hg bookmark -r 1 -f -i default
412 $ hg clone . cloned-bookmark-default
412 $ hg clone . cloned-bookmark-default
413 updating to branch default
413 updating to branch default
414 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
414 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
415 $ hg -R cloned-bookmark-default bookmarks
415 $ hg -R cloned-bookmark-default bookmarks
416 X2 1:925d80f479bb
416 X2 1:925d80f479bb
417 Y 2:db815d6d32e6
417 Y 2:db815d6d32e6
418 Z 2:db815d6d32e6
418 Z 2:db815d6d32e6
419 default 1:925d80f479bb
419 default 1:925d80f479bb
420 x y 2:db815d6d32e6
420 x y 2:db815d6d32e6
421 $ hg -R cloned-bookmark-default parents -q
421 $ hg -R cloned-bookmark-default parents -q
422 2:db815d6d32e6
422 2:db815d6d32e6
423 $ hg bookmark -d default
423 $ hg bookmark -d default
424
424
425 test clone with a specific revision
425 test clone with a specific revision
426
426
427 $ hg clone -r 925d80 . cloned-bookmarks-rev
427 $ hg clone -r 925d80 . cloned-bookmarks-rev
428 adding changesets
428 adding changesets
429 adding manifests
429 adding manifests
430 adding file changes
430 adding file changes
431 added 2 changesets with 2 changes to 2 files
431 added 2 changesets with 2 changes to 2 files
432 updating to branch default
432 updating to branch default
433 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
433 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
434 $ hg -R cloned-bookmarks-rev bookmarks
434 $ hg -R cloned-bookmarks-rev bookmarks
435 X2 1:925d80f479bb
435 X2 1:925d80f479bb
436
436
437 test clone with update to a bookmark
437 test clone with update to a bookmark
438
438
439 $ hg clone -u Z . cloned-bookmarks-update
439 $ hg clone -u Z . cloned-bookmarks-update
440 updating to branch default
440 updating to branch default
441 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
441 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
442 $ hg -R cloned-bookmarks-update bookmarks
442 $ hg -R cloned-bookmarks-update bookmarks
443 X2 1:925d80f479bb
443 X2 1:925d80f479bb
444 Y 2:db815d6d32e6
444 Y 2:db815d6d32e6
445 * Z 2:db815d6d32e6
445 * Z 2:db815d6d32e6
446 x y 2:db815d6d32e6
446 x y 2:db815d6d32e6
447
447
448 create bundle with two heads
448 create bundle with two heads
449
449
450 $ hg clone . tobundle
450 $ hg clone . tobundle
451 updating to branch default
451 updating to branch default
452 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
452 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
453 $ echo x > tobundle/x
453 $ echo x > tobundle/x
454 $ hg -R tobundle add tobundle/x
454 $ hg -R tobundle add tobundle/x
455 $ hg -R tobundle commit -m'x'
455 $ hg -R tobundle commit -m'x'
456 $ hg -R tobundle update -r -2
456 $ hg -R tobundle update -r -2
457 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
457 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
458 $ echo y > tobundle/y
458 $ echo y > tobundle/y
459 $ hg -R tobundle branch test
459 $ hg -R tobundle branch test
460 marked working directory as branch test
460 marked working directory as branch test
461 (branches are permanent and global, did you want a bookmark?)
461 (branches are permanent and global, did you want a bookmark?)
462 $ hg -R tobundle add tobundle/y
462 $ hg -R tobundle add tobundle/y
463 $ hg -R tobundle commit -m'y'
463 $ hg -R tobundle commit -m'y'
464 $ hg -R tobundle bundle tobundle.hg
464 $ hg -R tobundle bundle tobundle.hg
465 searching for changes
465 searching for changes
466 2 changesets found
466 2 changesets found
467 $ hg unbundle tobundle.hg
467 $ hg unbundle tobundle.hg
468 adding changesets
468 adding changesets
469 adding manifests
469 adding manifests
470 adding file changes
470 adding file changes
471 added 2 changesets with 2 changes to 2 files (+1 heads)
471 added 2 changesets with 2 changes to 2 files (+1 heads)
472 (run 'hg heads' to see heads, 'hg merge' to merge)
472 (run 'hg heads' to see heads, 'hg merge' to merge)
473
473
474 update to current bookmark if it's not the parent
474 update to current bookmark if it's not the parent
475
475
476 $ hg summary
476 $ hg summary
477 parent: 2:db815d6d32e6
477 parent: 2:db815d6d32e6
478 2
478 2
479 branch: default
479 branch: default
480 bookmarks: [Z] Y x y
480 bookmarks: [Z] Y x y
481 commit: 1 added, 1 unknown (new branch head)
481 commit: 1 added, 1 unknown (new branch head)
482 update: 2 new changesets (update)
482 update: 2 new changesets (update)
483 $ hg update
483 $ hg update
484 updating to active bookmark Z
484 updating to active bookmark Z
485 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
485 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
486 $ hg bookmarks
486 $ hg bookmarks
487 X2 1:925d80f479bb
487 X2 1:925d80f479bb
488 Y 2:db815d6d32e6
488 Y 2:db815d6d32e6
489 * Z 3:125c9a1d6df6
489 * Z 3:125c9a1d6df6
490 x y 2:db815d6d32e6
490 x y 2:db815d6d32e6
491
491
492 test wrongly formated bookmark
492 test wrongly formated bookmark
493
493
494 $ echo '' >> .hg/bookmarks
494 $ echo '' >> .hg/bookmarks
495 $ hg bookmarks
495 $ hg bookmarks
496 X2 1:925d80f479bb
496 X2 1:925d80f479bb
497 Y 2:db815d6d32e6
497 Y 2:db815d6d32e6
498 * Z 3:125c9a1d6df6
498 * Z 3:125c9a1d6df6
499 x y 2:db815d6d32e6
499 x y 2:db815d6d32e6
500 $ echo "Ican'thasformatedlines" >> .hg/bookmarks
500 $ echo "Ican'thasformatedlines" >> .hg/bookmarks
501 $ hg bookmarks
501 $ hg bookmarks
502 malformed line in .hg/bookmarks: "Ican'thasformatedlines"
502 malformed line in .hg/bookmarks: "Ican'thasformatedlines"
503 X2 1:925d80f479bb
503 X2 1:925d80f479bb
504 Y 2:db815d6d32e6
504 Y 2:db815d6d32e6
505 * Z 3:125c9a1d6df6
505 * Z 3:125c9a1d6df6
506 x y 2:db815d6d32e6
506 x y 2:db815d6d32e6
507
507
508 test missing revisions
508 test missing revisions
509
509
510 $ echo "925d80f479bc z" > .hg/bookmarks
510 $ echo "925d80f479bc z" > .hg/bookmarks
511 $ hg book
511 $ hg book
512 no bookmarks set
512 no bookmarks set
513
513
514 test stripping a non-checked-out but bookmarked revision
514 test stripping a non-checked-out but bookmarked revision
515
515
516 $ hg --config extensions.graphlog= log --graph
516 $ hg --config extensions.graphlog= log --graph
517 o changeset: 4:9ba5f110a0b3
517 o changeset: 4:9ba5f110a0b3
518 | branch: test
518 | branch: test
519 | tag: tip
519 | tag: tip
520 | parent: 2:db815d6d32e6
520 | parent: 2:db815d6d32e6
521 | user: test
521 | user: test
522 | date: Thu Jan 01 00:00:00 1970 +0000
522 | date: Thu Jan 01 00:00:00 1970 +0000
523 | summary: y
523 | summary: y
524 |
524 |
525 | @ changeset: 3:125c9a1d6df6
525 | @ changeset: 3:125c9a1d6df6
526 |/ user: test
526 |/ user: test
527 | date: Thu Jan 01 00:00:00 1970 +0000
527 | date: Thu Jan 01 00:00:00 1970 +0000
528 | summary: x
528 | summary: x
529 |
529 |
530 o changeset: 2:db815d6d32e6
530 o changeset: 2:db815d6d32e6
531 | parent: 0:f7b1eb17ad24
531 | parent: 0:f7b1eb17ad24
532 | user: test
532 | user: test
533 | date: Thu Jan 01 00:00:00 1970 +0000
533 | date: Thu Jan 01 00:00:00 1970 +0000
534 | summary: 2
534 | summary: 2
535 |
535 |
536 | o changeset: 1:925d80f479bb
536 | o changeset: 1:925d80f479bb
537 |/ user: test
537 |/ user: test
538 | date: Thu Jan 01 00:00:00 1970 +0000
538 | date: Thu Jan 01 00:00:00 1970 +0000
539 | summary: 1
539 | summary: 1
540 |
540 |
541 o changeset: 0:f7b1eb17ad24
541 o changeset: 0:f7b1eb17ad24
542 user: test
542 user: test
543 date: Thu Jan 01 00:00:00 1970 +0000
543 date: Thu Jan 01 00:00:00 1970 +0000
544 summary: 0
544 summary: 0
545
545
546 $ hg book should-end-on-two
546 $ hg book should-end-on-two
547 $ hg co --clean 4
547 $ hg co --clean 4
548 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
548 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
549 $ hg book four
549 $ hg book four
550 $ hg --config extensions.mq= strip 3
550 $ hg --config extensions.mq= strip 3
551 saved backup bundle to * (glob)
551 saved backup bundle to * (glob)
552 should-end-on-two should end up pointing to revision 2, as that's the
552 should-end-on-two should end up pointing to revision 2, as that's the
553 tipmost surviving ancestor of the stripped revision.
553 tipmost surviving ancestor of the stripped revision.
554 $ hg --config extensions.graphlog= log --graph
554 $ hg --config extensions.graphlog= log --graph
555 @ changeset: 3:9ba5f110a0b3
555 @ changeset: 3:9ba5f110a0b3
556 | branch: test
556 | branch: test
557 | bookmark: four
557 | bookmark: four
558 | tag: tip
558 | tag: tip
559 | user: test
559 | user: test
560 | date: Thu Jan 01 00:00:00 1970 +0000
560 | date: Thu Jan 01 00:00:00 1970 +0000
561 | summary: y
561 | summary: y
562 |
562 |
563 o changeset: 2:db815d6d32e6
563 o changeset: 2:db815d6d32e6
564 | bookmark: should-end-on-two
564 | bookmark: should-end-on-two
565 | parent: 0:f7b1eb17ad24
565 | parent: 0:f7b1eb17ad24
566 | user: test
566 | user: test
567 | date: Thu Jan 01 00:00:00 1970 +0000
567 | date: Thu Jan 01 00:00:00 1970 +0000
568 | summary: 2
568 | summary: 2
569 |
569 |
570 | o changeset: 1:925d80f479bb
570 | o changeset: 1:925d80f479bb
571 |/ user: test
571 |/ user: test
572 | date: Thu Jan 01 00:00:00 1970 +0000
572 | date: Thu Jan 01 00:00:00 1970 +0000
573 | summary: 1
573 | summary: 1
574 |
574 |
575 o changeset: 0:f7b1eb17ad24
575 o changeset: 0:f7b1eb17ad24
576 user: test
576 user: test
577 date: Thu Jan 01 00:00:00 1970 +0000
577 date: Thu Jan 01 00:00:00 1970 +0000
578 summary: 0
578 summary: 0
579
579
General Comments 0
You need to be logged in to leave comments. Login now