annotate tests/test-bookmarks.t @ 13474:6c2e476b7a11 stable

tests: check if the bookmarks extension is ignored
author David Soria Parra <dsp@php.net>
date Thu, 24 Feb 2011 19:15:00 +0100
parents 07a6460f829a
children 0fb2ff949790
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 $ hg init
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
2
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
3 no bookmarks
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
4
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
5 $ hg bookmarks
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
6 no bookmarks set
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 bookmark rev -1
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
9
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
10 $ hg bookmark X
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
11
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
12 list bookmarks
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
13
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
14 $ hg bookmarks
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
15 * X -1:000000000000
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 list bookmarks with color
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
18
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
19 $ hg --config extensions.color= --config color.mode=ansi \
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
20 > bookmarks --color=always
12942
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12822
diff changeset
21 \x1b[0;32m * X -1:000000000000\x1b[0m (esc)
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
22
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
23 $ echo a > a
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
24 $ hg add a
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
25 $ 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
26
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
27 bookmark X moved to rev 0
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
28
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
29 $ hg bookmarks
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
30 * X 0:f7b1eb17ad24
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 look up bookmark
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
33
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
34 $ hg log -r X
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
35 changeset: 0:f7b1eb17ad24
13386
f78bc5ddbe4f templater: add bookmarks to templates and default output
David Soria Parra <dsp@php.net>
parents: 13385
diff changeset
36 bookmark: X
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
37 tag: tip
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
38 user: test
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
39 date: Thu Jan 01 00:00:00 1970 +0000
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
40 summary: 0
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
41
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
42
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
43 second bookmark for rev 0
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 $ hg bookmark X2
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
46
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
47 bookmark rev -1 again
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 $ hg bookmark -r null Y
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
50
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
51 list bookmarks
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
52
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
53 $ hg bookmarks
13416
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
54 X 0:f7b1eb17ad24
13448
97b69883e929 bookmarks: mark new bookmark as current if it points to the current dirstate
David Soria Parra <dsp@php.net>
parents: 13425
diff changeset
55 * X2 0:f7b1eb17ad24
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
56 Y -1:000000000000
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
57
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
58 $ echo b > b
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
59 $ hg add b
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
60 $ hg commit -m 1
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
61
12714
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
62 bookmarks revset
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
63
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
64 $ hg log -r 'bookmark()'
13416
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
65 changeset: 0:f7b1eb17ad24
13386
f78bc5ddbe4f templater: add bookmarks to templates and default output
David Soria Parra <dsp@php.net>
parents: 13385
diff changeset
66 bookmark: X
12714
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
67 user: test
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
68 date: Thu Jan 01 00:00:00 1970 +0000
13416
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
69 summary: 0
12714
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
70
13448
97b69883e929 bookmarks: mark new bookmark as current if it points to the current dirstate
David Soria Parra <dsp@php.net>
parents: 13425
diff changeset
71 changeset: 1:925d80f479bb
97b69883e929 bookmarks: mark new bookmark as current if it points to the current dirstate
David Soria Parra <dsp@php.net>
parents: 13425
diff changeset
72 bookmark: X2
97b69883e929 bookmarks: mark new bookmark as current if it points to the current dirstate
David Soria Parra <dsp@php.net>
parents: 13425
diff changeset
73 tag: tip
97b69883e929 bookmarks: mark new bookmark as current if it points to the current dirstate
David Soria Parra <dsp@php.net>
parents: 13425
diff changeset
74 user: test
97b69883e929 bookmarks: mark new bookmark as current if it points to the current dirstate
David Soria Parra <dsp@php.net>
parents: 13425
diff changeset
75 date: Thu Jan 01 00:00:00 1970 +0000
97b69883e929 bookmarks: mark new bookmark as current if it points to the current dirstate
David Soria Parra <dsp@php.net>
parents: 13425
diff changeset
76 summary: 1
97b69883e929 bookmarks: mark new bookmark as current if it points to the current dirstate
David Soria Parra <dsp@php.net>
parents: 13425
diff changeset
77
12714
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
78 $ hg log -r 'bookmark(Y)'
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
79 $ hg log -r 'bookmark(X2)'
13448
97b69883e929 bookmarks: mark new bookmark as current if it points to the current dirstate
David Soria Parra <dsp@php.net>
parents: 13425
diff changeset
80 changeset: 1:925d80f479bb
13386
f78bc5ddbe4f templater: add bookmarks to templates and default output
David Soria Parra <dsp@php.net>
parents: 13385
diff changeset
81 bookmark: X2
13448
97b69883e929 bookmarks: mark new bookmark as current if it points to the current dirstate
David Soria Parra <dsp@php.net>
parents: 13425
diff changeset
82 tag: tip
12714
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
83 user: test
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
84 date: Thu Jan 01 00:00:00 1970 +0000
13448
97b69883e929 bookmarks: mark new bookmark as current if it points to the current dirstate
David Soria Parra <dsp@php.net>
parents: 13425
diff changeset
85 summary: 1
12714
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
86
12822
f13acb96b2a7 Fix and unify transplant and bookmarks revsets doc registration
Patrick Mezard <pmezard@gmail.com>
parents: 12714
diff changeset
87 $ hg help revsets | grep 'bookmark('
f13acb96b2a7 Fix and unify transplant and bookmarks revsets doc registration
Patrick Mezard <pmezard@gmail.com>
parents: 12714
diff changeset
88 "bookmark([name])"
12714
f5178fbcd197 bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents: 12346
diff changeset
89
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
90 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
91
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
92 $ hg bookmarks
13416
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
93 X 0:f7b1eb17ad24
13448
97b69883e929 bookmarks: mark new bookmark as current if it points to the current dirstate
David Soria Parra <dsp@php.net>
parents: 13425
diff changeset
94 * X2 1:925d80f479bb
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
95 Y -1:000000000000
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
96
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
97 bookmark rev 0 again
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
98
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
99 $ hg bookmark -r 0 Z
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
100
13416
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
101 $ hg update X
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
102 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
103 $ echo c > c
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
104 $ hg add c
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
105 $ hg commit -m 2
13416
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
106 created new head
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
107
13416
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
108 bookmarks X 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
109
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
110 $ hg bookmarks
13416
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
111 * X 2:db815d6d32e6
13448
97b69883e929 bookmarks: mark new bookmark as current if it points to the current dirstate
David Soria Parra <dsp@php.net>
parents: 13425
diff changeset
112 X2 1:925d80f479bb
13388
a184dbd9b2c5 localrepo: sort hg bookmark output
David Soria Parra <dsp@php.net>
parents: 13386
diff changeset
113 Y -1:000000000000
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
114 Z 0:f7b1eb17ad24
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
115
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
116 rename nonexistent bookmark
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
117
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
118 $ hg bookmark -m A B
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
119 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
120 [255]
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
121
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
122 rename to existent bookmark
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
123
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
124 $ hg bookmark -m X Y
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
125 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
126 [255]
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
127
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
128 force rename to existent bookmark
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
129
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
130 $ hg bookmark -f -m X Y
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
131
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
132 list bookmarks
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
133
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
134 $ hg bookmark
13448
97b69883e929 bookmarks: mark new bookmark as current if it points to the current dirstate
David Soria Parra <dsp@php.net>
parents: 13425
diff changeset
135 X2 1:925d80f479bb
13416
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
136 * Y 2:db815d6d32e6
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
137 Z 0:f7b1eb17ad24
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
138
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
139 rename without new name
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
140
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
141 $ hg bookmark -m Y
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
142 abort: new bookmark name required
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11861
diff changeset
143 [255]
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
144
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
145 delete without name
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
146
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
147 $ hg bookmark -d
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
148 abort: bookmark name required
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11861
diff changeset
149 [255]
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
150
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
151 delete nonexistent bookmark
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
152
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
153 $ hg bookmark -d A
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
154 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
155 [255]
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
156
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
157 bookmark name with spaces should be stripped
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
158
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
159 $ hg bookmark ' x y '
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
160
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
161 list bookmarks
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
162
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
163 $ hg bookmarks
13448
97b69883e929 bookmarks: mark new bookmark as current if it points to the current dirstate
David Soria Parra <dsp@php.net>
parents: 13425
diff changeset
164 X2 1:925d80f479bb
13416
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
165 Y 2:db815d6d32e6
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
166 Z 0:f7b1eb17ad24
13416
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
167 * x y 2:db815d6d32e6
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
168
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
169 look up stripped bookmark name
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
170
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
171 $ hg log -r '"x y"'
13416
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
172 changeset: 2:db815d6d32e6
13386
f78bc5ddbe4f templater: add bookmarks to templates and default output
David Soria Parra <dsp@php.net>
parents: 13385
diff changeset
173 bookmark: Y
f78bc5ddbe4f templater: add bookmarks to templates and default output
David Soria Parra <dsp@php.net>
parents: 13385
diff changeset
174 bookmark: x y
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
175 tag: tip
13416
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
176 parent: 0:f7b1eb17ad24
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
177 user: test
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
178 date: Thu Jan 01 00:00:00 1970 +0000
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
179 summary: 2
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
180
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
181
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
182 reject bookmark name with newline
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
183
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
184 $ hg bookmark '
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
185 > '
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
186 abort: bookmark name cannot contain newlines
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11861
diff changeset
187 [255]
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
188
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
189 bookmark with existing name
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
190
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
191 $ hg bookmark Z
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
192 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
193 [255]
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 force bookmark with existing 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 -f Z
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
198
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
199 list bookmarks
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 $ hg bookmark
13448
97b69883e929 bookmarks: mark new bookmark as current if it points to the current dirstate
David Soria Parra <dsp@php.net>
parents: 13425
diff changeset
202 X2 1:925d80f479bb
13416
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
203 Y 2:db815d6d32e6
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
204 * Z 2:db815d6d32e6
5431b3f3e52e bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents: 13388
diff changeset
205 x y 2:db815d6d32e6
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
206
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
207 revision but no bookmark name
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
208
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
209 $ hg bookmark -r .
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
210 abort: bookmark name required
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11861
diff changeset
211 [255]
7261
4ba89b6d0e05 bookmarks: Add tests
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
212
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
213 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
214
11861
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
215 $ hg bookmark ' '
41d481ddd976 tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents: 11704
diff changeset
216 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
217 [255]
13425
0fe36c347c00 bookmarks: forbid \0 \r \n : in bookmark names (BC)
David Soria Parra <dsp@php.net>
parents: 13416
diff changeset
218
0fe36c347c00 bookmarks: forbid \0 \r \n : in bookmark names (BC)
David Soria Parra <dsp@php.net>
parents: 13416
diff changeset
219 invalid bookmark
0fe36c347c00 bookmarks: forbid \0 \r \n : in bookmark names (BC)
David Soria Parra <dsp@php.net>
parents: 13416
diff changeset
220
0fe36c347c00 bookmarks: forbid \0 \r \n : in bookmark names (BC)
David Soria Parra <dsp@php.net>
parents: 13416
diff changeset
221 $ hg bookmark 'foo:bar'
0fe36c347c00 bookmarks: forbid \0 \r \n : in bookmark names (BC)
David Soria Parra <dsp@php.net>
parents: 13416
diff changeset
222 abort: bookmark 'foo:bar' contains illegal character
0fe36c347c00 bookmarks: forbid \0 \r \n : in bookmark names (BC)
David Soria Parra <dsp@php.net>
parents: 13416
diff changeset
223 [255]
0fe36c347c00 bookmarks: forbid \0 \r \n : in bookmark names (BC)
David Soria Parra <dsp@php.net>
parents: 13416
diff changeset
224
13474
6c2e476b7a11 tests: check if the bookmarks extension is ignored
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
225 the bookmark extension should be ignored now that it is part of core
6c2e476b7a11 tests: check if the bookmarks extension is ignored
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
226
6c2e476b7a11 tests: check if the bookmarks extension is ignored
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
227 $ echo "[extensions]" >> $HGRCPATH
6c2e476b7a11 tests: check if the bookmarks extension is ignored
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
228 $ echo "bookmarks=" >> $HGRCPATH
6c2e476b7a11 tests: check if the bookmarks extension is ignored
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
229 $ hg bookmarks
6c2e476b7a11 tests: check if the bookmarks extension is ignored
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
230 X2 1:925d80f479bb
6c2e476b7a11 tests: check if the bookmarks extension is ignored
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
231 Y 2:db815d6d32e6
6c2e476b7a11 tests: check if the bookmarks extension is ignored
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
232 * Z 2:db815d6d32e6
6c2e476b7a11 tests: check if the bookmarks extension is ignored
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
233 x y 2:db815d6d32e6
13454
afc84a879ac8 summary: add bookmarks to summary
David Soria Parra <dsp@php.net>
parents: 13448
diff changeset
234 test summary
afc84a879ac8 summary: add bookmarks to summary
David Soria Parra <dsp@php.net>
parents: 13448
diff changeset
235
afc84a879ac8 summary: add bookmarks to summary
David Soria Parra <dsp@php.net>
parents: 13448
diff changeset
236 $ hg summary
afc84a879ac8 summary: add bookmarks to summary
David Soria Parra <dsp@php.net>
parents: 13448
diff changeset
237 parent: 2:db815d6d32e6 tip Y Z x y
afc84a879ac8 summary: add bookmarks to summary
David Soria Parra <dsp@php.net>
parents: 13448
diff changeset
238 2
afc84a879ac8 summary: add bookmarks to summary
David Soria Parra <dsp@php.net>
parents: 13448
diff changeset
239 branch: default
afc84a879ac8 summary: add bookmarks to summary
David Soria Parra <dsp@php.net>
parents: 13448
diff changeset
240 commit: (clean)
afc84a879ac8 summary: add bookmarks to summary
David Soria Parra <dsp@php.net>
parents: 13448
diff changeset
241 update: 1 new changesets, 2 branch heads (merge)
afc84a879ac8 summary: add bookmarks to summary
David Soria Parra <dsp@php.net>
parents: 13448
diff changeset
242