Show More
@@ -0,0 +1,99 b'' | |||
|
1 | #!/bin/sh | |
|
2 | ||
|
3 | echo "[extensions]" >> $HGRCPATH | |
|
4 | echo "bookmarks=" >> $HGRCPATH | |
|
5 | ||
|
6 | hg init | |
|
7 | ||
|
8 | echo % no bookmarks | |
|
9 | hg bookmarks | |
|
10 | ||
|
11 | echo % bookmark rev -1 | |
|
12 | hg bookmark X | |
|
13 | ||
|
14 | echo % list bookmarks | |
|
15 | hg bookmarks | |
|
16 | ||
|
17 | echo a > a | |
|
18 | hg add a | |
|
19 | hg commit -m 0 | |
|
20 | ||
|
21 | echo % bookmark X moved to rev 0 | |
|
22 | hg bookmarks | |
|
23 | ||
|
24 | echo % look up bookmark | |
|
25 | hg log -r X | |
|
26 | ||
|
27 | echo % second bookmark for rev 0 | |
|
28 | hg bookmark X2 | |
|
29 | ||
|
30 | echo % bookmark rev -1 again | |
|
31 | hg bookmark -r null Y | |
|
32 | ||
|
33 | echo % list bookmarks | |
|
34 | hg bookmarks | |
|
35 | ||
|
36 | echo b > b | |
|
37 | hg add b | |
|
38 | hg commit -m 1 | |
|
39 | ||
|
40 | echo % bookmarks X and X2 moved to rev 1, Y at rev -1 | |
|
41 | hg bookmarks | |
|
42 | ||
|
43 | echo % bookmark rev 0 again | |
|
44 | hg bookmark -r 0 Z | |
|
45 | ||
|
46 | echo c > c | |
|
47 | hg add c | |
|
48 | hg commit -m 2 | |
|
49 | ||
|
50 | echo % bookmarks X and X2 moved to rev 2, Y at rev -1, Z at rev 0 | |
|
51 | hg bookmarks | |
|
52 | ||
|
53 | echo % rename nonexistent bookmark | |
|
54 | hg bookmark -m A B | |
|
55 | ||
|
56 | echo % rename to existent bookmark | |
|
57 | hg bookmark -m X Y | |
|
58 | ||
|
59 | echo % force rename to existent bookmark | |
|
60 | hg bookmark -f -m X Y | |
|
61 | ||
|
62 | echo % list bookmarks | |
|
63 | hg bookmark | |
|
64 | ||
|
65 | echo % rename without new name | |
|
66 | hg bookmark -m Y | |
|
67 | ||
|
68 | echo % delete without name | |
|
69 | hg bookmark -d | |
|
70 | ||
|
71 | echo % delete nonexistent bookmark | |
|
72 | hg bookmark -d A | |
|
73 | ||
|
74 | echo % bookmark name with spaces should be stripped | |
|
75 | hg bookmark ' x y ' | |
|
76 | ||
|
77 | echo % list bookmarks | |
|
78 | hg bookmarks | |
|
79 | ||
|
80 | echo % look up stripped bookmark name | |
|
81 | hg log -r 'x y' | |
|
82 | ||
|
83 | echo % reject bookmark name with newline | |
|
84 | hg bookmark ' | |
|
85 | ' | |
|
86 | ||
|
87 | echo % bookmark with existing name | |
|
88 | hg bookmark Z | |
|
89 | ||
|
90 | echo % force bookmark with existing name | |
|
91 | hg bookmark -f Z | |
|
92 | ||
|
93 | echo % list bookmarks | |
|
94 | hg bookmark | |
|
95 | ||
|
96 | echo % revision but no bookmark name | |
|
97 | hg bookmark -r . | |
|
98 | ||
|
99 | true |
@@ -0,0 +1,70 b'' | |||
|
1 | % no bookmarks | |
|
2 | no bookmarks set | |
|
3 | % bookmark rev -1 | |
|
4 | % list bookmarks | |
|
5 | * X -1:000000000000 | |
|
6 | % bookmark X moved to rev 0 | |
|
7 | * X 0:f7b1eb17ad24 | |
|
8 | % look up bookmark | |
|
9 | changeset: 0:f7b1eb17ad24 | |
|
10 | tag: tip | |
|
11 | user: test | |
|
12 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
13 | summary: 0 | |
|
14 | ||
|
15 | % second bookmark for rev 0 | |
|
16 | % bookmark rev -1 again | |
|
17 | % list bookmarks | |
|
18 | * X2 0:f7b1eb17ad24 | |
|
19 | * X 0:f7b1eb17ad24 | |
|
20 | Y -1:000000000000 | |
|
21 | % bookmarks X and X2 moved to rev 1, Y at rev -1 | |
|
22 | * X2 1:925d80f479bb | |
|
23 | * X 1:925d80f479bb | |
|
24 | Y -1:000000000000 | |
|
25 | % bookmark rev 0 again | |
|
26 | % bookmarks X and X2 moved to rev 2, Y at rev -1, Z at rev 0 | |
|
27 | * X2 2:0316ce92851d | |
|
28 | * X 2:0316ce92851d | |
|
29 | Z 0:f7b1eb17ad24 | |
|
30 | Y -1:000000000000 | |
|
31 | % rename nonexistent bookmark | |
|
32 | abort: a bookmark of this name does not exist | |
|
33 | % rename to existent bookmark | |
|
34 | abort: a bookmark of the same name already exists | |
|
35 | % force rename to existent bookmark | |
|
36 | % list bookmarks | |
|
37 | * X2 2:0316ce92851d | |
|
38 | * Y 2:0316ce92851d | |
|
39 | Z 0:f7b1eb17ad24 | |
|
40 | % rename without new name | |
|
41 | abort: new bookmark name required | |
|
42 | % delete without name | |
|
43 | abort: bookmark name required | |
|
44 | % delete nonexistent bookmark | |
|
45 | abort: a bookmark of this name does not exist | |
|
46 | % bookmark name with spaces should be stripped | |
|
47 | % list bookmarks | |
|
48 | * X2 2:0316ce92851d | |
|
49 | * Y 2:0316ce92851d | |
|
50 | Z 0:f7b1eb17ad24 | |
|
51 | * x y 2:0316ce92851d | |
|
52 | % look up stripped bookmark name | |
|
53 | changeset: 2:0316ce92851d | |
|
54 | tag: tip | |
|
55 | user: test | |
|
56 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
57 | summary: 2 | |
|
58 | ||
|
59 | % reject bookmark name with newline | |
|
60 | abort: bookmark name cannot contain newlines | |
|
61 | % bookmark with existing name | |
|
62 | abort: a bookmark of the same name already exists | |
|
63 | % force bookmark with existing name | |
|
64 | % list bookmarks | |
|
65 | * X2 2:0316ce92851d | |
|
66 | * Y 2:0316ce92851d | |
|
67 | * Z 2:0316ce92851d | |
|
68 | * x y 2:0316ce92851d | |
|
69 | % revision but no bookmark name | |
|
70 | abort: bookmark name required |
General Comments 0
You need to be logged in to leave comments.
Login now