Mercurial > hg
annotate tests/test-merge-default.t @ 50329:3dbc7b1ecaba stable
typing: correct the signature of error.CommandError
There's a place in `mercurial.dispatch._parse()` that passes None if a parse
error happens before the command can be parsed out, and casting the error to
bytes works fine because the command and message fields are apparently ignored.
Likewise, TortoiseHg similarly passes None for the same reason.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 24 Mar 2023 02:22:12 -0400 |
parents | 55c6ebd11cb9 |
children |
rev | line source |
---|---|
49621
55c6ebd11cb9
tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
45827
diff
changeset
|
1 $ hg init repo |
55c6ebd11cb9
tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
45827
diff
changeset
|
2 $ cd repo |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
3 $ echo a > a |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
4 $ hg commit -A -ma |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
5 adding a |
2915
013921c753bd
merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
6 |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
7 $ echo b >> a |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
8 $ hg commit -mb |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
9 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
10 $ echo c >> a |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
11 $ hg commit -mc |
2915
013921c753bd
merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
12 |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
13 $ hg up 1 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
14 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
15 $ echo d >> a |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
16 $ hg commit -md |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
17 created new head |
2915
013921c753bd
merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
18 |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
19 $ hg up 1 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
20 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
21 $ echo e >> a |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
22 $ hg commit -me |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
23 created new head |
2915
013921c753bd
merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
24 |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
25 $ hg up 1 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
26 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
27 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
28 Should fail because not at a head: |
2915
013921c753bd
merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
29 |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
30 $ hg merge |
28103
7d852bb47b0a
merge: give priority to "not at head" failures for bare 'hg merge'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28029
diff
changeset
|
31 abort: working directory not at a head revision |
7d852bb47b0a
merge: give priority to "not at head" failures for bare 'hg merge'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28029
diff
changeset
|
32 (use 'hg update' or merge with an explicit revision) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12255
diff
changeset
|
33 [255] |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
34 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
35 $ hg up |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
36 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
32698
1b5c61d38a52
update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
28139
diff
changeset
|
37 updated to "f25cbe84d8b3: e" |
28029
72072cfc7e91
update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26716
diff
changeset
|
38 2 other heads for branch "default" |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
39 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
40 Should fail because > 2 heads: |
2915
013921c753bd
merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
41 |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
42 $ HGMERGE=internal:other; export HGMERGE |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
43 $ hg merge |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
44 abort: branch 'default' has 3 heads - please merge with an explicit rev |
43114
8197b395710e
destutil: provide hint on rebase+merge for how to specify destination/rev
Kyle Lippincott <spectral@google.com>
parents:
39626
diff
changeset
|
45 (run 'hg heads .' to see heads, specify rev with -r) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12255
diff
changeset
|
46 [255] |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
47 |
43873
8caec25f5d8f
merge: add commands.merge.require-rev to require an argument to hg merge
Kyle Lippincott <spectral@google.com>
parents:
43114
diff
changeset
|
48 Should succeed (we're specifying commands.merge.require-rev=True just to test |
8caec25f5d8f
merge: add commands.merge.require-rev to require an argument to hg merge
Kyle Lippincott <spectral@google.com>
parents:
43114
diff
changeset
|
49 that it allows merge to succeed if we specify a revision): |
2915
013921c753bd
merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
50 |
43873
8caec25f5d8f
merge: add commands.merge.require-rev to require an argument to hg merge
Kyle Lippincott <spectral@google.com>
parents:
43114
diff
changeset
|
51 $ hg merge 2 --config commands.merge.require-rev=True |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
52 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
53 (branch merge, don't forget to commit) |
33051
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
54 $ hg id -Tjson |
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
55 [ |
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
56 { |
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
57 "bookmarks": [], |
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
58 "branch": "default", |
33054
a49ab7f5e7e7
identify: rename 'changed' keyword -> 'dirty'
Matt Harbison <matt_harbison@yahoo.com>
parents:
33051
diff
changeset
|
59 "dirty": "+", |
39625
10c5eacd793f
identify: use fm.hexfunc thoroughly
Yuya Nishihara <yuya@tcha.org>
parents:
33089
diff
changeset
|
60 "id": "f25cbe84d8b320e298e7703f18a25a3959518c23+2d95304fed5d89bc9d70b2a0d02f0d567469c3ab+", |
33051
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
61 "node": "ffffffffffffffffffffffffffffffffffffffff", |
39626
6ecfd12f09cd
identify: change {parents} to a list of nodes (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
39625
diff
changeset
|
62 "parents": ["f25cbe84d8b320e298e7703f18a25a3959518c23", "2d95304fed5d89bc9d70b2a0d02f0d567469c3ab"], |
33051
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
63 "tags": ["tip"] |
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
64 } |
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
65 ] |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
66 $ hg commit -mm1 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
67 |
43873
8caec25f5d8f
merge: add commands.merge.require-rev to require an argument to hg merge
Kyle Lippincott <spectral@google.com>
parents:
43114
diff
changeset
|
68 Should fail because we didn't specify a revision (even though it would have |
8caec25f5d8f
merge: add commands.merge.require-rev to require an argument to hg merge
Kyle Lippincott <spectral@google.com>
parents:
43114
diff
changeset
|
69 succeeded without this): |
8caec25f5d8f
merge: add commands.merge.require-rev to require an argument to hg merge
Kyle Lippincott <spectral@google.com>
parents:
43114
diff
changeset
|
70 |
8caec25f5d8f
merge: add commands.merge.require-rev to require an argument to hg merge
Kyle Lippincott <spectral@google.com>
parents:
43114
diff
changeset
|
71 $ hg merge --config commands.merge.require-rev=True |
8caec25f5d8f
merge: add commands.merge.require-rev to require an argument to hg merge
Kyle Lippincott <spectral@google.com>
parents:
43114
diff
changeset
|
72 abort: configuration requires specifying revision to merge with |
45827
8d72e29ad1e0
errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
43873
diff
changeset
|
73 [10] |
43873
8caec25f5d8f
merge: add commands.merge.require-rev to require an argument to hg merge
Kyle Lippincott <spectral@google.com>
parents:
43114
diff
changeset
|
74 |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
75 Should succeed - 2 heads: |
2915
013921c753bd
merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
76 |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
77 $ hg merge -P |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
78 changeset: 3:ea9ff125ff88 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
79 parent: 1:1846eede8b68 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
80 user: test |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
81 date: Thu Jan 01 00:00:00 1970 +0000 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
82 summary: d |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
83 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
84 $ hg merge |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
85 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
86 (branch merge, don't forget to commit) |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
87 $ hg commit -mm2 |
2915
013921c753bd
merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
88 |
33051
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
89 $ hg id -r 1 -Tjson |
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
90 [ |
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
91 { |
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
92 "bookmarks": [], |
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
93 "branch": "default", |
39625
10c5eacd793f
identify: use fm.hexfunc thoroughly
Yuya Nishihara <yuya@tcha.org>
parents:
33089
diff
changeset
|
94 "id": "1846eede8b6886d8cc8a88c96a687b7fe8f3b9d1", |
33051
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
95 "node": "1846eede8b6886d8cc8a88c96a687b7fe8f3b9d1", |
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
96 "tags": [] |
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
97 } |
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
98 ] |
15a79ac823e8
identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents:
32698
diff
changeset
|
99 |
43873
8caec25f5d8f
merge: add commands.merge.require-rev to require an argument to hg merge
Kyle Lippincott <spectral@google.com>
parents:
43114
diff
changeset
|
100 Should fail because we didn't specify a revision (even though it would have |
8caec25f5d8f
merge: add commands.merge.require-rev to require an argument to hg merge
Kyle Lippincott <spectral@google.com>
parents:
43114
diff
changeset
|
101 failed without this due to being on tip, but this check comes first): |
8caec25f5d8f
merge: add commands.merge.require-rev to require an argument to hg merge
Kyle Lippincott <spectral@google.com>
parents:
43114
diff
changeset
|
102 |
8caec25f5d8f
merge: add commands.merge.require-rev to require an argument to hg merge
Kyle Lippincott <spectral@google.com>
parents:
43114
diff
changeset
|
103 $ hg merge --config commands.merge.require-rev=True |
8caec25f5d8f
merge: add commands.merge.require-rev to require an argument to hg merge
Kyle Lippincott <spectral@google.com>
parents:
43114
diff
changeset
|
104 abort: configuration requires specifying revision to merge with |
45827
8d72e29ad1e0
errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
43873
diff
changeset
|
105 [10] |
43873
8caec25f5d8f
merge: add commands.merge.require-rev to require an argument to hg merge
Kyle Lippincott <spectral@google.com>
parents:
43114
diff
changeset
|
106 |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
107 Should fail because at tip: |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
108 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
109 $ hg merge |
15619
6c8573dd1b6b
merge: make 'nothing to merge' aborts consistent
Kevin Bullock <kbullock@ringworld.org>
parents:
12316
diff
changeset
|
110 abort: nothing to merge |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12255
diff
changeset
|
111 [255] |
2915
013921c753bd
merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
112 |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
113 $ hg up 0 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
114 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
5242
9cd6578750b9
improve error message for 'hg merge' when repo already at branchtip
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
2915
diff
changeset
|
115 |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
116 Should fail because there is only one head: |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
117 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
118 $ hg merge |
15619
6c8573dd1b6b
merge: make 'nothing to merge' aborts consistent
Kevin Bullock <kbullock@ringworld.org>
parents:
12316
diff
changeset
|
119 abort: nothing to merge |
6c8573dd1b6b
merge: make 'nothing to merge' aborts consistent
Kevin Bullock <kbullock@ringworld.org>
parents:
12316
diff
changeset
|
120 (use 'hg update' instead) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12255
diff
changeset
|
121 [255] |
2915
013921c753bd
merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
122 |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
123 $ hg up 3 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
124 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
125 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
126 $ echo f >> a |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
127 $ hg branch foobranch |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
128 marked working directory as branch foobranch |
15615 | 129 (branches are permanent and global, did you want a bookmark?) |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
130 $ hg commit -mf |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
131 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
132 Should fail because merge with other branch: |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
133 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
134 $ hg merge |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
135 abort: branch 'foobranch' has one head - please merge with an explicit rev |
43114
8197b395710e
destutil: provide hint on rebase+merge for how to specify destination/rev
Kyle Lippincott <spectral@google.com>
parents:
39626
diff
changeset
|
136 (run 'hg heads' to see all heads, specify rev with -r) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12255
diff
changeset
|
137 [255] |
10355
a5576908b589
merge: add hints about the use of 'hg heads' to find the rev to merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8834
diff
changeset
|
138 |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
139 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
140 Test for issue2043: ensure that 'merge -P' shows ancestors of 6 that |
22389
94f77624dbb5
comments: describe ancestor consistently - avoid 'least common ancestor'
Mads Kiilerich <madski@unity3d.com>
parents:
15623
diff
changeset
|
141 are not ancestors of 7, regardless of where their common ancestors are. |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
142 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
143 Merge preview not affected by common ancestor: |
10505
b3311e26f94f
merge: fix --preview to show all nodes that will be merged (issue2043).
Greg Ward <greg-hg@gerg.ca>
parents:
10504
diff
changeset
|
144 |
12255
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
145 $ hg up -q 7 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
146 $ hg merge -q -P 6 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
147 2:2d95304fed5d |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
148 4:f25cbe84d8b3 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
149 5:a431fabd6039 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
150 6:e88e33f3bf62 |
9b3c02c36d92
tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents:
10658
diff
changeset
|
151 |
26716
c027641f8a83
revset: rename and test '_destmerge'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22389
diff
changeset
|
152 Test experimental destination revset |
c027641f8a83
revset: rename and test '_destmerge'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22389
diff
changeset
|
153 |
c027641f8a83
revset: rename and test '_destmerge'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22389
diff
changeset
|
154 $ hg log -r '_destmerge()' |
c027641f8a83
revset: rename and test '_destmerge'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22389
diff
changeset
|
155 abort: branch 'foobranch' has one head - please merge with an explicit rev |
43114
8197b395710e
destutil: provide hint on rebase+merge for how to specify destination/rev
Kyle Lippincott <spectral@google.com>
parents:
39626
diff
changeset
|
156 (run 'hg heads' to see all heads, specify rev with -r) |
26716
c027641f8a83
revset: rename and test '_destmerge'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22389
diff
changeset
|
157 [255] |
c027641f8a83
revset: rename and test '_destmerge'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22389
diff
changeset
|
158 |
28139
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
159 (on a branch with a two heads) |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
160 |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
161 $ hg up 5 |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
162 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
163 $ echo f >> a |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
164 $ hg commit -mf |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
165 created new head |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
166 $ hg log -r '_destmerge()' |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
167 changeset: 6:e88e33f3bf62 |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
168 parent: 5:a431fabd6039 |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
169 parent: 3:ea9ff125ff88 |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
170 user: test |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
171 date: Thu Jan 01 00:00:00 1970 +0000 |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
172 summary: m2 |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
173 |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
174 |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
175 (from the other head) |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
176 |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
177 $ hg log -r '_destmerge(e88e33f3bf62)' |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
178 changeset: 8:b613918999e2 |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
179 tag: tip |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
180 parent: 5:a431fabd6039 |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
181 user: test |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
182 date: Thu Jan 01 00:00:00 1970 +0000 |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
183 summary: f |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
184 |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
185 |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
186 (from unrelated branch) |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
187 |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
188 $ hg log -r '_destmerge(foobranch)' |
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
189 abort: branch 'foobranch' has one head - please merge with an explicit rev |
43114
8197b395710e
destutil: provide hint on rebase+merge for how to specify destination/rev
Kyle Lippincott <spectral@google.com>
parents:
39626
diff
changeset
|
190 (run 'hg heads' to see all heads, specify rev with -r) |
28139
5476a7a039c0
destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
28103
diff
changeset
|
191 [255] |