author | Martin Geisler <mg@aragost.com> |
Wed, 05 May 2010 09:25:09 +0200 | |
changeset 11095 | d56124931909 |
parent 10826 | 717c35d55fb3 |
child 11141 | df5d1d571d27 |
permissions | -rwxr-xr-x |
7261 | 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 |
||
10826
717c35d55fb3
color: colorize based on output labels instead of parsing output
Brodie Rao <brodie@bitheap.org>
parents:
7261
diff
changeset
|
17 |
echo % list bookmarks with color |
717c35d55fb3
color: colorize based on output labels instead of parsing output
Brodie Rao <brodie@bitheap.org>
parents:
7261
diff
changeset
|
18 |
hg --config extensions.color= bookmarks --color=always |
717c35d55fb3
color: colorize based on output labels instead of parsing output
Brodie Rao <brodie@bitheap.org>
parents:
7261
diff
changeset
|
19 |
|
7261 | 20 |
echo a > a |
21 |
hg add a |
|
22 |
hg commit -m 0 |
|
23 |
||
24 |
echo % bookmark X moved to rev 0 |
|
25 |
hg bookmarks |
|
26 |
||
27 |
echo % look up bookmark |
|
28 |
hg log -r X |
|
29 |
||
30 |
echo % second bookmark for rev 0 |
|
31 |
hg bookmark X2 |
|
32 |
||
33 |
echo % bookmark rev -1 again |
|
34 |
hg bookmark -r null Y |
|
35 |
||
36 |
echo % list bookmarks |
|
37 |
hg bookmarks |
|
38 |
||
39 |
echo b > b |
|
40 |
hg add b |
|
41 |
hg commit -m 1 |
|
42 |
||
43 |
echo % bookmarks X and X2 moved to rev 1, Y at rev -1 |
|
44 |
hg bookmarks |
|
45 |
||
46 |
echo % bookmark rev 0 again |
|
47 |
hg bookmark -r 0 Z |
|
48 |
||
49 |
echo c > c |
|
50 |
hg add c |
|
51 |
hg commit -m 2 |
|
52 |
||
53 |
echo % bookmarks X and X2 moved to rev 2, Y at rev -1, Z at rev 0 |
|
54 |
hg bookmarks |
|
55 |
||
56 |
echo % rename nonexistent bookmark |
|
57 |
hg bookmark -m A B |
|
58 |
||
59 |
echo % rename to existent bookmark |
|
60 |
hg bookmark -m X Y |
|
61 |
||
62 |
echo % force rename to existent bookmark |
|
63 |
hg bookmark -f -m X Y |
|
64 |
||
65 |
echo % list bookmarks |
|
66 |
hg bookmark |
|
67 |
||
68 |
echo % rename without new name |
|
69 |
hg bookmark -m Y |
|
70 |
||
71 |
echo % delete without name |
|
72 |
hg bookmark -d |
|
73 |
||
74 |
echo % delete nonexistent bookmark |
|
75 |
hg bookmark -d A |
|
76 |
||
77 |
echo % bookmark name with spaces should be stripped |
|
78 |
hg bookmark ' x y ' |
|
79 |
||
80 |
echo % list bookmarks |
|
81 |
hg bookmarks |
|
82 |
||
83 |
echo % look up stripped bookmark name |
|
84 |
hg log -r 'x y' |
|
85 |
||
86 |
echo % reject bookmark name with newline |
|
87 |
hg bookmark ' |
|
88 |
' |
|
89 |
||
90 |
echo % bookmark with existing name |
|
91 |
hg bookmark Z |
|
92 |
||
93 |
echo % force bookmark with existing name |
|
94 |
hg bookmark -f Z |
|
95 |
||
96 |
echo % list bookmarks |
|
97 |
hg bookmark |
|
98 |
||
99 |
echo % revision but no bookmark name |
|
100 |
hg bookmark -r . |
|
101 |
||
102 |
true |