Mercurial > hg
annotate tests/test-bookmarks-rebase.t @ 51135:88ef80210d67
cleanup: drop `dirstate.is_changing_parent` deprecated since 6.5
This was scheduled for removal, let us remove it.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 08 Nov 2023 22:10:26 +0100 |
parents | 55c6ebd11cb9 |
children |
rev | line source |
---|---|
11863
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
1 $ echo "[extensions]" >> $HGRCPATH |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
2 $ echo "rebase=" >> $HGRCPATH |
11198
b345b1cc124f
rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents:
8168
diff
changeset
|
3 |
11863
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
4 initialize repository |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
5 |
49621
55c6ebd11cb9
tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
45826
diff
changeset
|
6 $ hg init repo |
55c6ebd11cb9
tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
45826
diff
changeset
|
7 $ cd repo |
11863
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
8 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
9 $ echo 'a' > a |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
10 $ hg ci -A -m "0" |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
11 adding a |
7317
98408cb74137
bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff
changeset
|
12 |
11863
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
13 $ echo 'b' > b |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
14 $ hg ci -A -m "1" |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
15 adding b |
7317
98408cb74137
bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff
changeset
|
16 |
11863
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
17 $ hg up 0 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
18 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
19 $ echo 'c' > c |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
20 $ hg ci -A -m "2" |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
21 adding c |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
22 created new head |
7317
98408cb74137
bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff
changeset
|
23 |
11863
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
24 $ echo 'd' > d |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
25 $ hg ci -A -m "3" |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
26 adding d |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
27 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
28 $ hg bookmark -r 1 one |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
29 $ hg bookmark -r 3 two |
19112
23f785b38af3
bookmarks: fix bug that activated a bookmark even with -r passed
Sean Farley <sean.michael.farley@gmail.com>
parents:
17005
diff
changeset
|
30 $ hg up -q two |
11863
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
31 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
32 bookmark list |
7317
98408cb74137
bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff
changeset
|
33 |
11863
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
34 $ hg bookmark |
13388
a184dbd9b2c5
localrepo: sort hg bookmark output
David Soria Parra <dsp@php.net>
parents:
13386
diff
changeset
|
35 one 1:925d80f479bb |
11863
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
36 * two 3:2ae46b1d99a7 |
7317
98408cb74137
bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff
changeset
|
37 |
11863
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
38 rebase |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
39 |
11907
863567a1364f
tests: use regular expressions instead of helpers
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11863
diff
changeset
|
40 $ hg rebase -s two -d one |
45796
e9555305c5c6
templates: include all non-branch namespaces in default one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents:
45771
diff
changeset
|
41 rebasing 3:2ae46b1d99a7 two tip "3" |
49621
55c6ebd11cb9
tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
45826
diff
changeset
|
42 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/2ae46b1d99a7-e6b057bc-rebase.hg |
7317
98408cb74137
bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff
changeset
|
43 |
11863
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
44 $ hg log |
17005
50f434510da6
rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
13469
diff
changeset
|
45 changeset: 3:42e5ed2cdcf4 |
13386
f78bc5ddbe4f
templater: add bookmarks to templates and default output
David Soria Parra <dsp@php.net>
parents:
13385
diff
changeset
|
46 bookmark: two |
11863
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
47 tag: tip |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
48 parent: 1:925d80f479bb |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
49 user: test |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
50 date: Thu Jan 01 00:00:00 1970 +0000 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
51 summary: 3 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
52 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
53 changeset: 2:db815d6d32e6 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
54 parent: 0:f7b1eb17ad24 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
55 user: test |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
56 date: Thu Jan 01 00:00:00 1970 +0000 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
57 summary: 2 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
58 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
59 changeset: 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
|
60 bookmark: one |
11863
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
61 user: test |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
62 date: Thu Jan 01 00:00:00 1970 +0000 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
63 summary: 1 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
64 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
65 changeset: 0:f7b1eb17ad24 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
66 user: test |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
67 date: Thu Jan 01 00:00:00 1970 +0000 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
68 summary: 0 |
86ec95b1d37b
tests: unify test-bookmarks-rebase
Martin Geisler <mg@lazybytes.net>
parents:
11208
diff
changeset
|
69 |
24758
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
70 aborted rebase should restore active bookmark. |
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
71 |
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
72 $ hg up 1 |
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
73 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
74 (leaving bookmark two) |
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
75 $ echo 'e' > d |
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
76 $ hg ci -A -m "4" |
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
77 adding d |
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
78 created new head |
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
79 $ hg bookmark three |
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
80 $ hg rebase -s three -d two |
45796
e9555305c5c6
templates: include all non-branch namespaces in default one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents:
45771
diff
changeset
|
81 rebasing 4:dd7c838e8362 three tip "4" |
24758
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
82 merging d |
26614
ef1eb6df7071
simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents:
25101
diff
changeset
|
83 warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
45150
dc5e5577af39
error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents:
35393
diff
changeset
|
84 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
45826
21733e8c924f
errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents:
45796
diff
changeset
|
85 [240] |
24758
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
86 $ hg rebase --abort |
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
87 rebase aborted |
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
88 $ hg bookmark |
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
89 one 1:925d80f479bb |
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
90 * three 4:dd7c838e8362 |
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
91 two 3:42e5ed2cdcf4 |
d7451adc72f6
rebase: restore bookmark state on abort
Tony Tung <tonytung@fb.com>
parents:
23835
diff
changeset
|
92 |
25101
91c2278c68a3
rebase: check that the bookmark is still valid when restoring (issue4669)
Tony Tung <tonytung@fb.com>
parents:
24758
diff
changeset
|
93 after aborted rebase, restoring a bookmark that has been removed should not fail |
91c2278c68a3
rebase: check that the bookmark is still valid when restoring (issue4669)
Tony Tung <tonytung@fb.com>
parents:
24758
diff
changeset
|
94 |
91c2278c68a3
rebase: check that the bookmark is still valid when restoring (issue4669)
Tony Tung <tonytung@fb.com>
parents:
24758
diff
changeset
|
95 $ hg rebase -s three -d two |
45796
e9555305c5c6
templates: include all non-branch namespaces in default one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents:
45771
diff
changeset
|
96 rebasing 4:dd7c838e8362 three tip "4" |
25101
91c2278c68a3
rebase: check that the bookmark is still valid when restoring (issue4669)
Tony Tung <tonytung@fb.com>
parents:
24758
diff
changeset
|
97 merging d |
26614
ef1eb6df7071
simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents:
25101
diff
changeset
|
98 warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
45150
dc5e5577af39
error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents:
35393
diff
changeset
|
99 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
45826
21733e8c924f
errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents:
45796
diff
changeset
|
100 [240] |
25101
91c2278c68a3
rebase: check that the bookmark is still valid when restoring (issue4669)
Tony Tung <tonytung@fb.com>
parents:
24758
diff
changeset
|
101 $ hg bookmark -d three |
91c2278c68a3
rebase: check that the bookmark is still valid when restoring (issue4669)
Tony Tung <tonytung@fb.com>
parents:
24758
diff
changeset
|
102 $ hg rebase --abort |
91c2278c68a3
rebase: check that the bookmark is still valid when restoring (issue4669)
Tony Tung <tonytung@fb.com>
parents:
24758
diff
changeset
|
103 rebase aborted |
91c2278c68a3
rebase: check that the bookmark is still valid when restoring (issue4669)
Tony Tung <tonytung@fb.com>
parents:
24758
diff
changeset
|
104 $ hg bookmark |
91c2278c68a3
rebase: check that the bookmark is still valid when restoring (issue4669)
Tony Tung <tonytung@fb.com>
parents:
24758
diff
changeset
|
105 one 1:925d80f479bb |
91c2278c68a3
rebase: check that the bookmark is still valid when restoring (issue4669)
Tony Tung <tonytung@fb.com>
parents:
24758
diff
changeset
|
106 two 3:42e5ed2cdcf4 |