Show More
@@ -1,153 +1,170 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 | set bookmark X |
|
8 | set bookmark X | |
9 |
|
9 | |||
10 | $ hg bookmark X |
|
10 | $ hg bookmark X | |
11 |
|
11 | |||
12 | list bookmarks |
|
12 | list bookmarks | |
13 |
|
13 | |||
14 | $ hg bookmark |
|
14 | $ hg bookmark | |
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 | > bookmark --color=always |
|
20 | > bookmark --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 | update to bookmark X |
|
23 | update to bookmark X | |
24 |
|
24 | |||
25 | $ hg update X |
|
25 | $ hg update X | |
26 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
26 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
27 |
|
27 | |||
28 | list bookmarks |
|
28 | list bookmarks | |
29 |
|
29 | |||
30 | $ hg bookmarks |
|
30 | $ hg bookmarks | |
31 | * X -1:000000000000 |
|
31 | * X -1:000000000000 | |
32 |
|
32 | |||
33 | rename |
|
33 | rename | |
34 |
|
34 | |||
35 | $ hg bookmark -m X Z |
|
35 | $ hg bookmark -m X Z | |
36 |
|
36 | |||
37 | list bookmarks |
|
37 | list bookmarks | |
38 |
|
38 | |||
39 | $ cat .hg/bookmarks.current |
|
39 | $ cat .hg/bookmarks.current | |
40 | Z (no-eol) |
|
40 | Z (no-eol) | |
41 | $ cat .hg/bookmarks |
|
41 | $ cat .hg/bookmarks | |
42 | 0000000000000000000000000000000000000000 Z |
|
42 | 0000000000000000000000000000000000000000 Z | |
43 | $ hg bookmarks |
|
43 | $ hg bookmarks | |
44 | * Z -1:000000000000 |
|
44 | * Z -1:000000000000 | |
45 |
|
45 | |||
46 | new bookmark Y |
|
46 | new bookmark Y | |
47 |
|
47 | |||
48 | $ hg bookmark Y |
|
48 | $ hg bookmark Y | |
49 |
|
49 | |||
50 | list bookmarks |
|
50 | list bookmarks | |
51 |
|
51 | |||
52 | $ hg bookmark |
|
52 | $ hg bookmark | |
53 | * Y -1:000000000000 |
|
53 | * Y -1:000000000000 | |
54 | Z -1:000000000000 |
|
54 | Z -1:000000000000 | |
55 |
|
55 | |||
56 | commit |
|
56 | commit | |
57 |
|
57 | |||
58 | $ echo 'b' > b |
|
58 | $ echo 'b' > b | |
59 | $ hg add b |
|
59 | $ hg add b | |
60 | $ hg commit -m'test' |
|
60 | $ hg commit -m'test' | |
61 |
|
61 | |||
62 | list bookmarks |
|
62 | list bookmarks | |
63 |
|
63 | |||
64 | $ hg bookmark |
|
64 | $ hg bookmark | |
65 | * Y 0:719295282060 |
|
65 | * Y 0:719295282060 | |
66 | Z -1:000000000000 |
|
66 | Z -1:000000000000 | |
67 |
|
67 | |||
68 | Verify that switching to Z updates the current bookmark: |
|
68 | Verify that switching to Z updates the current bookmark: | |
69 | $ hg update Z |
|
69 | $ hg update Z | |
70 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
70 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
71 | $ hg bookmark |
|
71 | $ hg bookmark | |
72 | Y 0:719295282060 |
|
72 | Y 0:719295282060 | |
73 | * Z -1:000000000000 |
|
73 | * Z -1:000000000000 | |
74 |
|
74 | |||
75 | Switch back to Y for the remaining tests in this file: |
|
75 | Switch back to Y for the remaining tests in this file: | |
76 | $ hg update Y |
|
76 | $ hg update Y | |
77 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
77 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
78 |
|
78 | |||
79 | delete bookmarks |
|
79 | delete bookmarks | |
80 |
|
80 | |||
81 | $ hg bookmark -d Y |
|
81 | $ hg bookmark -d Y | |
82 | $ hg bookmark -d Z |
|
82 | $ hg bookmark -d Z | |
83 |
|
83 | |||
84 | list bookmarks |
|
84 | list bookmarks | |
85 |
|
85 | |||
86 | $ hg bookmark |
|
86 | $ hg bookmark | |
87 | no bookmarks set |
|
87 | no bookmarks set | |
88 |
|
88 | |||
89 | update to tip |
|
89 | update to tip | |
90 |
|
90 | |||
91 | $ hg update tip |
|
91 | $ hg update tip | |
92 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
92 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
93 |
|
93 | |||
94 | set bookmark Y using -r . |
|
94 | set bookmark Y using -r . | |
95 |
|
95 | |||
96 | $ hg bookmark -r . Y |
|
96 | $ hg bookmark -r . Y | |
97 |
|
97 | |||
98 | list bookmarks |
|
98 | list bookmarks | |
99 |
|
99 | |||
100 | $ hg bookmark |
|
100 | $ hg bookmark | |
101 | * Y 0:719295282060 |
|
101 | * Y 0:719295282060 | |
102 |
|
102 | |||
103 | set bookmark Z using -i |
|
103 | set bookmark Z using -i | |
104 |
|
104 | |||
105 | $ hg bookmark -r . -i Z |
|
105 | $ hg bookmark -r . -i Z | |
106 | $ hg bookmarks |
|
106 | $ hg bookmarks | |
107 | * Y 0:719295282060 |
|
107 | * Y 0:719295282060 | |
108 | Z 0:719295282060 |
|
108 | Z 0:719295282060 | |
109 |
|
109 | |||
110 | deactivate current bookmark using -i |
|
110 | deactivate current bookmark using -i | |
111 |
|
111 | |||
112 | $ hg bookmark -i Y |
|
112 | $ hg bookmark -i Y | |
113 | $ hg bookmarks |
|
113 | $ hg bookmarks | |
114 | Y 0:719295282060 |
|
114 | Y 0:719295282060 | |
115 | Z 0:719295282060 |
|
115 | Z 0:719295282060 | |
116 |
|
116 | |||
117 | $ hg up -q Y |
|
117 | $ hg up -q Y | |
118 | $ hg bookmarks |
|
118 | $ hg bookmarks | |
119 | * Y 0:719295282060 |
|
119 | * Y 0:719295282060 | |
120 | Z 0:719295282060 |
|
120 | Z 0:719295282060 | |
121 |
|
121 | |||
122 | deactivate current bookmark while renaming |
|
122 | deactivate current bookmark while renaming | |
123 |
|
123 | |||
124 | $ hg bookmark -i -m Y X |
|
124 | $ hg bookmark -i -m Y X | |
125 | $ hg bookmarks |
|
125 | $ hg bookmarks | |
126 | X 0:719295282060 |
|
126 | X 0:719295282060 | |
127 | Z 0:719295282060 |
|
127 | Z 0:719295282060 | |
128 |
|
128 | |||
|
129 | bare update moves the active bookmark forward | |||
|
130 | ||||
|
131 | $ echo a > a | |||
|
132 | $ hg ci -Am1 | |||
|
133 | adding a | |||
|
134 | $ hg update X | |||
|
135 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
136 | $ hg bookmarks | |||
|
137 | * X 0:719295282060 | |||
|
138 | Z 0:719295282060 | |||
|
139 | $ hg update | |||
|
140 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
141 | updating bookmark X | |||
|
142 | $ hg bookmarks | |||
|
143 | * X 1:cc586d725fbe | |||
|
144 | Z 0:719295282060 | |||
|
145 | ||||
129 | test deleting .hg/bookmarks.current when explicitly updating |
|
146 | test deleting .hg/bookmarks.current when explicitly updating | |
130 | to a revision |
|
147 | to a revision | |
131 |
|
148 | |||
132 | $ echo a >> b |
|
149 | $ echo a >> b | |
133 | $ hg ci -m. |
|
150 | $ hg ci -m. | |
134 | $ hg up -q X |
|
151 | $ hg up -q X | |
135 | $ test -f .hg/bookmarks.current |
|
152 | $ test -f .hg/bookmarks.current | |
136 |
|
153 | |||
137 | try to update to it again to make sure we don't |
|
154 | try to update to it again to make sure we don't | |
138 | set and then unset it |
|
155 | set and then unset it | |
139 |
|
156 | |||
140 | $ hg up -q X |
|
157 | $ hg up -q X | |
141 | $ test -f .hg/bookmarks.current |
|
158 | $ test -f .hg/bookmarks.current | |
142 |
|
159 | |||
143 | $ hg up -q 1 |
|
160 | $ hg up -q 1 | |
144 | $ test -f .hg/bookmarks.current |
|
161 | $ test -f .hg/bookmarks.current | |
145 | [1] |
|
162 | [1] | |
146 |
|
163 | |||
147 | when a bookmark is active, hg up -r . is |
|
164 | when a bookmark is active, hg up -r . is | |
148 | analogus to hg book -i <active bookmark> |
|
165 | analogus to hg book -i <active bookmark> | |
149 |
|
166 | |||
150 | $ hg up -q X |
|
167 | $ hg up -q X | |
151 | $ hg up -q . |
|
168 | $ hg up -q . | |
152 | $ test -f .hg/bookmarks.current |
|
169 | $ test -f .hg/bookmarks.current | |
153 | [1] |
|
170 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now