Mercurial > hg
annotate tests/test-merge-partial-tool.t @ 51711:832a1aeb576f
pytype: only try the hacky way of finding PYTHON if not provided
This allows us to work in more environments, like when using pyenv. This
syntax is compatible with all POSIX shells.
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Tue, 23 Jul 2024 12:10:31 +0200 |
parents | 59466b13a3ae |
children | 4ee2505f9f65 |
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 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
8 > head -5 $f > tmp |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
9 > mv -f tmp $f |
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 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
17 > tail -5 $f > tmp |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
18 > mv -f tmp $f |
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 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
33 $ make_commit() { |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
34 > echo "$@" | xargs -n1 > file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
35 > 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
|
36 > hg ci -m "$*" |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
37 > } |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
38 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
39 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
40 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
|
41 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
|
42 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
43 $ hg init repo |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
44 $ cd repo |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
45 $ 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
|
46 $ 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
|
47 $ hg up 0 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
48 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
|
49 $ 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
|
50 created new head |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
51 $ 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
|
52 merging file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
53 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
|
54 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
|
55 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
|
56 [1] |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
57 $ cat file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
58 a |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
59 <<<<<<< 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
|
60 b3 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
61 ||||||| 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
|
62 b |
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 b2 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
65 >>>>>>> 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
|
66 c |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
67 d |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
68 e |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
69 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
70 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
71 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
|
72 the conflict markers |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
73 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
74 $ hg up -C 2 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
75 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
|
76 $ cat >> .hg/hgrc <<EOF |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
77 > [merge-tools] |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
78 > my-local.executable = cat |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
79 > my-local.args = $local |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
80 > 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
|
81 > EOF |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
82 $ 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
|
83 merging file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
84 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
|
85 (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
|
86 $ cat file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
87 a |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
88 <<<<<<< 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
|
89 b3 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
90 ||||||| 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
|
91 b |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
92 ======= |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
93 b2 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
94 >>>>>>> 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
|
95 c |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
96 d |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
97 e |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
98 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
99 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
100 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
|
101 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
|
102 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
103 $ hg up -C 0 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
104 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
|
105 $ 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
|
106 created new head |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
107 $ hg up 0 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
108 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
|
109 $ 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
|
110 created new head |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
111 $ 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
|
112 merging file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
113 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
|
114 (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
|
115 $ cat file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
116 a |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
117 b |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
118 c |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
119 d |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
120 e |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
121 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
122 |
49167
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
123 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
|
124 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
|
125 |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
126 $ 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
|
127 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
|
128 $ 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
|
129 merging file |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
130 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
|
131 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
|
132 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
|
133 [1] |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
134 $ cat file |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
135 a |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
136 b |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
137 c |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
138 d |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
139 e |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
140 <<<<<<< 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
|
141 f3 |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
142 ||||||| 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
|
143 f |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
144 ======= |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
145 f2 |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
146 >>>>>>> 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
|
147 |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
148 |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
149 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
|
150 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
|
151 |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
152 $ 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
|
153 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
|
154 $ 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
|
155 merging file |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
156 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
|
157 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
|
158 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
|
159 [1] |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
160 $ cat file |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
161 b |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
162 c |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
163 d |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
164 e |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
165 <<<<<<< 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
|
166 f3 |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
167 ||||||| 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
|
168 f |
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 f2 |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
171 >>>>>>> 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
|
172 |
7af798e497f5
filemerge: add configs to disable some or all partial merge tools
Martin von Zweigbergk <martinvonz@google.com>
parents:
48982
diff
changeset
|
173 |
48981
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
174 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
|
175 only `tail` should run |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
176 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
177 $ hg up -C 4 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
178 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
|
179 $ 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
|
180 merging file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
181 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
|
182 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
|
183 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
|
184 [1] |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
185 $ cat file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
186 b |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
187 c |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
188 d |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
189 e |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
190 <<<<<<< 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
|
191 f3 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
192 ||||||| 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
|
193 f |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
194 ======= |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
195 f2 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
196 >>>>>>> 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
|
197 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
198 |
49840
59466b13a3ae
filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents:
49167
diff
changeset
|
199 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
|
200 |
59466b13a3ae
filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents:
49167
diff
changeset
|
201 $ 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
|
202 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
|
203 $ 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
|
204 merging file |
59466b13a3ae
filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents:
49167
diff
changeset
|
205 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
|
206 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
|
207 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
|
208 [1] |
59466b13a3ae
filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents:
49167
diff
changeset
|
209 $ cat file |
59466b13a3ae
filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents:
49167
diff
changeset
|
210 b |
59466b13a3ae
filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents:
49167
diff
changeset
|
211 c |
59466b13a3ae
filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents:
49167
diff
changeset
|
212 d |
59466b13a3ae
filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents:
49167
diff
changeset
|
213 e |
59466b13a3ae
filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents:
49167
diff
changeset
|
214 <<<<<<< 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
|
215 f3 |
59466b13a3ae
filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents:
49167
diff
changeset
|
216 ||||||| 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
|
217 f |
59466b13a3ae
filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents:
49167
diff
changeset
|
218 ======= |
59466b13a3ae
filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents:
49167
diff
changeset
|
219 f2 |
59466b13a3ae
filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents:
49167
diff
changeset
|
220 >>>>>>> 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
|
221 |
59466b13a3ae
filemerge: fix crash when using filesets in [partial-merge-tools]
Martin von Zweigbergk <martinvonz@google.com>
parents:
49167
diff
changeset
|
222 |
48981
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
223 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
|
224 `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
|
225 remains). |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
226 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
227 $ hg up -C 4 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
228 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
|
229 $ 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
|
230 merging file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
231 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
|
232 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
|
233 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
|
234 [1] |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
235 $ cat file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
236 b |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
237 c |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
238 d |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
239 e |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
240 <<<<<<< 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
|
241 f3 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
242 ||||||| 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
|
243 f |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
244 ======= |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
245 f2 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
246 >>>>>>> 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
|
247 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
248 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
249 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
|
250 should not be run. |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
251 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
252 $ hg up -C 4 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
253 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
|
254 $ 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
|
255 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
|
256 (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
|
257 $ cat file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
258 a |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
259 b |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
260 c |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
261 d |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
262 e |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
263 f2 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
264 |
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 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
|
267 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
|
268 "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
|
269 "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
|
270 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
271 $ hg up -C 0 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
272 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
|
273 $ 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
|
274 created new head |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
275 $ 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
|
276 merging file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
277 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
|
278 (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
|
279 $ cat file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
280 a |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
281 b2 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
282 c |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
283 d |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
284 e3 |
48982
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
285 |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
286 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
|
287 |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
288 $ 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
|
289 > #!/bin/sh |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
290 > echo "$@" > args.log |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
291 > EOF |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
292 $ 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
|
293 $ cat >> "$HGRCPATH" <<EOF |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
294 > [partial-merge-tools] |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
295 > 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
|
296 > EOF |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
297 $ hg up -C 2 |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
298 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
|
299 $ hg merge 1 |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
300 merging file |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
301 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
|
302 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
|
303 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
|
304 [1] |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
305 $ cat args.log |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
306 */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
|
307 $ hg up -C 2 |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
308 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
|
309 $ 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
|
310 merging file |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
311 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
|
312 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
|
313 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
|
314 [1] |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
315 $ cat args.log |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
316 --other */hgmerge-*/file~other */hgmerge-*/file~base --foo --local */hgmerge-*/file~local --also-other */hgmerge-*/file~other (glob) |