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