Mercurial > hg
annotate tests/test-bookmarks.t @ 33298:f41a99c45956
sparse: move profile reading into core
One more step towards weaning off methods on repo instances and
moving code to core. While this function is only used once and
is simple, it needs to exist on its own so Facebook can monkeypatch
it to enable simplecache integration.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 06 Jul 2017 12:14:12 -0700 |
parents | 0bec70c1df15 |
children | 10f1809ab98f |
rev | line source |
---|---|
31051
96eaefd350ae
tests: make directory to prevent test process from going out of $TESTTMP
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
30556
diff
changeset
|
1 $ hg init repo |
96eaefd350ae
tests: make directory to prevent test process from going out of $TESTTMP
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
30556
diff
changeset
|
2 $ cd repo |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
3 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
4 no bookmarks |
7261 | 5 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
6 $ hg bookmarks |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
7 no bookmarks set |
7261 | 8 |
22776
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
9 $ hg bookmarks -Tjson |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
10 [ |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
11 ] |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
12 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
13 bookmark rev -1 |
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 $ hg bookmark X |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
16 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
17 list bookmarks |
7261 | 18 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
19 $ hg bookmarks |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
20 * X -1:000000000000 |
7261 | 21 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
22 list bookmarks with color |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
23 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
24 $ hg --config extensions.color= --config color.mode=ansi \ |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
25 > bookmarks --color=always |
22775
b59c2c8c45df
bookmarks: split ui.write() so that it can be easily ported to formatter api
Yuya Nishihara <yuya@tcha.org>
parents:
22105
diff
changeset
|
26 \x1b[0;32m * \x1b[0m\x1b[0;32mX\x1b[0m\x1b[0;32m -1:000000000000\x1b[0m (esc) |
7261 | 27 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
28 $ echo a > a |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
29 $ hg add a |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
30 $ 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
|
31 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
32 bookmark X moved to rev 0 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
33 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
34 $ hg bookmarks |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
35 * X 0:f7b1eb17ad24 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
36 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
37 look up bookmark |
7261 | 38 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
39 $ hg log -r X |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
40 changeset: 0:f7b1eb17ad24 |
13386
f78bc5ddbe4f
templater: add bookmarks to templates and default output
David Soria Parra <dsp@php.net>
parents:
13385
diff
changeset
|
41 bookmark: X |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
42 tag: tip |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
43 user: test |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
44 date: Thu Jan 01 00:00:00 1970 +0000 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
45 summary: 0 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
46 |
7261 | 47 |
18075
2c1fc483efa4
commands: 'hg bookmark NAME' should work even with ui.strict=True
Kevin Bullock <kbullock@ringworld.org>
parents:
17882
diff
changeset
|
48 second bookmark for rev 0, command should work even with ui.strict on |
7261 | 49 |
18075
2c1fc483efa4
commands: 'hg bookmark NAME' should work even with ui.strict=True
Kevin Bullock <kbullock@ringworld.org>
parents:
17882
diff
changeset
|
50 $ hg --config ui.strict=1 bookmark X2 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
51 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
52 bookmark rev -1 again |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
53 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
54 $ hg bookmark -r null Y |
7261 | 55 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
56 list bookmarks |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
57 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
58 $ 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
|
59 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
|
60 * X2 0:f7b1eb17ad24 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
61 Y -1:000000000000 |
7261 | 62 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
63 $ echo b > b |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
64 $ hg add b |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
65 $ hg commit -m 1 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
66 |
22776
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
67 $ hg bookmarks -Tjson |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
68 [ |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
69 { |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
70 "active": false, |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
71 "bookmark": "X", |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
72 "node": "f7b1eb17ad24730a1651fccd46c43826d1bbc2ac", |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
73 "rev": 0 |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
74 }, |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
75 { |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
76 "active": true, |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
77 "bookmark": "X2", |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
78 "node": "925d80f479bb026b0fb3deb27503780b13f74123", |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
79 "rev": 1 |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
80 }, |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
81 { |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
82 "active": false, |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
83 "bookmark": "Y", |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
84 "node": "0000000000000000000000000000000000000000", |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
85 "rev": -1 |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
86 } |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
87 ] |
564ae7d2ec9b
bookmarks: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
22775
diff
changeset
|
88 |
12714
f5178fbcd197
bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents:
12346
diff
changeset
|
89 bookmarks revset |
f5178fbcd197
bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents:
12346
diff
changeset
|
90 |
f5178fbcd197
bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents:
12346
diff
changeset
|
91 $ 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
|
92 changeset: 0:f7b1eb17ad24 |
13386
f78bc5ddbe4f
templater: add bookmarks to templates and default output
David Soria Parra <dsp@php.net>
parents:
13385
diff
changeset
|
93 bookmark: X |
12714
f5178fbcd197
bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents:
12346
diff
changeset
|
94 user: test |
f5178fbcd197
bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents:
12346
diff
changeset
|
95 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
|
96 summary: 0 |
12714
f5178fbcd197
bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents:
12346
diff
changeset
|
97 |
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
|
98 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
|
99 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
|
100 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
|
101 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
|
102 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
|
103 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
|
104 |
12714
f5178fbcd197
bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents:
12346
diff
changeset
|
105 $ hg log -r 'bookmark(Y)' |
f5178fbcd197
bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents:
12346
diff
changeset
|
106 $ 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
|
107 changeset: 1:925d80f479bb |
13386
f78bc5ddbe4f
templater: add bookmarks to templates and default output
David Soria Parra <dsp@php.net>
parents:
13385
diff
changeset
|
108 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
|
109 tag: tip |
12714
f5178fbcd197
bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents:
12346
diff
changeset
|
110 user: test |
f5178fbcd197
bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents:
12346
diff
changeset
|
111 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
|
112 summary: 1 |
12714
f5178fbcd197
bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents:
12346
diff
changeset
|
113 |
16822
da55d8a77390
revset: add pattern matching to 'bookmarks' revset expression
Simon King <simon@simonking.org.uk>
parents:
16573
diff
changeset
|
114 $ hg log -r 'bookmark("re:X")' |
da55d8a77390
revset: add pattern matching to 'bookmarks' revset expression
Simon King <simon@simonking.org.uk>
parents:
16573
diff
changeset
|
115 changeset: 0:f7b1eb17ad24 |
da55d8a77390
revset: add pattern matching to 'bookmarks' revset expression
Simon King <simon@simonking.org.uk>
parents:
16573
diff
changeset
|
116 bookmark: X |
da55d8a77390
revset: add pattern matching to 'bookmarks' revset expression
Simon King <simon@simonking.org.uk>
parents:
16573
diff
changeset
|
117 user: test |
da55d8a77390
revset: add pattern matching to 'bookmarks' revset expression
Simon King <simon@simonking.org.uk>
parents:
16573
diff
changeset
|
118 date: Thu Jan 01 00:00:00 1970 +0000 |
da55d8a77390
revset: add pattern matching to 'bookmarks' revset expression
Simon King <simon@simonking.org.uk>
parents:
16573
diff
changeset
|
119 summary: 0 |
da55d8a77390
revset: add pattern matching to 'bookmarks' revset expression
Simon King <simon@simonking.org.uk>
parents:
16573
diff
changeset
|
120 |
da55d8a77390
revset: add pattern matching to 'bookmarks' revset expression
Simon King <simon@simonking.org.uk>
parents:
16573
diff
changeset
|
121 changeset: 1:925d80f479bb |
da55d8a77390
revset: add pattern matching to 'bookmarks' revset expression
Simon King <simon@simonking.org.uk>
parents:
16573
diff
changeset
|
122 bookmark: X2 |
da55d8a77390
revset: add pattern matching to 'bookmarks' revset expression
Simon King <simon@simonking.org.uk>
parents:
16573
diff
changeset
|
123 tag: tip |
da55d8a77390
revset: add pattern matching to 'bookmarks' revset expression
Simon King <simon@simonking.org.uk>
parents:
16573
diff
changeset
|
124 user: test |
da55d8a77390
revset: add pattern matching to 'bookmarks' revset expression
Simon King <simon@simonking.org.uk>
parents:
16573
diff
changeset
|
125 date: Thu Jan 01 00:00:00 1970 +0000 |
da55d8a77390
revset: add pattern matching to 'bookmarks' revset expression
Simon King <simon@simonking.org.uk>
parents:
16573
diff
changeset
|
126 summary: 1 |
da55d8a77390
revset: add pattern matching to 'bookmarks' revset expression
Simon King <simon@simonking.org.uk>
parents:
16573
diff
changeset
|
127 |
22105
3efe3c2609e0
revset: bookmark revset interprets 'literal:' prefix correctly (issue4329)
Michael O'Connor <mkoconnor@gmail.com>
parents:
22091
diff
changeset
|
128 $ hg log -r 'bookmark("literal:X")' |
3efe3c2609e0
revset: bookmark revset interprets 'literal:' prefix correctly (issue4329)
Michael O'Connor <mkoconnor@gmail.com>
parents:
22091
diff
changeset
|
129 changeset: 0:f7b1eb17ad24 |
3efe3c2609e0
revset: bookmark revset interprets 'literal:' prefix correctly (issue4329)
Michael O'Connor <mkoconnor@gmail.com>
parents:
22091
diff
changeset
|
130 bookmark: X |
3efe3c2609e0
revset: bookmark revset interprets 'literal:' prefix correctly (issue4329)
Michael O'Connor <mkoconnor@gmail.com>
parents:
22091
diff
changeset
|
131 user: test |
3efe3c2609e0
revset: bookmark revset interprets 'literal:' prefix correctly (issue4329)
Michael O'Connor <mkoconnor@gmail.com>
parents:
22091
diff
changeset
|
132 date: Thu Jan 01 00:00:00 1970 +0000 |
3efe3c2609e0
revset: bookmark revset interprets 'literal:' prefix correctly (issue4329)
Michael O'Connor <mkoconnor@gmail.com>
parents:
22091
diff
changeset
|
133 summary: 0 |
3efe3c2609e0
revset: bookmark revset interprets 'literal:' prefix correctly (issue4329)
Michael O'Connor <mkoconnor@gmail.com>
parents:
22091
diff
changeset
|
134 |
3efe3c2609e0
revset: bookmark revset interprets 'literal:' prefix correctly (issue4329)
Michael O'Connor <mkoconnor@gmail.com>
parents:
22091
diff
changeset
|
135 |
13925
c315ffc13a25
tests: add tests for non-existant branch/tag/bookmark
Idan Kamara <idankk86@gmail.com>
parents:
13911
diff
changeset
|
136 $ hg log -r 'bookmark(unknown)' |
23978
eeb5d5ab14a6
revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22776
diff
changeset
|
137 abort: bookmark 'unknown' does not exist! |
13925
c315ffc13a25
tests: add tests for non-existant branch/tag/bookmark
Idan Kamara <idankk86@gmail.com>
parents:
13911
diff
changeset
|
138 [255] |
26538
5c9ec1cc671a
revset: strip off "literal:" prefix from bookmark not found error
Yuya Nishihara <yuya@tcha.org>
parents:
26286
diff
changeset
|
139 $ hg log -r 'bookmark("literal:unknown")' |
5c9ec1cc671a
revset: strip off "literal:" prefix from bookmark not found error
Yuya Nishihara <yuya@tcha.org>
parents:
26286
diff
changeset
|
140 abort: bookmark 'unknown' does not exist! |
5c9ec1cc671a
revset: strip off "literal:" prefix from bookmark not found error
Yuya Nishihara <yuya@tcha.org>
parents:
26286
diff
changeset
|
141 [255] |
23978
eeb5d5ab14a6
revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22776
diff
changeset
|
142 $ hg log -r 'bookmark("re:unknown")' |
eeb5d5ab14a6
revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22776
diff
changeset
|
143 abort: no bookmarks exist that match 'unknown'! |
eeb5d5ab14a6
revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22776
diff
changeset
|
144 [255] |
eeb5d5ab14a6
revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22776
diff
changeset
|
145 $ hg log -r 'present(bookmark("literal:unknown"))' |
eeb5d5ab14a6
revset: raise RepoLookupError to make present() predicate continue the query
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22776
diff
changeset
|
146 $ hg log -r 'present(bookmark("re:unknown"))' |
13925
c315ffc13a25
tests: add tests for non-existant branch/tag/bookmark
Idan Kamara <idankk86@gmail.com>
parents:
13911
diff
changeset
|
147 |
12822
f13acb96b2a7
Fix and unify transplant and bookmarks revsets doc registration
Patrick Mezard <pmezard@gmail.com>
parents:
12714
diff
changeset
|
148 $ hg help revsets | grep 'bookmark(' |
f13acb96b2a7
Fix and unify transplant and bookmarks revsets doc registration
Patrick Mezard <pmezard@gmail.com>
parents:
12714
diff
changeset
|
149 "bookmark([name])" |
12714
f5178fbcd197
bookmarks: add revset for referencing bookmarks
Augie Fackler <durin42@gmail.com>
parents:
12346
diff
changeset
|
150 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
151 bookmarks X and X2 moved to rev 1, Y at rev -1 |
7261 | 152 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
153 $ 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
|
154 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
|
155 * X2 1:925d80f479bb |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
156 Y -1:000000000000 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
157 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
158 bookmark rev 0 again |
7261 | 159 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
160 $ hg bookmark -r 0 Z |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
161 |
13416
5431b3f3e52e
bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents:
13388
diff
changeset
|
162 $ 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
|
163 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
21503
10f15e34d86c
update: show message when a bookmark is activated by update
Stephen Lee <sphen.lee@gmail.com>
parents:
21404
diff
changeset
|
164 (activating bookmark X) |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
165 $ echo c > c |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
166 $ hg add c |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
167 $ 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
|
168 created new head |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
169 |
13416
5431b3f3e52e
bookmarks: make track.current=True default behaviour and remove option (BC)
David Soria Parra <dsp@php.net>
parents:
13388
diff
changeset
|
170 bookmarks X moved to rev 2, Y at rev -1, Z at rev 0 |
7261 | 171 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
172 $ 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
|
173 * 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
|
174 X2 1:925d80f479bb |
13388
a184dbd9b2c5
localrepo: sort hg bookmark output
David Soria Parra <dsp@php.net>
parents:
13386
diff
changeset
|
175 Y -1:000000000000 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
176 Z 0:f7b1eb17ad24 |
7261 | 177 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
178 rename nonexistent bookmark |
7261 | 179 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
180 $ hg bookmark -m A B |
13911
6bc340940c18
bookmarks: change error messages to match those given by 'hg tag' commands
Idan Kamara <idankk86@gmail.com>
parents:
13663
diff
changeset
|
181 abort: bookmark 'A' does not exist |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11861
diff
changeset
|
182 [255] |
11861
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 rename to existent bookmark |
7261 | 185 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
186 $ hg bookmark -m X Y |
13911
6bc340940c18
bookmarks: change error messages to match those given by 'hg tag' commands
Idan Kamara <idankk86@gmail.com>
parents:
13663
diff
changeset
|
187 abort: bookmark 'Y' already exists (use -f to force) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11861
diff
changeset
|
188 [255] |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
189 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
190 force rename to existent bookmark |
7261 | 191 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
192 $ hg bookmark -f -m X Y |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
193 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
194 list bookmarks |
7261 | 195 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
196 $ 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
|
197 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
|
198 * Y 2:db815d6d32e6 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
199 Z 0:f7b1eb17ad24 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
200 |
17686
6e4b962600a3
bookmarks: teach the -r option to use revsets
David Soria Parra <dsp@php.net>
parents:
17264
diff
changeset
|
201 bookmarks from a revset |
6e4b962600a3
bookmarks: teach the -r option to use revsets
David Soria Parra <dsp@php.net>
parents:
17264
diff
changeset
|
202 $ hg bookmark -r '.^1' REVSET |
6e4b962600a3
bookmarks: teach the -r option to use revsets
David Soria Parra <dsp@php.net>
parents:
17264
diff
changeset
|
203 $ hg bookmark -r ':tip' TIP |
19112
23f785b38af3
bookmarks: fix bug that activated a bookmark even with -r passed
Sean Farley <sean.michael.farley@gmail.com>
parents:
19111
diff
changeset
|
204 $ hg up -q TIP |
17686
6e4b962600a3
bookmarks: teach the -r option to use revsets
David Soria Parra <dsp@php.net>
parents:
17264
diff
changeset
|
205 $ hg bookmarks |
6e4b962600a3
bookmarks: teach the -r option to use revsets
David Soria Parra <dsp@php.net>
parents:
17264
diff
changeset
|
206 REVSET 0:f7b1eb17ad24 |
6e4b962600a3
bookmarks: teach the -r option to use revsets
David Soria Parra <dsp@php.net>
parents:
17264
diff
changeset
|
207 * TIP 2:db815d6d32e6 |
6e4b962600a3
bookmarks: teach the -r option to use revsets
David Soria Parra <dsp@php.net>
parents:
17264
diff
changeset
|
208 X2 1:925d80f479bb |
6e4b962600a3
bookmarks: teach the -r option to use revsets
David Soria Parra <dsp@php.net>
parents:
17264
diff
changeset
|
209 Y 2:db815d6d32e6 |
6e4b962600a3
bookmarks: teach the -r option to use revsets
David Soria Parra <dsp@php.net>
parents:
17264
diff
changeset
|
210 Z 0:f7b1eb17ad24 |
6e4b962600a3
bookmarks: teach the -r option to use revsets
David Soria Parra <dsp@php.net>
parents:
17264
diff
changeset
|
211 |
6e4b962600a3
bookmarks: teach the -r option to use revsets
David Soria Parra <dsp@php.net>
parents:
17264
diff
changeset
|
212 $ hg bookmark -d REVSET |
6e4b962600a3
bookmarks: teach the -r option to use revsets
David Soria Parra <dsp@php.net>
parents:
17264
diff
changeset
|
213 $ hg bookmark -d TIP |
6e4b962600a3
bookmarks: teach the -r option to use revsets
David Soria Parra <dsp@php.net>
parents:
17264
diff
changeset
|
214 |
19147
5b1835485442
bookmarks: allow bookmark command to take multiple arguments
Kevin Bullock <kbullock@ringworld.org>
parents:
19112
diff
changeset
|
215 rename without new name or multiple names |
7261 | 216 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
217 $ hg bookmark -m Y |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
218 abort: new bookmark name required |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11861
diff
changeset
|
219 [255] |
19147
5b1835485442
bookmarks: allow bookmark command to take multiple arguments
Kevin Bullock <kbullock@ringworld.org>
parents:
19112
diff
changeset
|
220 $ hg bookmark -m Y Y2 Y3 |
5b1835485442
bookmarks: allow bookmark command to take multiple arguments
Kevin Bullock <kbullock@ringworld.org>
parents:
19112
diff
changeset
|
221 abort: only one new bookmark name allowed |
5b1835485442
bookmarks: allow bookmark command to take multiple arguments
Kevin Bullock <kbullock@ringworld.org>
parents:
19112
diff
changeset
|
222 [255] |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
223 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
224 delete without name |
7261 | 225 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
226 $ hg bookmark -d |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
227 abort: bookmark name required |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11861
diff
changeset
|
228 [255] |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
229 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
230 delete nonexistent bookmark |
7261 | 231 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
232 $ hg bookmark -d A |
13911
6bc340940c18
bookmarks: change error messages to match those given by 'hg tag' commands
Idan Kamara <idankk86@gmail.com>
parents:
13663
diff
changeset
|
233 abort: bookmark 'A' does not exist |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11861
diff
changeset
|
234 [255] |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
235 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
236 bookmark name with spaces should be stripped |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
237 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
238 $ hg bookmark ' x y ' |
7261 | 239 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
240 list bookmarks |
7261 | 241 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
242 $ 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
|
243 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
|
244 Y 2:db815d6d32e6 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
245 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
|
246 * x y 2:db815d6d32e6 |
7261 | 247 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
248 look up stripped bookmark name |
7261 | 249 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
250 $ 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
|
251 changeset: 2:db815d6d32e6 |
13386
f78bc5ddbe4f
templater: add bookmarks to templates and default output
David Soria Parra <dsp@php.net>
parents:
13385
diff
changeset
|
252 bookmark: Y |
f78bc5ddbe4f
templater: add bookmarks to templates and default output
David Soria Parra <dsp@php.net>
parents:
13385
diff
changeset
|
253 bookmark: x y |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
254 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
|
255 parent: 0:f7b1eb17ad24 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
256 user: test |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
257 date: Thu Jan 01 00:00:00 1970 +0000 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
258 summary: 2 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
259 |
7261 | 260 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
261 reject bookmark name with newline |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
262 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
263 $ hg bookmark ' |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
264 > ' |
17814
f88ca484c3e9
bookmarks: remove redundant check for newline
Kevin Bullock <kbullock@ringworld.org>
parents:
17790
diff
changeset
|
265 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
|
266 [255] |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
267 |
17789
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
268 $ hg bookmark -m Z ' |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
269 > ' |
17814
f88ca484c3e9
bookmarks: remove redundant check for newline
Kevin Bullock <kbullock@ringworld.org>
parents:
17790
diff
changeset
|
270 abort: bookmark names cannot consist entirely of whitespace |
17789
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
271 [255] |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
272 |
17816
19388ba75a06
bookmarks: disallow bookmarks named 'tip', '.', or 'null'
Kevin Bullock <kbullock@ringworld.org>
parents:
17814
diff
changeset
|
273 bookmark with reserved name |
19388ba75a06
bookmarks: disallow bookmarks named 'tip', '.', or 'null'
Kevin Bullock <kbullock@ringworld.org>
parents:
17814
diff
changeset
|
274 |
19388ba75a06
bookmarks: disallow bookmarks named 'tip', '.', or 'null'
Kevin Bullock <kbullock@ringworld.org>
parents:
17814
diff
changeset
|
275 $ hg bookmark tip |
19388ba75a06
bookmarks: disallow bookmarks named 'tip', '.', or 'null'
Kevin Bullock <kbullock@ringworld.org>
parents:
17814
diff
changeset
|
276 abort: the name 'tip' is reserved |
19388ba75a06
bookmarks: disallow bookmarks named 'tip', '.', or 'null'
Kevin Bullock <kbullock@ringworld.org>
parents:
17814
diff
changeset
|
277 [255] |
19388ba75a06
bookmarks: disallow bookmarks named 'tip', '.', or 'null'
Kevin Bullock <kbullock@ringworld.org>
parents:
17814
diff
changeset
|
278 |
19388ba75a06
bookmarks: disallow bookmarks named 'tip', '.', or 'null'
Kevin Bullock <kbullock@ringworld.org>
parents:
17814
diff
changeset
|
279 $ hg bookmark . |
19388ba75a06
bookmarks: disallow bookmarks named 'tip', '.', or 'null'
Kevin Bullock <kbullock@ringworld.org>
parents:
17814
diff
changeset
|
280 abort: the name '.' is reserved |
19388ba75a06
bookmarks: disallow bookmarks named 'tip', '.', or 'null'
Kevin Bullock <kbullock@ringworld.org>
parents:
17814
diff
changeset
|
281 [255] |
19388ba75a06
bookmarks: disallow bookmarks named 'tip', '.', or 'null'
Kevin Bullock <kbullock@ringworld.org>
parents:
17814
diff
changeset
|
282 |
19388ba75a06
bookmarks: disallow bookmarks named 'tip', '.', or 'null'
Kevin Bullock <kbullock@ringworld.org>
parents:
17814
diff
changeset
|
283 $ hg bookmark null |
19388ba75a06
bookmarks: disallow bookmarks named 'tip', '.', or 'null'
Kevin Bullock <kbullock@ringworld.org>
parents:
17814
diff
changeset
|
284 abort: the name 'null' is reserved |
19388ba75a06
bookmarks: disallow bookmarks named 'tip', '.', or 'null'
Kevin Bullock <kbullock@ringworld.org>
parents:
17814
diff
changeset
|
285 [255] |
19388ba75a06
bookmarks: disallow bookmarks named 'tip', '.', or 'null'
Kevin Bullock <kbullock@ringworld.org>
parents:
17814
diff
changeset
|
286 |
19388ba75a06
bookmarks: disallow bookmarks named 'tip', '.', or 'null'
Kevin Bullock <kbullock@ringworld.org>
parents:
17814
diff
changeset
|
287 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
288 bookmark with existing name |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
289 |
18773
56dd55da2f7d
bookmarks: allow moving a bookmark forward to a descendant
Kevin Bullock <kbullock@ringworld.org>
parents:
18623
diff
changeset
|
290 $ hg bookmark X2 |
56dd55da2f7d
bookmarks: allow moving a bookmark forward to a descendant
Kevin Bullock <kbullock@ringworld.org>
parents:
18623
diff
changeset
|
291 abort: bookmark 'X2' already exists (use -f to force) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11861
diff
changeset
|
292 [255] |
7261 | 293 |
17789
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
294 $ hg bookmark -m Y Z |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
295 abort: bookmark 'Z' already exists (use -f to force) |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
296 [255] |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
297 |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
298 bookmark with name of branch |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
299 |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
300 $ hg bookmark default |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
301 abort: a bookmark cannot have the name of an existing branch |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
302 [255] |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
303 |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
304 $ hg bookmark -m Y default |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
305 abort: a bookmark cannot have the name of an existing branch |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
306 [255] |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
307 |
18566
341868ef0cf6
bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents:
18471
diff
changeset
|
308 bookmark with integer name |
341868ef0cf6
bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents:
18471
diff
changeset
|
309 |
341868ef0cf6
bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents:
18471
diff
changeset
|
310 $ hg bookmark 10 |
19070
290a61833b99
translations: change label integer error to not specify the kind of label
Durham Goode <durham@fb.com>
parents:
18782
diff
changeset
|
311 abort: cannot use an integer as a name |
18566
341868ef0cf6
bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents:
18471
diff
changeset
|
312 [255] |
341868ef0cf6
bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents:
18471
diff
changeset
|
313 |
32451
bce5ebe72859
bookmarks: warn about bookmark names that unambiguously resolve to a node (BC)
Augie Fackler <augie@google.com>
parents:
31767
diff
changeset
|
314 bookmark with a name that matches a node id |
bce5ebe72859
bookmarks: warn about bookmark names that unambiguously resolve to a node (BC)
Augie Fackler <augie@google.com>
parents:
31767
diff
changeset
|
315 $ hg bookmark 925d80f479bb db815d6d32e6 |
bce5ebe72859
bookmarks: warn about bookmark names that unambiguously resolve to a node (BC)
Augie Fackler <augie@google.com>
parents:
31767
diff
changeset
|
316 bookmark 925d80f479bb matches a changeset hash |
bce5ebe72859
bookmarks: warn about bookmark names that unambiguously resolve to a node (BC)
Augie Fackler <augie@google.com>
parents:
31767
diff
changeset
|
317 (did you leave a -r out of an 'hg bookmark' command?) |
bce5ebe72859
bookmarks: warn about bookmark names that unambiguously resolve to a node (BC)
Augie Fackler <augie@google.com>
parents:
31767
diff
changeset
|
318 bookmark db815d6d32e6 matches a changeset hash |
bce5ebe72859
bookmarks: warn about bookmark names that unambiguously resolve to a node (BC)
Augie Fackler <augie@google.com>
parents:
31767
diff
changeset
|
319 (did you leave a -r out of an 'hg bookmark' command?) |
bce5ebe72859
bookmarks: warn about bookmark names that unambiguously resolve to a node (BC)
Augie Fackler <augie@google.com>
parents:
31767
diff
changeset
|
320 $ hg bookmark -d 925d80f479bb |
bce5ebe72859
bookmarks: warn about bookmark names that unambiguously resolve to a node (BC)
Augie Fackler <augie@google.com>
parents:
31767
diff
changeset
|
321 $ hg bookmark -d db815d6d32e6 |
bce5ebe72859
bookmarks: warn about bookmark names that unambiguously resolve to a node (BC)
Augie Fackler <augie@google.com>
parents:
31767
diff
changeset
|
322 |
32482
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
323 $ cd .. |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
324 |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
325 bookmark with a name that matches an ambiguous node id |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
326 |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
327 $ hg init ambiguous |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
328 $ cd ambiguous |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
329 $ echo 0 > a |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
330 $ hg ci -qAm 0 |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
331 $ for i in 1057 2857 4025; do |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
332 > hg up -q 0 |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
333 > echo $i > a |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
334 > hg ci -qm $i |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
335 > done |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
336 $ hg up -q null |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
337 $ hg log -r0: -T '{rev}:{node}\n' |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
338 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
339 1:c56256a09cd28e5764f32e8e2810d0f01e2e357a |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
340 2:c5623987d205cd6d9d8389bfc40fff9dbb670b48 |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
341 3:c562ddd9c94164376c20b86b0b4991636a3bf84f |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
342 |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
343 $ hg bookmark -r0 c562 |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
344 $ hg bookmarks |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
345 c562 0:b4e73ffab476 |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
346 |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
347 $ cd .. |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
348 |
17790
0291e122fb05
bookmarks: abort when incompatible options are used (issue3663)
David Soria Parra <dsp@php.net>
parents:
17789
diff
changeset
|
349 incompatible options |
0291e122fb05
bookmarks: abort when incompatible options are used (issue3663)
David Soria Parra <dsp@php.net>
parents:
17789
diff
changeset
|
350 |
32482
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
351 $ cd repo |
579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org>
parents:
32451
diff
changeset
|
352 |
17790
0291e122fb05
bookmarks: abort when incompatible options are used (issue3663)
David Soria Parra <dsp@php.net>
parents:
17789
diff
changeset
|
353 $ hg bookmark -m Y -d Z |
0291e122fb05
bookmarks: abort when incompatible options are used (issue3663)
David Soria Parra <dsp@php.net>
parents:
17789
diff
changeset
|
354 abort: --delete and --rename are incompatible |
0291e122fb05
bookmarks: abort when incompatible options are used (issue3663)
David Soria Parra <dsp@php.net>
parents:
17789
diff
changeset
|
355 [255] |
0291e122fb05
bookmarks: abort when incompatible options are used (issue3663)
David Soria Parra <dsp@php.net>
parents:
17789
diff
changeset
|
356 |
0291e122fb05
bookmarks: abort when incompatible options are used (issue3663)
David Soria Parra <dsp@php.net>
parents:
17789
diff
changeset
|
357 $ hg bookmark -r 1 -d Z |
0291e122fb05
bookmarks: abort when incompatible options are used (issue3663)
David Soria Parra <dsp@php.net>
parents:
17789
diff
changeset
|
358 abort: --rev is incompatible with --delete |
0291e122fb05
bookmarks: abort when incompatible options are used (issue3663)
David Soria Parra <dsp@php.net>
parents:
17789
diff
changeset
|
359 [255] |
0291e122fb05
bookmarks: abort when incompatible options are used (issue3663)
David Soria Parra <dsp@php.net>
parents:
17789
diff
changeset
|
360 |
0291e122fb05
bookmarks: abort when incompatible options are used (issue3663)
David Soria Parra <dsp@php.net>
parents:
17789
diff
changeset
|
361 $ hg bookmark -r 1 -m Z Y |
0291e122fb05
bookmarks: abort when incompatible options are used (issue3663)
David Soria Parra <dsp@php.net>
parents:
17789
diff
changeset
|
362 abort: --rev is incompatible with --rename |
0291e122fb05
bookmarks: abort when incompatible options are used (issue3663)
David Soria Parra <dsp@php.net>
parents:
17789
diff
changeset
|
363 [255] |
0291e122fb05
bookmarks: abort when incompatible options are used (issue3663)
David Soria Parra <dsp@php.net>
parents:
17789
diff
changeset
|
364 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
365 force bookmark with existing name |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
366 |
18773
56dd55da2f7d
bookmarks: allow moving a bookmark forward to a descendant
Kevin Bullock <kbullock@ringworld.org>
parents:
18623
diff
changeset
|
367 $ hg bookmark -f X2 |
18782
22f87dc77604
bookmarks: moving the active bookmark deactivates it
Kevin Bullock <kbullock@ringworld.org>
parents:
18781
diff
changeset
|
368 |
22f87dc77604
bookmarks: moving the active bookmark deactivates it
Kevin Bullock <kbullock@ringworld.org>
parents:
18781
diff
changeset
|
369 force bookmark back to where it was, should deactivate it |
22f87dc77604
bookmarks: moving the active bookmark deactivates it
Kevin Bullock <kbullock@ringworld.org>
parents:
18781
diff
changeset
|
370 |
18773
56dd55da2f7d
bookmarks: allow moving a bookmark forward to a descendant
Kevin Bullock <kbullock@ringworld.org>
parents:
18623
diff
changeset
|
371 $ hg bookmark -fr1 X2 |
18782
22f87dc77604
bookmarks: moving the active bookmark deactivates it
Kevin Bullock <kbullock@ringworld.org>
parents:
18781
diff
changeset
|
372 $ hg bookmarks |
22f87dc77604
bookmarks: moving the active bookmark deactivates it
Kevin Bullock <kbullock@ringworld.org>
parents:
18781
diff
changeset
|
373 X2 1:925d80f479bb |
22f87dc77604
bookmarks: moving the active bookmark deactivates it
Kevin Bullock <kbullock@ringworld.org>
parents:
18781
diff
changeset
|
374 Y 2:db815d6d32e6 |
22f87dc77604
bookmarks: moving the active bookmark deactivates it
Kevin Bullock <kbullock@ringworld.org>
parents:
18781
diff
changeset
|
375 Z 0:f7b1eb17ad24 |
22f87dc77604
bookmarks: moving the active bookmark deactivates it
Kevin Bullock <kbullock@ringworld.org>
parents:
18781
diff
changeset
|
376 x y 2:db815d6d32e6 |
18773
56dd55da2f7d
bookmarks: allow moving a bookmark forward to a descendant
Kevin Bullock <kbullock@ringworld.org>
parents:
18623
diff
changeset
|
377 |
56dd55da2f7d
bookmarks: allow moving a bookmark forward to a descendant
Kevin Bullock <kbullock@ringworld.org>
parents:
18623
diff
changeset
|
378 forward bookmark to descendant without --force |
56dd55da2f7d
bookmarks: allow moving a bookmark forward to a descendant
Kevin Bullock <kbullock@ringworld.org>
parents:
18623
diff
changeset
|
379 |
56dd55da2f7d
bookmarks: allow moving a bookmark forward to a descendant
Kevin Bullock <kbullock@ringworld.org>
parents:
18623
diff
changeset
|
380 $ hg bookmark Z |
18774
b616c9b8001d
bookmarks: fix test broken by 0bba1ff2ac7b
Kevin Bullock <kbullock@ringworld.org>
parents:
18773
diff
changeset
|
381 moving bookmark 'Z' forward from f7b1eb17ad24 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
382 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
383 list bookmarks |
7261 | 384 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
385 $ 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
|
386 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
|
387 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
|
388 * 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
|
389 x y 2:db815d6d32e6 |
7261 | 390 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
391 revision but no bookmark name |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
392 |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
393 $ hg bookmark -r . |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
394 abort: bookmark name required |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11861
diff
changeset
|
395 [255] |
7261 | 396 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
397 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
|
398 |
11861
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
399 $ hg bookmark ' ' |
41d481ddd976
tests: unify test-bookmarks
Martin Geisler <mg@lazybytes.net>
parents:
11704
diff
changeset
|
400 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
|
401 [255] |
13425
0fe36c347c00
bookmarks: forbid \0 \r \n : in bookmark names (BC)
David Soria Parra <dsp@php.net>
parents:
13416
diff
changeset
|
402 |
17789
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
403 $ hg bookmark -m Y ' ' |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
404 abort: bookmark names cannot consist entirely of whitespace |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
405 [255] |
4cfd02c2df9a
bookmarks: check bookmark format during rename (issue3662)
David Soria Parra <dsp@php.net>
parents:
17704
diff
changeset
|
406 |
13425
0fe36c347c00
bookmarks: forbid \0 \r \n : in bookmark names (BC)
David Soria Parra <dsp@php.net>
parents:
13416
diff
changeset
|
407 invalid bookmark |
0fe36c347c00
bookmarks: forbid \0 \r \n : in bookmark names (BC)
David Soria Parra <dsp@php.net>
parents:
13416
diff
changeset
|
408 |
0fe36c347c00
bookmarks: forbid \0 \r \n : in bookmark names (BC)
David Soria Parra <dsp@php.net>
parents:
13416
diff
changeset
|
409 $ hg bookmark 'foo:bar' |
17850
71c1513fd560
scmutil: generalize message to make it more i18n-friendly
Wagner Bruna <wbruna@yahoo.com>
parents:
17821
diff
changeset
|
410 abort: ':' cannot be used in a name |
17821
361ab1e2086f
scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents:
17816
diff
changeset
|
411 [255] |
361ab1e2086f
scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents:
17816
diff
changeset
|
412 |
361ab1e2086f
scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents:
17816
diff
changeset
|
413 $ hg bookmark 'foo |
361ab1e2086f
scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents:
17816
diff
changeset
|
414 > bar' |
17850
71c1513fd560
scmutil: generalize message to make it more i18n-friendly
Wagner Bruna <wbruna@yahoo.com>
parents:
17821
diff
changeset
|
415 abort: '\n' cannot be used in a name |
13425
0fe36c347c00
bookmarks: forbid \0 \r \n : in bookmark names (BC)
David Soria Parra <dsp@php.net>
parents:
13416
diff
changeset
|
416 [255] |
0fe36c347c00
bookmarks: forbid \0 \r \n : in bookmark names (BC)
David Soria Parra <dsp@php.net>
parents:
13416
diff
changeset
|
417 |
13474
6c2e476b7a11
tests: check if the bookmarks extension is ignored
David Soria Parra <dsp@php.net>
parents:
13469
diff
changeset
|
418 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
|
419 |
6c2e476b7a11
tests: check if the bookmarks extension is ignored
David Soria Parra <dsp@php.net>
parents:
13469
diff
changeset
|
420 $ echo "[extensions]" >> $HGRCPATH |
6c2e476b7a11
tests: check if the bookmarks extension is ignored
David Soria Parra <dsp@php.net>
parents:
13469
diff
changeset
|
421 $ echo "bookmarks=" >> $HGRCPATH |
6c2e476b7a11
tests: check if the bookmarks extension is ignored
David Soria Parra <dsp@php.net>
parents:
13469
diff
changeset
|
422 $ hg bookmarks |
6c2e476b7a11
tests: check if the bookmarks extension is ignored
David Soria Parra <dsp@php.net>
parents:
13469
diff
changeset
|
423 X2 1:925d80f479bb |
6c2e476b7a11
tests: check if the bookmarks extension is ignored
David Soria Parra <dsp@php.net>
parents:
13469
diff
changeset
|
424 Y 2:db815d6d32e6 |
6c2e476b7a11
tests: check if the bookmarks extension is ignored
David Soria Parra <dsp@php.net>
parents:
13469
diff
changeset
|
425 * Z 2:db815d6d32e6 |
6c2e476b7a11
tests: check if the bookmarks extension is ignored
David Soria Parra <dsp@php.net>
parents:
13469
diff
changeset
|
426 x y 2:db815d6d32e6 |
14266
89e7d35e0ef0
fix bookmarks rollback behavior
Alexander Solovyov <alexander@solovyov.net>
parents:
13477
diff
changeset
|
427 |
13454
afc84a879ac8
summary: add bookmarks to summary
David Soria Parra <dsp@php.net>
parents:
13448
diff
changeset
|
428 test summary |
afc84a879ac8
summary: add bookmarks to summary
David Soria Parra <dsp@php.net>
parents:
13448
diff
changeset
|
429 |
afc84a879ac8
summary: add bookmarks to summary
David Soria Parra <dsp@php.net>
parents:
13448
diff
changeset
|
430 $ hg summary |
14906
7c3c8f37e84f
summary: show bookmarks separate from tags and note active mark (issue2892)
Augie Fackler <durin42@gmail.com>
parents:
14846
diff
changeset
|
431 parent: 2:db815d6d32e6 tip |
13454
afc84a879ac8
summary: add bookmarks to summary
David Soria Parra <dsp@php.net>
parents:
13448
diff
changeset
|
432 2 |
afc84a879ac8
summary: add bookmarks to summary
David Soria Parra <dsp@php.net>
parents:
13448
diff
changeset
|
433 branch: default |
14906
7c3c8f37e84f
summary: show bookmarks separate from tags and note active mark (issue2892)
Augie Fackler <durin42@gmail.com>
parents:
14846
diff
changeset
|
434 bookmarks: *Z Y x y |
13454
afc84a879ac8
summary: add bookmarks to summary
David Soria Parra <dsp@php.net>
parents:
13448
diff
changeset
|
435 commit: (clean) |
afc84a879ac8
summary: add bookmarks to summary
David Soria Parra <dsp@php.net>
parents:
13448
diff
changeset
|
436 update: 1 new changesets, 2 branch heads (merge) |
25382
6084926366b9
summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents:
25349
diff
changeset
|
437 phases: 3 draft |
13454
afc84a879ac8
summary: add bookmarks to summary
David Soria Parra <dsp@php.net>
parents:
13448
diff
changeset
|
438 |
13477
0fb2ff949790
id: add bookmarks to id
Kevin Bullock <kbullock@ringworld.org>
parents:
13474
diff
changeset
|
439 test id |
0fb2ff949790
id: add bookmarks to id
Kevin Bullock <kbullock@ringworld.org>
parents:
13474
diff
changeset
|
440 |
0fb2ff949790
id: add bookmarks to id
Kevin Bullock <kbullock@ringworld.org>
parents:
13474
diff
changeset
|
441 $ hg id |
0fb2ff949790
id: add bookmarks to id
Kevin Bullock <kbullock@ringworld.org>
parents:
13474
diff
changeset
|
442 db815d6d32e6 tip Y/Z/x y |
14266
89e7d35e0ef0
fix bookmarks rollback behavior
Alexander Solovyov <alexander@solovyov.net>
parents:
13477
diff
changeset
|
443 |
89e7d35e0ef0
fix bookmarks rollback behavior
Alexander Solovyov <alexander@solovyov.net>
parents:
13477
diff
changeset
|
444 test rollback |
89e7d35e0ef0
fix bookmarks rollback behavior
Alexander Solovyov <alexander@solovyov.net>
parents:
13477
diff
changeset
|
445 |
14268 | 446 $ echo foo > f1 |
25744
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
447 $ hg bookmark tmp-rollback |
14268 | 448 $ hg ci -Amr |
449 adding f1 | |
25744
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
450 $ hg bookmarks |
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
451 X2 1:925d80f479bb |
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
452 Y 2:db815d6d32e6 |
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
453 Z 2:db815d6d32e6 |
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
454 * tmp-rollback 3:2bf5cfec5864 |
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
455 x y 2:db815d6d32e6 |
14266
89e7d35e0ef0
fix bookmarks rollback behavior
Alexander Solovyov <alexander@solovyov.net>
parents:
13477
diff
changeset
|
456 $ hg rollback |
14268 | 457 repository tip rolled back to revision 2 (undo commit) |
458 working directory now based on revision 2 | |
459 $ hg bookmarks | |
460 X2 1:925d80f479bb | |
461 Y 2:db815d6d32e6 | |
18782
22f87dc77604
bookmarks: moving the active bookmark deactivates it
Kevin Bullock <kbullock@ringworld.org>
parents:
18781
diff
changeset
|
462 Z 2:db815d6d32e6 |
25744
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
463 * tmp-rollback 2:db815d6d32e6 |
14268 | 464 x y 2:db815d6d32e6 |
25744
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
465 $ hg bookmark -f Z -r 1 |
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
466 $ hg rollback |
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
467 repository tip rolled back to revision 2 (undo bookmark) |
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
468 $ hg bookmarks |
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
469 X2 1:925d80f479bb |
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
470 Y 2:db815d6d32e6 |
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
471 Z 2:db815d6d32e6 |
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
472 * tmp-rollback 2:db815d6d32e6 |
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
473 x y 2:db815d6d32e6 |
e78a80f8f51e
bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25382
diff
changeset
|
474 $ hg bookmark -d tmp-rollback |
14268 | 475 |
18781
99b78269a2ec
bookmarks: allow (re-)activating a bookmark on the current changeset
Kevin Bullock <kbullock@ringworld.org>
parents:
18774
diff
changeset
|
476 activate bookmark on working dir parent without --force |
99b78269a2ec
bookmarks: allow (re-)activating a bookmark on the current changeset
Kevin Bullock <kbullock@ringworld.org>
parents:
18774
diff
changeset
|
477 |
99b78269a2ec
bookmarks: allow (re-)activating a bookmark on the current changeset
Kevin Bullock <kbullock@ringworld.org>
parents:
18774
diff
changeset
|
478 $ hg bookmark --inactive Z |
99b78269a2ec
bookmarks: allow (re-)activating a bookmark on the current changeset
Kevin Bullock <kbullock@ringworld.org>
parents:
18774
diff
changeset
|
479 $ hg bookmark Z |
99b78269a2ec
bookmarks: allow (re-)activating a bookmark on the current changeset
Kevin Bullock <kbullock@ringworld.org>
parents:
18774
diff
changeset
|
480 |
13604
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
481 test clone |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
482 |
16276
6b16ded5c810
bookmarks: clone non-divergent bookmarks with @ in them
Kevin Bullock <kbullock@ringworld.org>
parents:
15615
diff
changeset
|
483 $ hg bookmark -r 2 -i @ |
6b16ded5c810
bookmarks: clone non-divergent bookmarks with @ in them
Kevin Bullock <kbullock@ringworld.org>
parents:
15615
diff
changeset
|
484 $ hg bookmark -r 2 -i a@ |
14266
89e7d35e0ef0
fix bookmarks rollback behavior
Alexander Solovyov <alexander@solovyov.net>
parents:
13477
diff
changeset
|
485 $ hg bookmarks |
16276
6b16ded5c810
bookmarks: clone non-divergent bookmarks with @ in them
Kevin Bullock <kbullock@ringworld.org>
parents:
15615
diff
changeset
|
486 @ 2:db815d6d32e6 |
13604
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
487 X2 1:925d80f479bb |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
488 Y 2:db815d6d32e6 |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
489 * Z 2:db815d6d32e6 |
16276
6b16ded5c810
bookmarks: clone non-divergent bookmarks with @ in them
Kevin Bullock <kbullock@ringworld.org>
parents:
15615
diff
changeset
|
490 a@ 2:db815d6d32e6 |
13604
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
491 x y 2:db815d6d32e6 |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
492 $ hg clone . cloned-bookmarks |
17882
36ed69d4593d
clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents:
17872
diff
changeset
|
493 updating to bookmark @ |
13604
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
494 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
495 $ hg -R cloned-bookmarks bookmarks |
17870
7d2dd10ce9ea
clone: activate @ bookmark if updating to it
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17868
diff
changeset
|
496 * @ 2:db815d6d32e6 |
13604
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
497 X2 1:925d80f479bb |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
498 Y 2:db815d6d32e6 |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
499 Z 2:db815d6d32e6 |
16276
6b16ded5c810
bookmarks: clone non-divergent bookmarks with @ in them
Kevin Bullock <kbullock@ringworld.org>
parents:
15615
diff
changeset
|
500 a@ 2:db815d6d32e6 |
13604
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
501 x y 2:db815d6d32e6 |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
502 |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
503 test clone with pull protocol |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
504 |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
505 $ hg clone --pull . cloned-bookmarks-pull |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
506 requesting all changes |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
507 adding changesets |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
508 adding manifests |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
509 adding file changes |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
510 added 3 changesets with 3 changes to 3 files (+1 heads) |
17882
36ed69d4593d
clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents:
17872
diff
changeset
|
511 updating to bookmark @ |
13604
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
512 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
513 $ hg -R cloned-bookmarks-pull bookmarks |
17870
7d2dd10ce9ea
clone: activate @ bookmark if updating to it
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17868
diff
changeset
|
514 * @ 2:db815d6d32e6 |
14266
89e7d35e0ef0
fix bookmarks rollback behavior
Alexander Solovyov <alexander@solovyov.net>
parents:
13477
diff
changeset
|
515 X2 1:925d80f479bb |
13604
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
516 Y 2:db815d6d32e6 |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
517 Z 2:db815d6d32e6 |
16276
6b16ded5c810
bookmarks: clone non-divergent bookmarks with @ in them
Kevin Bullock <kbullock@ringworld.org>
parents:
15615
diff
changeset
|
518 a@ 2:db815d6d32e6 |
13604
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
519 x y 2:db815d6d32e6 |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
520 |
19147
5b1835485442
bookmarks: allow bookmark command to take multiple arguments
Kevin Bullock <kbullock@ringworld.org>
parents:
19112
diff
changeset
|
521 delete multiple bookmarks at once |
5b1835485442
bookmarks: allow bookmark command to take multiple arguments
Kevin Bullock <kbullock@ringworld.org>
parents:
19112
diff
changeset
|
522 |
5b1835485442
bookmarks: allow bookmark command to take multiple arguments
Kevin Bullock <kbullock@ringworld.org>
parents:
19112
diff
changeset
|
523 $ hg bookmark -d @ a@ |
16276
6b16ded5c810
bookmarks: clone non-divergent bookmarks with @ in them
Kevin Bullock <kbullock@ringworld.org>
parents:
15615
diff
changeset
|
524 |
17868
04755508f8ed
test-bookmarks.t: check that bookmark "default" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17850
diff
changeset
|
525 test clone with a bookmark named "default" (issue3677) |
04755508f8ed
test-bookmarks.t: check that bookmark "default" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17850
diff
changeset
|
526 |
04755508f8ed
test-bookmarks.t: check that bookmark "default" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17850
diff
changeset
|
527 $ hg bookmark -r 1 -f -i default |
04755508f8ed
test-bookmarks.t: check that bookmark "default" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17850
diff
changeset
|
528 $ hg clone . cloned-bookmark-default |
04755508f8ed
test-bookmarks.t: check that bookmark "default" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17850
diff
changeset
|
529 updating to branch default |
04755508f8ed
test-bookmarks.t: check that bookmark "default" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17850
diff
changeset
|
530 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
04755508f8ed
test-bookmarks.t: check that bookmark "default" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17850
diff
changeset
|
531 $ hg -R cloned-bookmark-default bookmarks |
04755508f8ed
test-bookmarks.t: check that bookmark "default" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17850
diff
changeset
|
532 X2 1:925d80f479bb |
04755508f8ed
test-bookmarks.t: check that bookmark "default" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17850
diff
changeset
|
533 Y 2:db815d6d32e6 |
04755508f8ed
test-bookmarks.t: check that bookmark "default" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17850
diff
changeset
|
534 Z 2:db815d6d32e6 |
04755508f8ed
test-bookmarks.t: check that bookmark "default" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17850
diff
changeset
|
535 default 1:925d80f479bb |
04755508f8ed
test-bookmarks.t: check that bookmark "default" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17850
diff
changeset
|
536 x y 2:db815d6d32e6 |
04755508f8ed
test-bookmarks.t: check that bookmark "default" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17850
diff
changeset
|
537 $ hg -R cloned-bookmark-default parents -q |
04755508f8ed
test-bookmarks.t: check that bookmark "default" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17850
diff
changeset
|
538 2:db815d6d32e6 |
04755508f8ed
test-bookmarks.t: check that bookmark "default" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17850
diff
changeset
|
539 $ hg bookmark -d default |
04755508f8ed
test-bookmarks.t: check that bookmark "default" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17850
diff
changeset
|
540 |
13604
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
541 test clone with a specific revision |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
542 |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
543 $ hg clone -r 925d80 . cloned-bookmarks-rev |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
544 adding changesets |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
545 adding manifests |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
546 adding file changes |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
547 added 2 changesets with 2 changes to 2 files |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
548 updating to branch default |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
549 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
550 $ hg -R cloned-bookmarks-rev bookmarks |
3f6a4579f803
hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents:
13477
diff
changeset
|
551 X2 1:925d80f479bb |
13663
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
552 |
17703
4a07d2ff7c66
clone: activate bookmark specified with --updaterev
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17264
diff
changeset
|
553 test clone with update to a bookmark |
4a07d2ff7c66
clone: activate bookmark specified with --updaterev
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17264
diff
changeset
|
554 |
25893
04ae6feb04c5
test-bookmarks.t: avoid nested repo
Siddharth Agarwal <sid0@fb.com>
parents:
25789
diff
changeset
|
555 $ hg clone -u Z . ../cloned-bookmarks-update |
17703
4a07d2ff7c66
clone: activate bookmark specified with --updaterev
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17264
diff
changeset
|
556 updating to branch default |
4a07d2ff7c66
clone: activate bookmark specified with --updaterev
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17264
diff
changeset
|
557 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
25893
04ae6feb04c5
test-bookmarks.t: avoid nested repo
Siddharth Agarwal <sid0@fb.com>
parents:
25789
diff
changeset
|
558 $ hg -R ../cloned-bookmarks-update bookmarks |
17703
4a07d2ff7c66
clone: activate bookmark specified with --updaterev
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17264
diff
changeset
|
559 X2 1:925d80f479bb |
4a07d2ff7c66
clone: activate bookmark specified with --updaterev
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17264
diff
changeset
|
560 Y 2:db815d6d32e6 |
4a07d2ff7c66
clone: activate bookmark specified with --updaterev
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17264
diff
changeset
|
561 * Z 2:db815d6d32e6 |
4a07d2ff7c66
clone: activate bookmark specified with --updaterev
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17264
diff
changeset
|
562 x y 2:db815d6d32e6 |
4a07d2ff7c66
clone: activate bookmark specified with --updaterev
Thomas Arendsen Hein <thomas@intevation.de>
parents:
17264
diff
changeset
|
563 |
13663
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
564 create bundle with two heads |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
565 |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
566 $ hg clone . tobundle |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
567 updating to branch default |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
568 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
569 $ echo x > tobundle/x |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
570 $ hg -R tobundle add tobundle/x |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
571 $ hg -R tobundle commit -m'x' |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
572 $ hg -R tobundle update -r -2 |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
573 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
574 $ echo y > tobundle/y |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
575 $ hg -R tobundle branch test |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
576 marked working directory as branch test |
15615 | 577 (branches are permanent and global, did you want a bookmark?) |
13663
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
578 $ hg -R tobundle add tobundle/y |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
579 $ hg -R tobundle commit -m'y' |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
580 $ hg -R tobundle bundle tobundle.hg |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
581 searching for changes |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
582 2 changesets found |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
583 $ hg unbundle tobundle.hg |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
584 adding changesets |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
585 adding manifests |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
586 adding file changes |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
587 added 2 changesets with 2 changes to 2 files (+1 heads) |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
588 (run 'hg heads' to see heads, 'hg merge' to merge) |
18471
2096e025a728
update: update to current bookmark if it moved out from under us (issue3682)
Kevin Bullock <kbullock@ringworld.org>
parents:
18075
diff
changeset
|
589 |
25349
62da2d7745f9
commands: rename current to active in variables and comments
Ryan McElroy <rmcelroy@fb.com>
parents:
25111
diff
changeset
|
590 update to active bookmark if it's not the parent |
18471
2096e025a728
update: update to current bookmark if it moved out from under us (issue3682)
Kevin Bullock <kbullock@ringworld.org>
parents:
18075
diff
changeset
|
591 |
33213
0bec70c1df15
tests: make output lines conditional for testing with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32735
diff
changeset
|
592 (it is known issue that fsmonitor can't handle nested repositories. In |
0bec70c1df15
tests: make output lines conditional for testing with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32735
diff
changeset
|
593 this test scenario, cloned-bookmark-default and tobundle exist in the |
0bec70c1df15
tests: make output lines conditional for testing with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32735
diff
changeset
|
594 working directory of current repository) |
0bec70c1df15
tests: make output lines conditional for testing with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32735
diff
changeset
|
595 |
18620
7da487b0256a
summary: test that current bookmark isn't shown
Kevin Bullock <kbullock@ringworld.org>
parents:
18566
diff
changeset
|
596 $ hg summary |
7da487b0256a
summary: test that current bookmark isn't shown
Kevin Bullock <kbullock@ringworld.org>
parents:
18566
diff
changeset
|
597 parent: 2:db815d6d32e6 |
7da487b0256a
summary: test that current bookmark isn't shown
Kevin Bullock <kbullock@ringworld.org>
parents:
18566
diff
changeset
|
598 2 |
7da487b0256a
summary: test that current bookmark isn't shown
Kevin Bullock <kbullock@ringworld.org>
parents:
18566
diff
changeset
|
599 branch: default |
22091
f72b71ba756b
unbundle: don't advance bookmarks (issue4322) (BC)
Matt Mackall <mpm@selenic.com>
parents:
21503
diff
changeset
|
600 bookmarks: *Z Y x y |
33213
0bec70c1df15
tests: make output lines conditional for testing with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32735
diff
changeset
|
601 commit: 1 added, 1 unknown (new branch head) (no-fsmonitor !) |
0bec70c1df15
tests: make output lines conditional for testing with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32735
diff
changeset
|
602 commit: 1 added, * unknown (new branch head) (glob) (fsmonitor !) |
18620
7da487b0256a
summary: test that current bookmark isn't shown
Kevin Bullock <kbullock@ringworld.org>
parents:
18566
diff
changeset
|
603 update: 2 new changesets (update) |
25382
6084926366b9
summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents:
25349
diff
changeset
|
604 phases: 5 draft |
13663
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
605 $ hg update |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
606 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
22091
f72b71ba756b
unbundle: don't advance bookmarks (issue4322) (BC)
Matt Mackall <mpm@selenic.com>
parents:
21503
diff
changeset
|
607 updating bookmark Z |
13663
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
608 $ hg bookmarks |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
609 X2 1:925d80f479bb |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
610 Y 2:db815d6d32e6 |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
611 * Z 3:125c9a1d6df6 |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
612 x y 2:db815d6d32e6 |
d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
David Soria Parra <dsp@php.net>
parents:
13604
diff
changeset
|
613 |
19523
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
614 pull --update works the same as pull && update |
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
615 |
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
616 $ hg bookmark -r3 Y |
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
617 moving bookmark 'Y' forward from db815d6d32e6 |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
30332
diff
changeset
|
618 $ cp -R ../cloned-bookmarks-update ../cloned-bookmarks-manual-update |
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
30332
diff
changeset
|
619 $ cp -R ../cloned-bookmarks-update ../cloned-bookmarks-manual-update-with-divergence |
26285
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
620 |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
621 (manual version) |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
622 |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
623 $ hg -R ../cloned-bookmarks-manual-update update Y |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
624 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
625 (activating bookmark Y) |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
626 $ hg -R ../cloned-bookmarks-manual-update pull . |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
627 pulling from . |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
628 searching for changes |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
629 adding changesets |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
630 adding manifests |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
631 adding file changes |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
632 added 2 changesets with 2 changes to 2 files (+1 heads) |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
633 updating bookmark Y |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
634 updating bookmark Z |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
635 (run 'hg heads' to see heads, 'hg merge' to merge) |
26286
4b685712fa45
bookmark: do not crash when active bookmark is forward and --date is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26285
diff
changeset
|
636 |
4b685712fa45
bookmark: do not crash when active bookmark is forward and --date is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26285
diff
changeset
|
637 (# tests strange but with --date crashing when bookmark have to move) |
4b685712fa45
bookmark: do not crash when active bookmark is forward and --date is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26285
diff
changeset
|
638 |
4b685712fa45
bookmark: do not crash when active bookmark is forward and --date is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26285
diff
changeset
|
639 $ hg -R ../cloned-bookmarks-manual-update update -d 1986 |
4b685712fa45
bookmark: do not crash when active bookmark is forward and --date is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26285
diff
changeset
|
640 abort: revision matching date not found |
4b685712fa45
bookmark: do not crash when active bookmark is forward and --date is used
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26285
diff
changeset
|
641 [255] |
26285
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
642 $ hg -R ../cloned-bookmarks-manual-update update |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
643 updating to active bookmark Y |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
644 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
645 |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
646 (all in one version) |
91cad8eb7951
bookmark: actually test update behavior in both cases
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25893
diff
changeset
|
647 |
25893
04ae6feb04c5
test-bookmarks.t: avoid nested repo
Siddharth Agarwal <sid0@fb.com>
parents:
25789
diff
changeset
|
648 $ hg -R ../cloned-bookmarks-update update Y |
19523
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
649 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
21503
10f15e34d86c
update: show message when a bookmark is activated by update
Stephen Lee <sphen.lee@gmail.com>
parents:
21404
diff
changeset
|
650 (activating bookmark Y) |
25893
04ae6feb04c5
test-bookmarks.t: avoid nested repo
Siddharth Agarwal <sid0@fb.com>
parents:
25789
diff
changeset
|
651 $ hg -R ../cloned-bookmarks-update pull --update . |
19523
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
652 pulling from . |
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
653 searching for changes |
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
654 adding changesets |
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
655 adding manifests |
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
656 adding file changes |
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
657 added 2 changesets with 2 changes to 2 files (+1 heads) |
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
658 updating bookmark Y |
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
659 updating bookmark Z |
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
660 updating to active bookmark Y |
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
661 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
662 |
28029
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
663 We warn about divergent during bare update to the active bookmark |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
664 |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
665 $ hg -R ../cloned-bookmarks-manual-update-with-divergence update Y |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
666 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
667 (activating bookmark Y) |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
668 $ hg -R ../cloned-bookmarks-manual-update-with-divergence bookmarks -r X2 Y@1 |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
669 $ hg -R ../cloned-bookmarks-manual-update-with-divergence bookmarks |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
670 X2 1:925d80f479bb |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
671 * Y 2:db815d6d32e6 |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
672 Y@1 1:925d80f479bb |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
673 Z 2:db815d6d32e6 |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
674 x y 2:db815d6d32e6 |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
675 $ hg -R ../cloned-bookmarks-manual-update-with-divergence pull |
31051
96eaefd350ae
tests: make directory to prevent test process from going out of $TESTTMP
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
30556
diff
changeset
|
676 pulling from $TESTTMP/repo (glob) |
28029
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
677 searching for changes |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
678 adding changesets |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
679 adding manifests |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
680 adding file changes |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
681 added 2 changesets with 2 changes to 2 files (+1 heads) |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
682 updating bookmark Y |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
683 updating bookmark Z |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
684 (run 'hg heads' to see heads, 'hg merge' to merge) |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
685 $ hg -R ../cloned-bookmarks-manual-update-with-divergence update |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
686 updating to active bookmark Y |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
687 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
688 1 other divergent bookmarks for "Y" |
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27948
diff
changeset
|
689 |
14845
677339529a53
bookmarks: more robust parsing of bookmarks file
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
14268
diff
changeset
|
690 test wrongly formated bookmark |
677339529a53
bookmarks: more robust parsing of bookmarks file
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
14268
diff
changeset
|
691 |
677339529a53
bookmarks: more robust parsing of bookmarks file
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
14268
diff
changeset
|
692 $ echo '' >> .hg/bookmarks |
677339529a53
bookmarks: more robust parsing of bookmarks file
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
14268
diff
changeset
|
693 $ hg bookmarks |
677339529a53
bookmarks: more robust parsing of bookmarks file
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
14268
diff
changeset
|
694 X2 1:925d80f479bb |
19523
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
695 Y 3:125c9a1d6df6 |
14845
677339529a53
bookmarks: more robust parsing of bookmarks file
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
14268
diff
changeset
|
696 * Z 3:125c9a1d6df6 |
677339529a53
bookmarks: more robust parsing of bookmarks file
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
14268
diff
changeset
|
697 x y 2:db815d6d32e6 |
14846
5097d8b5078c
bookmarks: add a warning for non empty malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
14845
diff
changeset
|
698 $ echo "Ican'thasformatedlines" >> .hg/bookmarks |
5097d8b5078c
bookmarks: add a warning for non empty malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
14845
diff
changeset
|
699 $ hg bookmarks |
5097d8b5078c
bookmarks: add a warning for non empty malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
14845
diff
changeset
|
700 malformed line in .hg/bookmarks: "Ican'thasformatedlines" |
5097d8b5078c
bookmarks: add a warning for non empty malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
14845
diff
changeset
|
701 X2 1:925d80f479bb |
19523
f37b5a17e6a0
bookmarks: pull --update updates to active bookmark if it moved (issue4007)
Kevin Bullock <kbullock@ringworld.org>
parents:
19147
diff
changeset
|
702 Y 3:125c9a1d6df6 |
14846
5097d8b5078c
bookmarks: add a warning for non empty malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
14845
diff
changeset
|
703 * Z 3:125c9a1d6df6 |
5097d8b5078c
bookmarks: add a warning for non empty malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
14845
diff
changeset
|
704 x y 2:db815d6d32e6 |
5097d8b5078c
bookmarks: add a warning for non empty malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
14845
diff
changeset
|
705 |
16573
5983de86462c
bookmarks: catch the proper exception for missing revisions
Matt Mackall <mpm@selenic.com>
parents:
16276
diff
changeset
|
706 test missing revisions |
5983de86462c
bookmarks: catch the proper exception for missing revisions
Matt Mackall <mpm@selenic.com>
parents:
16276
diff
changeset
|
707 |
32735
d7522f983f37
bookmarks: explicitly convert to 'node' during initialization
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
32482
diff
changeset
|
708 $ echo "925d80f479b925d80f479bc925d80f479bccabab z" > .hg/bookmarks |
16573
5983de86462c
bookmarks: catch the proper exception for missing revisions
Matt Mackall <mpm@selenic.com>
parents:
16276
diff
changeset
|
709 $ hg book |
5983de86462c
bookmarks: catch the proper exception for missing revisions
Matt Mackall <mpm@selenic.com>
parents:
16276
diff
changeset
|
710 no bookmarks set |
17264
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
711 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
712 test stripping a non-checked-out but bookmarked revision |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
713 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
19523
diff
changeset
|
714 $ hg log --graph |
17264
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
715 o changeset: 4:9ba5f110a0b3 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
716 | branch: test |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
717 | tag: tip |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
718 | parent: 2:db815d6d32e6 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
719 | user: test |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
720 | date: Thu Jan 01 00:00:00 1970 +0000 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
721 | summary: y |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
722 | |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
723 | @ changeset: 3:125c9a1d6df6 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
724 |/ user: test |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
725 | date: Thu Jan 01 00:00:00 1970 +0000 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
726 | summary: x |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
727 | |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
728 o changeset: 2:db815d6d32e6 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
729 | parent: 0:f7b1eb17ad24 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
730 | user: test |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
731 | date: Thu Jan 01 00:00:00 1970 +0000 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
732 | summary: 2 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
733 | |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
734 | o changeset: 1:925d80f479bb |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
735 |/ user: test |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
736 | date: Thu Jan 01 00:00:00 1970 +0000 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
737 | summary: 1 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
738 | |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
739 o changeset: 0:f7b1eb17ad24 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
740 user: test |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
741 date: Thu Jan 01 00:00:00 1970 +0000 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
742 summary: 0 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
743 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
744 $ hg book should-end-on-two |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
745 $ hg co --clean 4 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
746 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
21404
ca275f7ec576
update: when deactivating a bookmark, print a message
Siddharth Agarwal <sid0@fb.com>
parents:
20117
diff
changeset
|
747 (leaving bookmark should-end-on-two) |
17264
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
748 $ hg book four |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
749 $ hg --config extensions.mq= strip 3 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
750 saved backup bundle to * (glob) |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
751 should-end-on-two should end up pointing to revision 2, as that's the |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
752 tipmost surviving ancestor of the stripped revision. |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
19523
diff
changeset
|
753 $ hg log --graph |
17264
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
754 @ changeset: 3:9ba5f110a0b3 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
755 | branch: test |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
756 | bookmark: four |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
757 | tag: tip |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
758 | user: test |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
759 | date: Thu Jan 01 00:00:00 1970 +0000 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
760 | summary: y |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
761 | |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
762 o changeset: 2:db815d6d32e6 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
763 | bookmark: should-end-on-two |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
764 | parent: 0:f7b1eb17ad24 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
765 | user: test |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
766 | date: Thu Jan 01 00:00:00 1970 +0000 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
767 | summary: 2 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
768 | |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
769 | o changeset: 1:925d80f479bb |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
770 |/ user: test |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
771 | date: Thu Jan 01 00:00:00 1970 +0000 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
772 | summary: 1 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
773 | |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
774 o changeset: 0:f7b1eb17ad24 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
775 user: test |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
776 date: Thu Jan 01 00:00:00 1970 +0000 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
777 summary: 0 |
ec7b9bec19c9
strip: move bookmarks to nearest ancestor rather than '.'
Augie Fackler <raf@durin42.com>
parents:
16822
diff
changeset
|
778 |
19109
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
779 |
30332
318a24b52eeb
spelling: fixes of non-dictionary words
Mads Kiilerich <madski@unity3d.com>
parents:
28830
diff
changeset
|
780 no-op update doesn't deactivate bookmarks |
26676
71a485130beb
bookmarks: don't deactivate on no-op update (issue4901)
Matt Mackall <mpm@selenic.com>
parents:
26538
diff
changeset
|
781 |
33213
0bec70c1df15
tests: make output lines conditional for testing with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32735
diff
changeset
|
782 (it is known issue that fsmonitor can't handle nested repositories. In |
0bec70c1df15
tests: make output lines conditional for testing with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32735
diff
changeset
|
783 this test scenario, cloned-bookmark-default and tobundle exist in the |
0bec70c1df15
tests: make output lines conditional for testing with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32735
diff
changeset
|
784 working directory of current repository) |
0bec70c1df15
tests: make output lines conditional for testing with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32735
diff
changeset
|
785 |
28500
2e1bceeea520
update: omit redundant activating message for already active bookmark
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
786 $ hg bookmarks |
2e1bceeea520
update: omit redundant activating message for already active bookmark
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
787 * four 3:9ba5f110a0b3 |
2e1bceeea520
update: omit redundant activating message for already active bookmark
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
28065
diff
changeset
|
788 should-end-on-two 2:db815d6d32e6 |
28065
6b1fc09c699a
update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28029
diff
changeset
|
789 $ hg up four |
6b1fc09c699a
update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28029
diff
changeset
|
790 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
26676
71a485130beb
bookmarks: don't deactivate on no-op update (issue4901)
Matt Mackall <mpm@selenic.com>
parents:
26538
diff
changeset
|
791 $ hg up |
71a485130beb
bookmarks: don't deactivate on no-op update (issue4901)
Matt Mackall <mpm@selenic.com>
parents:
26538
diff
changeset
|
792 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
71a485130beb
bookmarks: don't deactivate on no-op update (issue4901)
Matt Mackall <mpm@selenic.com>
parents:
26538
diff
changeset
|
793 $ hg sum |
71a485130beb
bookmarks: don't deactivate on no-op update (issue4901)
Matt Mackall <mpm@selenic.com>
parents:
26538
diff
changeset
|
794 parent: 3:9ba5f110a0b3 tip |
71a485130beb
bookmarks: don't deactivate on no-op update (issue4901)
Matt Mackall <mpm@selenic.com>
parents:
26538
diff
changeset
|
795 y |
71a485130beb
bookmarks: don't deactivate on no-op update (issue4901)
Matt Mackall <mpm@selenic.com>
parents:
26538
diff
changeset
|
796 branch: test |
71a485130beb
bookmarks: don't deactivate on no-op update (issue4901)
Matt Mackall <mpm@selenic.com>
parents:
26538
diff
changeset
|
797 bookmarks: *four |
33213
0bec70c1df15
tests: make output lines conditional for testing with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32735
diff
changeset
|
798 commit: 2 unknown (clean) (no-fsmonitor !) |
0bec70c1df15
tests: make output lines conditional for testing with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
32735
diff
changeset
|
799 commit: * unknown (clean) (glob) (fsmonitor !) |
26676
71a485130beb
bookmarks: don't deactivate on no-op update (issue4901)
Matt Mackall <mpm@selenic.com>
parents:
26538
diff
changeset
|
800 update: (current) |
71a485130beb
bookmarks: don't deactivate on no-op update (issue4901)
Matt Mackall <mpm@selenic.com>
parents:
26538
diff
changeset
|
801 phases: 4 draft |
71a485130beb
bookmarks: don't deactivate on no-op update (issue4901)
Matt Mackall <mpm@selenic.com>
parents:
26538
diff
changeset
|
802 |
19109
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
803 test clearing divergent bookmarks of linear ancestors |
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
804 |
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
805 $ hg bookmark Z -r 0 |
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
806 $ hg bookmark Z@1 -r 1 |
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
807 $ hg bookmark Z@2 -r 2 |
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
808 $ hg bookmark Z@3 -r 3 |
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
809 $ hg book |
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
810 Z 0:f7b1eb17ad24 |
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
811 Z@1 1:925d80f479bb |
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
812 Z@2 2:db815d6d32e6 |
19112
23f785b38af3
bookmarks: fix bug that activated a bookmark even with -r passed
Sean Farley <sean.michael.farley@gmail.com>
parents:
19111
diff
changeset
|
813 Z@3 3:9ba5f110a0b3 |
23f785b38af3
bookmarks: fix bug that activated a bookmark even with -r passed
Sean Farley <sean.michael.farley@gmail.com>
parents:
19111
diff
changeset
|
814 * four 3:9ba5f110a0b3 |
19109
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
815 should-end-on-two 2:db815d6d32e6 |
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
816 $ hg bookmark Z |
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
817 moving bookmark 'Z' forward from f7b1eb17ad24 |
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
818 $ hg book |
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
819 * Z 3:9ba5f110a0b3 |
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
820 Z@1 1:925d80f479bb |
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
821 four 3:9ba5f110a0b3 |
26c51e87e807
bookmarks: resolve divergent bookmarks when fowarding bookmark to descendant
Sean Farley <sean.michael.farley@gmail.com>
parents:
19070
diff
changeset
|
822 should-end-on-two 2:db815d6d32e6 |
19111
6439d78e14fb
bookmarks: resolve divergent bookmark when moving across a branch
Sean Farley <sean.michael.farley@gmail.com>
parents:
19109
diff
changeset
|
823 |
6439d78e14fb
bookmarks: resolve divergent bookmark when moving across a branch
Sean Farley <sean.michael.farley@gmail.com>
parents:
19109
diff
changeset
|
824 test clearing only a single divergent bookmark across branches |
6439d78e14fb
bookmarks: resolve divergent bookmark when moving across a branch
Sean Farley <sean.michael.farley@gmail.com>
parents:
19109
diff
changeset
|
825 |
6439d78e14fb
bookmarks: resolve divergent bookmark when moving across a branch
Sean Farley <sean.michael.farley@gmail.com>
parents:
19109
diff
changeset
|
826 $ hg book foo -r 1 |
6439d78e14fb
bookmarks: resolve divergent bookmark when moving across a branch
Sean Farley <sean.michael.farley@gmail.com>
parents:
19109
diff
changeset
|
827 $ hg book foo@1 -r 0 |
6439d78e14fb
bookmarks: resolve divergent bookmark when moving across a branch
Sean Farley <sean.michael.farley@gmail.com>
parents:
19109
diff
changeset
|
828 $ hg book foo@2 -r 2 |
6439d78e14fb
bookmarks: resolve divergent bookmark when moving across a branch
Sean Farley <sean.michael.farley@gmail.com>
parents:
19109
diff
changeset
|
829 $ hg book foo@3 -r 3 |
6439d78e14fb
bookmarks: resolve divergent bookmark when moving across a branch
Sean Farley <sean.michael.farley@gmail.com>
parents:
19109
diff
changeset
|
830 $ hg book foo -r foo@3 |
6439d78e14fb
bookmarks: resolve divergent bookmark when moving across a branch
Sean Farley <sean.michael.farley@gmail.com>
parents:
19109
diff
changeset
|
831 $ hg book |
19112
23f785b38af3
bookmarks: fix bug that activated a bookmark even with -r passed
Sean Farley <sean.michael.farley@gmail.com>
parents:
19111
diff
changeset
|
832 * Z 3:9ba5f110a0b3 |
19111
6439d78e14fb
bookmarks: resolve divergent bookmark when moving across a branch
Sean Farley <sean.michael.farley@gmail.com>
parents:
19109
diff
changeset
|
833 Z@1 1:925d80f479bb |
19112
23f785b38af3
bookmarks: fix bug that activated a bookmark even with -r passed
Sean Farley <sean.michael.farley@gmail.com>
parents:
19111
diff
changeset
|
834 foo 3:9ba5f110a0b3 |
19111
6439d78e14fb
bookmarks: resolve divergent bookmark when moving across a branch
Sean Farley <sean.michael.farley@gmail.com>
parents:
19109
diff
changeset
|
835 foo@1 0:f7b1eb17ad24 |
6439d78e14fb
bookmarks: resolve divergent bookmark when moving across a branch
Sean Farley <sean.michael.farley@gmail.com>
parents:
19109
diff
changeset
|
836 foo@2 2:db815d6d32e6 |
6439d78e14fb
bookmarks: resolve divergent bookmark when moving across a branch
Sean Farley <sean.michael.farley@gmail.com>
parents:
19109
diff
changeset
|
837 four 3:9ba5f110a0b3 |
6439d78e14fb
bookmarks: resolve divergent bookmark when moving across a branch
Sean Farley <sean.michael.farley@gmail.com>
parents:
19109
diff
changeset
|
838 should-end-on-two 2:db815d6d32e6 |
27948
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
839 |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
840 pull --update works the same as pull && update (case #2) |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
841 |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
842 It is assumed that "hg pull" itself doesn't update current active |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
843 bookmark ('Y' in tests below). |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
844 |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
845 $ hg pull -q ../cloned-bookmarks-update |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
846 divergent bookmark Z stored as Z@2 |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
847 |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
848 (pulling revision on another named branch with --update updates |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
849 neither the working directory nor current active bookmark: "no-op" |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
850 case) |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
851 |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
852 $ echo yy >> y |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
853 $ hg commit -m yy |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
854 |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
855 $ hg -R ../cloned-bookmarks-update bookmarks | grep ' Y ' |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
856 * Y 3:125c9a1d6df6 |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
857 $ hg -R ../cloned-bookmarks-update pull . --update |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
858 pulling from . |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
859 searching for changes |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
860 adding changesets |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
861 adding manifests |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
862 adding file changes |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
863 added 1 changesets with 1 changes to 1 files |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
864 divergent bookmark Z stored as Z@default |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
865 adding remote bookmark foo |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
866 adding remote bookmark four |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
867 adding remote bookmark should-end-on-two |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
868 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
869 $ hg -R ../cloned-bookmarks-update parents -T "{rev}:{node|short}\n" |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
870 3:125c9a1d6df6 |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
871 $ hg -R ../cloned-bookmarks-update bookmarks | grep ' Y ' |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
872 * Y 3:125c9a1d6df6 |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
873 |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
874 (pulling revision on current named/topological branch with --update |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
875 updates the working directory and current active bookmark) |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
876 |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
877 $ hg update -C -q 125c9a1d6df6 |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
878 $ echo xx >> x |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
879 $ hg commit -m xx |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
880 |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
881 $ hg -R ../cloned-bookmarks-update bookmarks | grep ' Y ' |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
882 * Y 3:125c9a1d6df6 |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
883 $ hg -R ../cloned-bookmarks-update pull . --update |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
884 pulling from . |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
885 searching for changes |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
886 adding changesets |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
887 adding manifests |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
888 adding file changes |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
889 added 1 changesets with 1 changes to 1 files |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
890 divergent bookmark Z stored as Z@default |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
891 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
892 updating bookmark Y |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
893 $ hg -R ../cloned-bookmarks-update parents -T "{rev}:{node|short}\n" |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
894 6:81dcce76aa0b |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
895 $ hg -R ../cloned-bookmarks-update bookmarks | grep ' Y ' |
7cb7264cfd52
commands: advance current active bookmark at pull --update correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26676
diff
changeset
|
896 * Y 6:81dcce76aa0b |
28830
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
897 |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
898 $ cd .. |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
899 |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
900 ensure changelog is written before bookmarks |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
901 $ hg init orderrepo |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
902 $ cd orderrepo |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
903 $ touch a |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
904 $ hg commit -Aqm one |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
905 $ hg book mybook |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
906 $ echo a > a |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
907 |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
908 $ cat > $TESTTMP/pausefinalize.py <<EOF |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
909 > from mercurial import extensions, localrepo |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
910 > import os, time |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
911 > def transaction(orig, self, desc, report=None): |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
912 > tr = orig(self, desc, report) |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
913 > def sleep(*args, **kwargs): |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
914 > retry = 20 |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
915 > while retry > 0 and not os.path.exists("$TESTTMP/unpause"): |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
916 > retry -= 1 |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
917 > time.sleep(0.5) |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
918 > if os.path.exists("$TESTTMP/unpause"): |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
919 > os.remove("$TESTTMP/unpause") |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
920 > # It is important that this finalizer start with 'a', so it runs before |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
921 > # the changelog finalizer appends to the changelog. |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
922 > tr.addfinalize('a-sleep', sleep) |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
923 > return tr |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
924 > |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
925 > def extsetup(ui): |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
926 > # This extension inserts an artifical pause during the transaction |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
927 > # finalizer, so we can run commands mid-transaction-close. |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
928 > extensions.wrapfunction(localrepo.localrepository, 'transaction', |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
929 > transaction) |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
930 > EOF |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
931 $ hg commit -qm two --config extensions.pausefinalize=$TESTTMP/pausefinalize.py & |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
932 $ sleep 2 |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
933 $ hg log -r . |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
934 changeset: 0:867bc5792c8c |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
935 bookmark: mybook |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
936 tag: tip |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
937 user: test |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
938 date: Thu Jan 01 00:00:00 1970 +0000 |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
939 summary: one |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
940 |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
941 $ hg bookmarks |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
942 * mybook 0:867bc5792c8c |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
943 $ touch $TESTTMP/unpause |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
944 |
a5009789960c
transaction: allow running file generators after finalizers
Durham Goode <durham@fb.com>
parents:
28500
diff
changeset
|
945 $ cd .. |
31052
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
946 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
947 check whether HG_PENDING makes pending changes only in related |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
948 repositories visible to an external hook. |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
949 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
950 (emulate a transaction running concurrently by copied |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
951 .hg/bookmarks.pending in subsequent test) |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
952 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
953 $ cat > $TESTTMP/savepending.sh <<EOF |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
954 > cp .hg/bookmarks.pending .hg/bookmarks.pending.saved |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
955 > exit 1 # to avoid adding new bookmark for subsequent tests |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
956 > EOF |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
957 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
958 $ hg init unrelated |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
959 $ cd unrelated |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
960 $ echo a > a |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
961 $ hg add a |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
962 $ hg commit -m '#0' |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
963 $ hg --config hooks.pretxnclose="sh $TESTTMP/savepending.sh" bookmarks INVISIBLE |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
964 transaction abort! |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
965 rollback completed |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
966 abort: pretxnclose hook exited with status 1 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
967 [255] |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
968 $ cp .hg/bookmarks.pending.saved .hg/bookmarks.pending |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
969 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
970 (check visible bookmarks while transaction running in repo) |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
971 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
972 $ cat > $TESTTMP/checkpending.sh <<EOF |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
973 > echo "@repo" |
31767
6c800688afe1
tests: quote paths in shell script hooks
Matt Harbison <matt_harbison@yahoo.com>
parents:
31052
diff
changeset
|
974 > hg -R "$TESTTMP/repo" bookmarks |
31052
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
975 > echo "@unrelated" |
31767
6c800688afe1
tests: quote paths in shell script hooks
Matt Harbison <matt_harbison@yahoo.com>
parents:
31052
diff
changeset
|
976 > hg -R "$TESTTMP/unrelated" bookmarks |
31052
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
977 > exit 1 # to avoid adding new bookmark for subsequent tests |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
978 > EOF |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
979 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
980 $ cd ../repo |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
981 $ hg --config hooks.pretxnclose="sh $TESTTMP/checkpending.sh" bookmarks NEW |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
982 @repo |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
983 * NEW 6:81dcce76aa0b |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
984 X2 1:925d80f479bb |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
985 Y 4:125c9a1d6df6 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
986 Z 5:5fb12f0f2d51 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
987 Z@1 1:925d80f479bb |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
988 Z@2 4:125c9a1d6df6 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
989 foo 3:9ba5f110a0b3 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
990 foo@1 0:f7b1eb17ad24 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
991 foo@2 2:db815d6d32e6 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
992 four 3:9ba5f110a0b3 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
993 should-end-on-two 2:db815d6d32e6 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
994 x y 2:db815d6d32e6 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
995 @unrelated |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
996 no bookmarks set |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
997 transaction abort! |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
998 rollback completed |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
999 abort: pretxnclose hook exited with status 1 |
0332b8fafd05
bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31051
diff
changeset
|
1000 [255] |