annotate tests/test-merge-halt.t @ 51977:42a116f1cdc1

branchmap-v3: introduce a "stop_rev" argument to `headsrevs` The `headsrevs` method of the revlog already have a `revs` argument to compute the headrevs of a limited set of heads. However, it disable the use of the native compiled code to compute the heads, which slows down the branchmap v3 code a lot. The branchmap v3 usage is actually quite constrained as we will always only ignores a part at the top of the graph. So we could be significantly faster. We start by making small change to the python side to improve the situation and introduce the new API. More collaboration with the native code are coming later. This massively speedup operation and close most of the remaining gaps between branchmap-v3 and branchmap-v2. especially on repository with many revs like mozilla-try. A small overhead remains mostly because the `headrevs` logic currently has some inefficiently. We will look into them from there. ### benchmark.name = hg.command.unbundle # bin-env-vars.hg.py-re2-module = default # benchmark.variants.issue6528 = disabled # benchmark.variants.resource-usage = default # benchmark.variants.reuse-external-delta-parent = yes # benchmark.variants.revs = any-1-extra-rev # benchmark.variants.source = unbundle # benchmark.variants.validate = default # benchmark.variants.verbosity = quiet ## data-env-vars.name = netbeans-2018-08-01-zstd-sparse-revlog # bin-env-vars.hg.flavor = default branch-v2: 0.233711 ~~~~~ branch-v3 before: 0.368769 (+57.79%, +0.14) branch-v3 after: 0.239857 (+2.63%, +0.01) # bin-env-vars.hg.flavor = rust branch-v2: 0.235230 ~~~~~ branch-v3 before: 0.372460 (+58.34%, +0.14) branch-v3 after: 0.240972 (+2.44%, +0.01) ## data-env-vars.name = netbeans-2018-08-01-ds2-pnm # bin-env-vars.hg.flavor = rust branch-v2: 0.255586 ~~~~~ branch-v3 before: 0.318907 (+24.78%, +0.06) branch-v3 after: 0.268560 (+5.08%, +0.01) ## data-env-vars.name = mozilla-central-2024-03-22-zstd-sparse-revlog # bin-env-vars.hg.flavor = default branch-v2: 0.339010 ~~~~~ branch-v3 before: 0.349752 (+3.17%, +0.01) branch-v3 after: 0.349389 (+3.06%, +0.01) # bin-env-vars.hg.flavor = rust branch-v2: 0.346525 ~~~~~ branch-v3 before: 0.354300 (+2.24%, +0.01) branch-v3 after: 0.355661 (+2.64%, +0.01) ## data-env-vars.name = mozilla-central-2024-03-22-ds2-pnm # bin-env-vars.hg.flavor = rust branch-v2: 0.380202 ~~~~~ branch-v3 before: 0.396293 (+4.23%, +0.02) branch-v3 after: 0.408851 (+7.54%, +0.03) ## data-env-vars.name = mozilla-unified-2024-03-22-zstd-sparse-revlog # bin-env-vars.hg.flavor = default branch-v2: 0.412165 ~~~~~ branch-v3 before: 0.424769 (+3.06%, +0.01) branch-v3 after: 0.427782 (+3.79%, +0.02) # bin-env-vars.hg.flavor = rust branch-v2: 0.412397 ~~~~~ branch-v3 before: 0.421796 (+2.28%, +0.01) branch-v3 after: 0.422354 (+2.41%, +0.01) ## data-env-vars.name = mozilla-unified-2024-03-22-ds2-pnm # bin-env-vars.hg.flavor = rust branch-v2: 0.429501 ~~~~~ branch-v3 before: 0.443849 (+3.34%, +0.01) branch-v3 after: 0.443197 (+3.19%, +0.01) ## data-env-vars.name = mozilla-try-2024-03-26-zstd-sparse-revlog # bin-env-vars.hg.flavor = default branch-v2: 3.403171 ~~~~~ branch-v3 before: 6.234055 (+83.18%, +2.83) branch-v3 after: 3.819477 (+12.23%, +0.42) # bin-env-vars.hg.flavor = rust branch-v2: 3.454876 ~~~~~ branch-v3 before: 6.307813 (+82.58%, +2.85) branch-v3 after: 3.590284 (+3.92%, +0.14) ## data-env-vars.name = mozilla-try-2024-03-26-ds2-pnm # bin-env-vars.hg.flavor = rust branch-v2: 3.465435 ~~~~~ branch-v3 before: 5.176076 (+49.36%, +1.71) branch-v3 after: 3.633278 (+4.84%, +0.17)
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 03 Sep 2024 11:11:17 +0200
parents f64bbba2ee59
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
34679
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
1 $ cat >> $HGRCPATH <<EOF
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
2 > [extensions]
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
3 > rebase=
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
4 > [phases]
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
5 > publish=False
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
6 > [merge]
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
7 > EOF
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
8
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
9 $ hg init repo
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
10 $ cd repo
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
11 $ echo a > a
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
12 $ echo b > b
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
13 $ hg commit -qAm ab
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
14 $ echo c >> a
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
15 $ echo c >> b
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
16 $ hg commit -qAm c
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
17 $ hg up -q ".^"
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
18 $ echo d >> a
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
19 $ echo d >> b
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
20 $ hg commit -qAm d
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
21
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
22 Testing on-failure=continue
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
23 $ echo on-failure=continue >> $HGRCPATH
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
24 $ hg rebase -s 1 -d 2 --tool false
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
25 rebasing 1:1f28a51c3c9b "c"
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
26 merging a
48427
38941a28406a mergestate: merge `preresolve()` into `resolve()`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48271
diff changeset
27 merging a failed!
34679
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
28 merging b
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
29 merging b failed!
45150
dc5e5577af39 error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents: 34884
diff changeset
30 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: 45150
diff changeset
31 [240]
34679
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
32
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
33 $ hg resolve --list
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
34 U a
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
35 U b
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
36
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
37 $ hg rebase --abort
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
38 rebase aborted
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
39
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
40 Testing on-failure=halt
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
41 $ echo on-failure=halt >> $HGRCPATH
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
42 $ hg rebase -s 1 -d 2 --tool false
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
43 rebasing 1:1f28a51c3c9b "c"
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
44 merging a
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
45 merging a failed!
48271
5228a6dc212b merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Kyle Lippincott <spectral@google.com>
parents: 48270
diff changeset
46 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: 45150
diff changeset
47 [240]
34679
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
48
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
49 $ hg resolve --list
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
50 U a
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
51 U b
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
52
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
53 $ hg rebase --abort
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
54 rebase aborted
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
55
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
56 Testing on-failure=prompt
34884
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
57 $ cat <<EOS >> $HGRCPATH
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
58 > [merge]
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
59 > on-failure=prompt
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
60 > [ui]
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
61 > interactive=1
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
62 > EOS
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
63 $ cat <<EOS | hg rebase -s 1 -d 2 --tool false
34679
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
64 > y
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
65 > n
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
66 > EOS
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
67 rebasing 1:1f28a51c3c9b "c"
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
68 merging a
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
69 merging a failed!
34797
284fa44f7f39 merge: allow user to halt merge on merge-tool failures
Ryan McElroy <rmcelroy@fb.com>
parents: 34679
diff changeset
70 continue merge operation (yn)? y
48427
38941a28406a mergestate: merge `preresolve()` into `resolve()`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48271
diff changeset
71 merging b
34679
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
72 merging b failed!
34797
284fa44f7f39 merge: allow user to halt merge on merge-tool failures
Ryan McElroy <rmcelroy@fb.com>
parents: 34679
diff changeset
73 continue merge operation (yn)? n
48271
5228a6dc212b merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Kyle Lippincott <spectral@google.com>
parents: 48270
diff changeset
74 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: 45150
diff changeset
75 [240]
34679
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
76
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
77 $ hg resolve --list
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
78 U a
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
79 U b
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
80
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
81 $ hg rebase --abort
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
82 rebase aborted
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
83
34884
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
84 Check that successful tool with failed post-check halts the merge
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
85 $ cat <<EOS >> $HGRCPATH
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
86 > [merge-tools]
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
87 > true.check=changed
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
88 > EOS
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
89 $ cat <<EOS | hg rebase -s 1 -d 2 --tool true
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
90 > y
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
91 > n
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
92 > n
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
93 > EOS
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
94 rebasing 1:1f28a51c3c9b "c"
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
95 merging a
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
96 output file a appears unchanged
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
97 was merge successful (yn)? y
48427
38941a28406a mergestate: merge `preresolve()` into `resolve()`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48271
diff changeset
98 merging b
34884
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
99 output file b appears unchanged
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
100 was merge successful (yn)? n
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
101 merging b failed!
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
102 continue merge operation (yn)? n
48271
5228a6dc212b merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Kyle Lippincott <spectral@google.com>
parents: 48270
diff changeset
103 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: 45150
diff changeset
104 [240]
34884
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
105
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
106 $ hg resolve --list
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
107 R a
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
108 U b
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
109
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
110 $ hg rebase --abort
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
111 rebase aborted
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
112
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
113 Check that conflicts with conflict check also halts the merge
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
114 $ cat <<EOS >> $HGRCPATH
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
115 > [merge-tools]
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
116 > true.check=conflicts
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
117 > true.premerge=keep
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
118 > [merge]
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
119 > on-failure=halt
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
120 > EOS
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
121 $ hg rebase -s 1 -d 2 --tool true
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
122 rebasing 1:1f28a51c3c9b "c"
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
123 merging a
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
124 merging a failed!
48271
5228a6dc212b merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Kyle Lippincott <spectral@google.com>
parents: 48270
diff changeset
125 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: 45150
diff changeset
126 [240]
34884
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
127
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
128 $ hg resolve --list
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
129 U a
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
130 U b
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
131
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
132 $ hg rebase --abort
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
133 rebase aborted
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
134
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
135 Check that always-prompt also can halt the merge
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
136 $ cat <<EOS | hg rebase -s 1 -d 2 --tool true --config merge-tools.true.check=prompt
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
137 > y
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
138 > n
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
139 > EOS
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
140 rebasing 1:1f28a51c3c9b "c"
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
141 merging a
48427
38941a28406a mergestate: merge `preresolve()` into `resolve()`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48271
diff changeset
142 was merge of 'a' successful (yn)? y
34884
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
143 merging b
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
144 was merge of 'b' successful (yn)? n
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
145 merging b failed!
48271
5228a6dc212b merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Kyle Lippincott <spectral@google.com>
parents: 48270
diff changeset
146 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: 45150
diff changeset
147 [240]
34884
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
148
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
149 $ hg resolve --list
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
150 R a
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
151 U b
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
152
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
153 $ hg rebase --abort
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
154 rebase aborted
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
155
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
156 Check that successful tool otherwise allows the merge to continue
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
157 $ hg rebase -s 1 -d 2 --tool echo --keep --config merge-tools.echo.premerge=keep
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
158 rebasing 1:1f28a51c3c9b "c"
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
159 merging a
48427
38941a28406a mergestate: merge `preresolve()` into `resolve()`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48271
diff changeset
160 $TESTTMP/repo/a *a~base* *a~other* (glob)
34884
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
161 merging b
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
162 $TESTTMP/repo/b *b~base* *b~other* (glob)
48270
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
163
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
164 Check that unshelve isn't broken by halting the merge
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
165 $ cat <<EOS >> $HGRCPATH
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
166 > [extensions]
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
167 > shelve =
48271
5228a6dc212b merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Kyle Lippincott <spectral@google.com>
parents: 48270
diff changeset
168 > [merge-tools]
5228a6dc212b merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Kyle Lippincott <spectral@google.com>
parents: 48270
diff changeset
169 > false.check=conflicts
5228a6dc212b merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Kyle Lippincott <spectral@google.com>
parents: 48270
diff changeset
170 > false.premerge=false
48270
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
171 > EOS
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
172 $ echo foo > shelve_file1
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
173 $ echo foo > shelve_file2
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
174 $ hg ci -qAm foo
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
175 $ echo bar >> shelve_file1
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
176 $ echo bar >> shelve_file2
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
177 $ hg shelve --list
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
178 $ hg shelve
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
179 shelved as default
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
180 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
181 $ echo baz >> shelve_file1
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
182 $ echo baz >> shelve_file2
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
183 $ hg ci -m baz
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
184 $ hg unshelve --tool false --config merge-tools.false.premerge=keep
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
185 unshelving change 'default'
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
186 rebasing shelved changes
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
187 merging shelve_file1
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
188 merging shelve_file1 failed!
48271
5228a6dc212b merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Kyle Lippincott <spectral@google.com>
parents: 48270
diff changeset
189 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
48270
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
190 [240]
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
191 $ hg status --config commands.status.verbose=True
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
192 M shelve_file1
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
193 M shelve_file2
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
194 ? shelve_file1.orig
48271
5228a6dc212b merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Kyle Lippincott <spectral@google.com>
parents: 48270
diff changeset
195 # The repository is in an unfinished *unshelve* state.
48270
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
196
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
197 # Unresolved merge conflicts:
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
198 #
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
199 # shelve_file1
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
200 # shelve_file2
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
201 #
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
202 # To mark files as resolved: hg resolve --mark FILE
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
203
48271
5228a6dc212b merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Kyle Lippincott <spectral@google.com>
parents: 48270
diff changeset
204 # To continue: hg unshelve --continue
5228a6dc212b merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Kyle Lippincott <spectral@google.com>
parents: 48270
diff changeset
205 # To abort: hg unshelve --abort
48270
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
206
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
207 $ hg resolve --tool false --all --re-merge
48271
5228a6dc212b merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Kyle Lippincott <spectral@google.com>
parents: 48270
diff changeset
208 merging shelve_file1
5228a6dc212b merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Kyle Lippincott <spectral@google.com>
parents: 48270
diff changeset
209 merging shelve_file1 failed!
5228a6dc212b merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Kyle Lippincott <spectral@google.com>
parents: 48270
diff changeset
210 merge halted after failed merge (see hg resolve)
5228a6dc212b merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Kyle Lippincott <spectral@google.com>
parents: 48270
diff changeset
211 [240]
48270
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
212 $ hg shelve --list
48969
f64bbba2ee59 tests: fix glob pattern for dynamic timer alignment
pacien <pacien.trangirard@pacien.net>
parents: 48427
diff changeset
213 default (*s ago) * changes to: foo (glob)
48270
3e66e4517744 merge-halt: demonstrate unshelve issue with merge.on-failure=halt
Kyle Lippincott <spectral@google.com>
parents: 45826
diff changeset
214 $ hg unshelve --abort
48271
5228a6dc212b merge-halt: fix issue with merge.on-failure=halt breaking unshelve
Kyle Lippincott <spectral@google.com>
parents: 48270
diff changeset
215 unshelve of 'default' aborted