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