annotate tests/test-bookmarks.t @ 13385:d012d95499f7

tags: do not merge bookmarks with tags bookmarks are no tags, therefore they should not be returned as tags.
author David Soria Parra <dsp@php.net>
date Fri, 11 Feb 2011 19:44:17 +0100
parents 05fffd665170
children f78bc5ddbe4f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
1 $ echo "[extensions]" >> $HGRCPATH
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
2 $ echo "bookmarks=" >> $HGRCPATH
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
3
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
4 $ hg init
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
5
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
6 no bookmarks
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
7
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
8 $ hg bookmarks
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
9 no bookmarks set
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
10
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
11 bookmark rev -1
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
12
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
13 $ hg bookmark X
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
14
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
15 list bookmarks
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
16
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
17 $ hg bookmarks
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
18 * X -1:000000000000
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
19
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
20 list bookmarks with color
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
21
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
22 $ hg --config extensions.color= --config color.mode=ansi \
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
23 > bookmarks --color=always
12942
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12822
diff changeset
24 \x1b[0;32m * X -1:000000000000\x1b[0m (esc)
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
25
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
26 $ echo a > a
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
27 $ hg add a
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
28 $ hg commit -m 0
10826
717c35d55fb3 color: colorize based on output labels instead of parsing output
Brodie Rao <brodie@bitheap.org>
parents: 7261
diff changeset
29
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
30 bookmark X moved to rev 0
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
31
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
32 $ hg bookmarks
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
33 * X 0:f7b1eb17ad24
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
34
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
35 look up bookmark
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
36
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
37 $ hg log -r X
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
38 changeset: 0:f7b1eb17ad24
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
39 tag: tip
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
40 user: test
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
41 date: Thu Jan 01 00:00:00 1970 +0000
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
42 summary: 0
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
43
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
44
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
45 second bookmark for rev 0
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
46
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
47 $ hg bookmark X2
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
48
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
49 bookmark rev -1 again
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
50
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
51 $ hg bookmark -r null Y
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
52
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
53 list bookmarks
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
54
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
55 $ hg bookmarks
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
56 * X2 0:f7b1eb17ad24
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
57 * X 0:f7b1eb17ad24
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
58 Y -1:000000000000
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
59
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
60 $ echo b > b
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
61 $ hg add b
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
62 $ hg commit -m 1
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
63
12714
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
64 bookmarks revset
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
65
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
66 $ hg log -r 'bookmark()'
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
67 changeset: 1:925d80f479bb
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
68 tag: tip
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
69 user: test
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
70 date: Thu Jan 01 00:00:00 1970 +0000
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
71 summary: 1
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
72
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
73 $ hg log -r 'bookmark(Y)'
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
74 $ hg log -r 'bookmark(X2)'
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
75 changeset: 1:925d80f479bb
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
76 tag: tip
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
77 user: test
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
78 date: Thu Jan 01 00:00:00 1970 +0000
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
79 summary: 1
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
80
12822
f13acb96b2a7 Fix and unify transplant and bookmarks revsets doc registration
Patrick Mezard <pmezard@gmail.com>
parents: 12714
diff changeset
81 $ hg help revsets | grep 'bookmark('
f13acb96b2a7 Fix and unify transplant and bookmarks revsets doc registration
Patrick Mezard <pmezard@gmail.com>
parents: 12714
diff changeset
82 "bookmark([name])"
12714
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
83
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
84 bookmarks X and X2 moved to rev 1, Y at rev -1
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
85
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
86 $ hg bookmarks
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
87 * X2 1:925d80f479bb
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
88 * X 1:925d80f479bb
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
89 Y -1:000000000000
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
90
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
91 bookmark rev 0 again
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
92
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
93 $ hg bookmark -r 0 Z
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
94
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
95 $ echo c > c
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
96 $ hg add c
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
97 $ hg commit -m 2
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
98
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
99 bookmarks X and X2 moved to rev 2, Y at rev -1, Z at rev 0
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
100
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
101 $ hg bookmarks
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
102 * X2 2:0316ce92851d
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
103 * X 2:0316ce92851d
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
104 Z 0:f7b1eb17ad24
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
105 Y -1:000000000000
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
106
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
107 rename nonexistent bookmark
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
108
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
109 $ hg bookmark -m A B
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
110 abort: a bookmark of this name does not exist
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11861
diff changeset
111 [255]
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
112
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
113 rename to existent bookmark
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
114
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
115 $ hg bookmark -m X Y
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
116 abort: a bookmark of the same name already exists
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11861
diff changeset
117 [255]
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
118
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
119 force rename to existent bookmark
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
120
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
121 $ hg bookmark -f -m X Y
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
122
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
123 list bookmarks
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
124
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
125 $ hg bookmark
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
126 * X2 2:0316ce92851d
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
127 * Y 2:0316ce92851d
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
128 Z 0:f7b1eb17ad24
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
129
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
130 rename without new name
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
131
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
132 $ hg bookmark -m Y
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
133 abort: new bookmark name required
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11861
diff changeset
134 [255]
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
135
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
136 delete without name
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
137
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
138 $ hg bookmark -d
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
139 abort: bookmark name required
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11861
diff changeset
140 [255]
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
141
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
142 delete nonexistent bookmark
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
143
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
144 $ hg bookmark -d A
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
145 abort: a bookmark of this name does not exist
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11861
diff changeset
146 [255]
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
147
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
148 bookmark name with spaces should be stripped
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
149
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
150 $ hg bookmark ' x y '
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
151
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
152 list bookmarks
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
153
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
154 $ hg bookmarks
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
155 * X2 2:0316ce92851d
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
156 * Y 2:0316ce92851d
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
157 Z 0:f7b1eb17ad24
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
158 * x y 2:0316ce92851d
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
159
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
160 look up stripped bookmark name
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
161
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
162 $ hg log -r '"x y"'
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
163 changeset: 2:0316ce92851d
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
164 tag: tip
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
165 user: test
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
166 date: Thu Jan 01 00:00:00 1970 +0000
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
167 summary: 2
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
168
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
169
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
170 reject bookmark name with newline
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
171
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
172 $ hg bookmark '
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
173 > '
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
174 abort: bookmark name cannot contain newlines
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11861
diff changeset
175 [255]
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
176
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
177 bookmark with existing name
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
178
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
179 $ hg bookmark Z
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
180 abort: a bookmark of the same name already exists
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11861
diff changeset
181 [255]
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
182
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
183 force bookmark with existing name
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
184
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
185 $ hg bookmark -f Z
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
186
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
187 list bookmarks
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
188
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
189 $ hg bookmark
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
190 * X2 2:0316ce92851d
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
191 * Y 2:0316ce92851d
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
192 * Z 2:0316ce92851d
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
193 * x y 2:0316ce92851d
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
194
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
195 revision but no bookmark name
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
196
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
197 $ hg bookmark -r .
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
198 abort: bookmark name required
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11861
diff changeset
199 [255]
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
200
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
201 bookmark name with whitespace only
11704
18c47562d331 bookmarks: don't allow name to contain whitespaces only
Idan Kamara <idankk86@gmail.com>
parents: 11282
diff changeset
202
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
203 $ hg bookmark ' '
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
204 abort: bookmark names cannot consist entirely of whitespace
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11861
diff changeset
205 [255]