Mercurial > hg
annotate tests/test-merge-partial-tool.t @ 49495:59a72267f5ce
fsmonitor: migrate Python ABCs from collections to collections.abc
The Collections Abstract Base Classes in the collections module are
deprecated since Python 3.3 in favor of collections.abc, and removed
in Python 3.10.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 09 Sep 2022 12:45:26 -0700 |
parents | 7af798e497f5 |
children | 59466b13a3ae |
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 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
199 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
|
200 `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
|
201 remains). |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
202 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
203 $ hg up -C 4 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
204 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
|
205 $ 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
|
206 merging file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
207 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
|
208 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
|
209 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
|
210 [1] |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
211 $ cat file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
212 b |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
213 c |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
214 d |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
215 e |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
216 <<<<<<< 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
|
217 f3 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
218 ||||||| 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
|
219 f |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
220 ======= |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
221 f2 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
222 >>>>>>> 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
|
223 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
224 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
225 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
|
226 should not be run. |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
227 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
228 $ hg up -C 4 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
229 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
|
230 $ 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
|
231 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
|
232 (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
|
233 $ cat file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
234 a |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
235 b |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
236 c |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
237 d |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
238 e |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
239 f2 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
240 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
241 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
242 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
|
243 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
|
244 "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
|
245 "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
|
246 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
247 $ hg up -C 0 |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
248 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
|
249 $ 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
|
250 created new head |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
251 $ 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
|
252 merging file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
253 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
|
254 (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
|
255 $ cat file |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
256 a |
f3aafd785e65
filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
257 b2 |
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 e3 |
48982
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
261 |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
262 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
|
263 |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
264 $ 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
|
265 > #!/bin/sh |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
266 > echo "$@" > args.log |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
267 > EOF |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
268 $ 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
|
269 $ cat >> "$HGRCPATH" <<EOF |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
270 > [partial-merge-tools] |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
271 > 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
|
272 > EOF |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
273 $ hg up -C 2 |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
274 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
|
275 $ hg merge 1 |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
276 merging file |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
277 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
|
278 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
|
279 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
|
280 [1] |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
281 $ cat args.log |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
282 */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
|
283 $ hg up -C 2 |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
284 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
|
285 $ 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
|
286 merging file |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
287 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
|
288 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
|
289 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
|
290 [1] |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
291 $ cat args.log |
9dfbea54b680
partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com>
parents:
48981
diff
changeset
|
292 --other */hgmerge-*/file~other */hgmerge-*/file~base --foo --local */hgmerge-*/file~local --also-other */hgmerge-*/file~other (glob) |