annotate tests/test-merge-partial-tool.t @ 52153:a81d2cafdbcc stable

tests: stabilize `test-extdiff.t` on macOS The recent change in the extdiff extension to take into account whether the GUI is accessible in d1b54c152673 started triggering this. I was able to run the test cleanly without this change at the console, but somewhere along the line, I read that the CI runner isn't able to access the GUI when not run as the root user. This is causing CI failures, so we conditionalize these tests out where `DISPLAY` is set to a non empty value to force `procutil.isgui()` to be True, when it in fact doesn't have GUI access.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 01 Nov 2024 16:22:40 -0400
parents 4ee2505f9f65
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
48981
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
1 Test support for partial-resolution tools
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
2
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
3 Create a tool that resolves conflicts after line 5 by simply dropping those
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
4 lines (even if there are no conflicts there)
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
5 $ cat >> "$TESTTMP/head.sh" <<'EOF'
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
6 > #!/bin/sh
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
7 > for f in "$@"; do
51945
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
8 > head -5 "$f" > tmp
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
9 > mv -f tmp "$f"
48981
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
10 > done
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
11 > EOF
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
12 $ chmod +x "$TESTTMP/head.sh"
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
13 ...and another tool that keeps only the last 5 lines instead of the first 5.
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
14 $ cat >> "$TESTTMP/tail.sh" <<'EOF'
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
15 > #!/bin/sh
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
16 > for f in "$@"; do
51945
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
17 > tail -5 "$f" > tmp
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
18 > mv -f tmp "$f"
48981
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
19 > done
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
20 > EOF
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
21 $ chmod +x "$TESTTMP/tail.sh"
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
22
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
23 Set up both tools to run on all patterns (the default), and let the `tail` tool
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
24 run after the `head` tool, which means it will have no effect (we'll override it
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
25 to test order later)
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
26 $ cat >> "$HGRCPATH" <<EOF
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
27 > [partial-merge-tools]
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
28 > head.executable=$TESTTMP/head.sh
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
29 > tail.executable=$TESTTMP/tail.sh
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
30 > tail.order=1
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
31 > EOF
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
32
51945
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
33 On Windows, running $TESTTMP/script.sh will open script.sh in an editor, if
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
34 that's what the configured file association is. The code shell quotes the
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
35 *.executable value, so we can't set it to `sh $TESTTMP/script.sh`, because it
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
36 tries to run that as the executable. As a workaround, generate a bat file that
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
37 invokes `sh script.sh`, and passes the args along.
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
38
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
39 #if windows
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
40 $ cat >> "$TESTTMP/head.bat" <<'EOF'
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
41 > @echo off
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
42 > sh "%TESTTMP%/head.sh" %*
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
43 > EOF
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
44
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
45 $ cat >> "$TESTTMP/tail.bat" <<'EOF'
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
46 > @echo off
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
47 > sh "%TESTTMP%/tail.sh" %*
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
48 > EOF
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
49
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
50 $ sed 's/head.sh/head.bat/g' "${HGRCPATH}" > "${HGRCPATH}.tmp"
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
51 $ sed 's/tail.sh/tail.bat/g' "${HGRCPATH}.tmp" > "${HGRCPATH}"
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
52 #endif
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
53
48981
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
54 $ make_commit() {
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
55 > echo "$@" | xargs -n1 > file
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
56 > hg add file 2> /dev/null
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
57 > hg ci -m "$*"
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
58 > }
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
59
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
60
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
61 Let a partial-resolution tool resolve some conflicts and leave other conflicts
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
62 for the regular merge tool (:merge3 here)
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
63
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
64 $ hg init repo
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
65 $ cd repo
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
66 $ make_commit a b c d e f
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
67 $ make_commit a b2 c d e f2
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
68 $ hg up 0
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
69 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
70 $ make_commit a b3 c d e f3
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
71 created new head
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
72 $ hg merge 1 -t :merge3
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
73 merging file
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
74 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
75 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
76 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
77 [1]
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
78 $ cat file
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
79 a
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
80 <<<<<<< working copy: e11a49d4b620 - test: a b3 c d e f3
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
81 b3
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
82 ||||||| common ancestor: 8ae8bb9cc43a - test: a b c d e f
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
83 b
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
84 =======
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
85 b2
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
86 >>>>>>> merge rev: fbc096a40cc5 - test: a b2 c d e f2
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
87 c
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
88 d
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
89 e
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
90
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
91
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
92 With premerge=keep, the partial-resolution tools runs before and doesn't see
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
93 the conflict markers
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
94
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
95 $ hg up -C 2
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
96 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
97 $ cat >> .hg/hgrc <<EOF
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
98 > [merge-tools]
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
99 > my-local.executable = cat
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
100 > my-local.args = $local
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
101 > my-local.premerge = keep-merge3
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
102 > EOF
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
103 $ hg merge 1 -t my-local
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
104 merging file
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
105 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
106 (branch merge, don't forget to commit)
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
107 $ cat file
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
108 a
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
109 <<<<<<< working copy: e11a49d4b620 - test: a b3 c d e f3
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
110 b3
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
111 ||||||| common ancestor: 8ae8bb9cc43a - test: a b c d e f
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
112 b
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
113 =======
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
114 b2
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
115 >>>>>>> merge rev: fbc096a40cc5 - test: a b2 c d e f2
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
116 c
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
117 d
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
118 e
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
119
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
120
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
121 When a partial-resolution tool resolves all conflicts, the resolution should
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
122 be recorded and the regular merge tool should not be invoked for the file.
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
123
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
124 $ hg up -C 0
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
125 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
126 $ make_commit a b c d e f2
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
127 created new head
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
128 $ hg up 0
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
129 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
130 $ make_commit a b c d e f3
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
131 created new head
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
132 $ hg merge 3 -t false
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
133 merging file
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
134 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
135 (branch merge, don't forget to commit)
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
136 $ cat file
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
137 a
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
138 b
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
139 c
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
140 d
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
141 e
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
142
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
143
49167
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
144 Can disable all partial merge tools (the `head` tool would have resolved this
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
145 conflict it had been enabled)
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
146
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
147 $ hg up -C 4
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
148 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
149 $ hg merge 3 -t :merge3 --config merge.disable-partial-tools=yes
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
150 merging file
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
151 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
152 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
153 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
154 [1]
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
155 $ cat file
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
156 a
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
157 b
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
158 c
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
159 d
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
160 e
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
161 <<<<<<< working copy: d57edaa6e21a - test: a b c d e f3
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
162 f3
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
163 ||||||| common ancestor: 8ae8bb9cc43a - test: a b c d e f
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
164 f
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
165 =======
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
166 f2
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
167 >>>>>>> merge rev: 8c217da987be - test: a b c d e f2
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
168
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
169
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
170 Can disable one partial merge tool (the `head` tool would have resolved this
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
171 conflict it had been enabled)
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
172
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
173 $ hg up -C 4
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
174 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
175 $ hg merge 3 -t :merge3 --config partial-merge-tools.head.disable=yes
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
176 merging file
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
177 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
178 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
179 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
180 [1]
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
181 $ cat file
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
182 b
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
183 c
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
184 d
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
185 e
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
186 <<<<<<< working copy: d57edaa6e21a - test: a b c d e f3
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
187 f3
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
188 ||||||| common ancestor: 8ae8bb9cc43a - test: a b c d e f
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
189 f
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
190 =======
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
191 f2
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
192 >>>>>>> merge rev: 8c217da987be - test: a b c d e f2
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
193
7af798e497f5 filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents: 48982
diff changeset
194
48981
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
195 Only tools whose patterns match are run. We make `head` not match here, so
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
196 only `tail` should run
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
197
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
198 $ hg up -C 4
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
199 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
200 $ hg merge 3 -t :merge3 --config partial-merge-tools.head.patterns=other
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
201 merging file
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
202 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
203 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
204 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
205 [1]
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
206 $ cat file
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
207 b
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
208 c
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
209 d
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
210 e
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
211 <<<<<<< working copy: d57edaa6e21a - test: a b c d e f3
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
212 f3
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
213 ||||||| common ancestor: 8ae8bb9cc43a - test: a b c d e f
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
214 f
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
215 =======
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
216 f2
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
217 >>>>>>> merge rev: 8c217da987be - test: a b c d e f2
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
218
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
219
49840
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
220 Filesets can be used to select which files to run partial merge tools on.
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
221
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
222 $ hg up -C 4
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
223 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
224 $ hg merge 3 -t :merge3 --config partial-merge-tools.head.patterns=set:other
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
225 merging file
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
226 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
227 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
228 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
229 [1]
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
230 $ cat file
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
231 b
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
232 c
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
233 d
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
234 e
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
235 <<<<<<< working copy: d57edaa6e21a - test: a b c d e f3
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
236 f3
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
237 ||||||| common ancestor: 8ae8bb9cc43a - test: a b c d e f
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
238 f
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
239 =======
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
240 f2
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
241 >>>>>>> merge rev: 8c217da987be - test: a b c d e f2
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
242
59466b13a3ae filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents: 49167
diff changeset
243
48981
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
244 If there are several matching tools, they are run in requested order. We move
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
245 `head` after `tail` in order here so it has no effect (the conflict in "f" thus
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
246 remains).
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
247
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
248 $ hg up -C 4
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
249 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
250 $ hg merge 3 -t :merge3 --config partial-merge-tools.head.order=2
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
251 merging file
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
252 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
253 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
254 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
255 [1]
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
256 $ cat file
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
257 b
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
258 c
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
259 d
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
260 e
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
261 <<<<<<< working copy: d57edaa6e21a - test: a b c d e f3
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
262 f3
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
263 ||||||| common ancestor: 8ae8bb9cc43a - test: a b c d e f
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
264 f
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
265 =======
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
266 f2
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
267 >>>>>>> merge rev: 8c217da987be - test: a b c d e f2
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
268
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
269
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
270 When using "nomerge" tools (e.g. `:other`), the partial-resolution tools
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
271 should not be run.
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
272
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
273 $ hg up -C 4
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
274 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
275 $ hg merge 3 -t :other
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
276 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
277 (branch merge, don't forget to commit)
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
278 $ cat file
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
279 a
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
280 b
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
281 c
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
282 d
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
283 e
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
284 f2
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
285
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
286
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
287 If a partial-resolution tool resolved some conflict and simplemerge can
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
288 merge the rest, then the regular merge tool should not be used. Here we merge
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
289 "a b c d e3 f3" with "a b2 c d e f2". The `head` tool resolves the conflict in
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
290 "f" and the internal simplemerge merges the remaining changes in "b" and "e".
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
291
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
292 $ hg up -C 0
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
293 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
294 $ make_commit a b c d e3 f3
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
295 created new head
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
296 $ hg merge 1 -t false
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
297 merging file
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
298 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
299 (branch merge, don't forget to commit)
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
300 $ cat file
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
301 a
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
302 b2
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
303 c
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
304 d
f3aafd785e65 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
305 e3
48982
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
306
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
307 Test that arguments get passed as expected.
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
308
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
309 $ cat >> "$TESTTMP/log-args.sh" <<'EOF'
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
310 > #!/bin/sh
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
311 > echo "$@" > args.log
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
312 > EOF
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
313 $ chmod +x "$TESTTMP/log-args.sh"
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
314 $ cat >> "$HGRCPATH" <<EOF
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
315 > [partial-merge-tools]
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
316 > log-args.executable=$TESTTMP/log-args.sh
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
317 > EOF
51945
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
318
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
319 On Windows, running $TESTTMP/script.sh will open script.sh in an editor, if
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
320 that's what the configured file association is. The code shell quotes the
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
321 *.executable value, so we can't set it to `sh $TESTTMP/script.sh`, because it
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
322 tries to run that as the executable. As a workaround, generate a bat file that
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
323 invokes `sh script.sh`, and passes the args along.
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
324
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
325 #if windows
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
326 $ cat >> "$TESTTMP/log-args.bat" <<'EOF'
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
327 > @echo off
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
328 > sh "%TESTTMP%/log-args.sh" %*
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
329 > EOF
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
330
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
331 $ sed 's/log-args.sh/log-args.bat/g' "$HGRCPATH" > "${HGRCPATH}.tmp"
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
332 $ mv "${HGRCPATH}.tmp" "${HGRCPATH}"
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
333 #endif
4ee2505f9f65 tests: stabilize `test-merge-partial-tool.t` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 49840
diff changeset
334
48982
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
335 $ hg up -C 2
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
336 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
337 $ hg merge 1
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
338 merging file
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
339 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
340 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
341 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
342 [1]
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
343 $ cat args.log
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
344 */hgmerge-*/file~local */hgmerge-*/file~base */hgmerge-*/file~other (glob)
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
345 $ hg up -C 2
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
346 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
347 $ hg merge 1 --config partial-merge-tools.log-args.args='--other $other $base --foo --local $local --also-other $other'
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
348 merging file
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
349 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
350 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
351 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
352 [1]
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
353 $ cat args.log
9dfbea54b680 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents: 48981
diff changeset
354 --other */hgmerge-*/file~other */hgmerge-*/file~base --foo --local */hgmerge-*/file~local --also-other */hgmerge-*/file~other (glob)