Show More
@@ -1,150 +1,150 | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | # test merge-tools configuration - mostly exercising filemerge.py |
|
3 | # test merge-tools configuration - mostly exercising filemerge.py | |
4 |
|
4 | |||
5 | unset HGMERGE # make sure HGMERGE doesn't interfere with the test |
|
5 | unset HGMERGE # make sure HGMERGE doesn't interfere with the test | |
6 |
|
6 | |||
7 | hg init |
|
7 | hg init | |
8 |
|
8 | |||
9 | echo "# revision 0" |
|
9 | echo "# revision 0" | |
10 | echo "revision 0" > f |
|
10 | echo "revision 0" > f | |
11 | echo "space" >> f |
|
11 | echo "space" >> f | |
12 | hg commit -Am "revision 0" -d "1000000 0" |
|
12 | hg commit -Am "revision 0" -d "1000000 0" | |
13 |
|
13 | |||
14 | echo "# revision 1" |
|
14 | echo "# revision 1" | |
15 | echo "revision 1" > f |
|
15 | echo "revision 1" > f | |
16 | echo "space" >> f |
|
16 | echo "space" >> f | |
17 | hg commit -Am "revision 1" -d "1000000 0" |
|
17 | hg commit -Am "revision 1" -d "1000000 0" | |
18 |
|
18 | |||
19 | hg update 0 > /dev/null |
|
19 | hg update 0 > /dev/null | |
20 | echo "# revision 2" |
|
20 | echo "# revision 2" | |
21 | echo "revision 2" > f |
|
21 | echo "revision 2" > f | |
22 | echo "space" >> f |
|
22 | echo "space" >> f | |
23 | hg commit -Am "revision 2" -d "1000000 0" |
|
23 | hg commit -Am "revision 2" -d "1000000 0" | |
24 |
|
24 | |||
25 | hg update 0 > /dev/null |
|
25 | hg update 0 > /dev/null | |
26 | echo "# revision 3 - simple to merge" |
|
26 | echo "# revision 3 - simple to merge" | |
27 | echo "revision 3" >> f |
|
27 | echo "revision 3" >> f | |
28 | hg commit -Am "revision 3" -d "1000000 0" |
|
28 | hg commit -Am "revision 3" -d "1000000 0" | |
29 |
|
29 | |||
30 |
|
30 | |||
31 | echo "[merge-tools]" > .hg/hgrc |
|
31 | echo "[merge-tools]" > .hg/hgrc | |
32 | echo |
|
32 | echo | |
33 |
|
33 | |||
34 | beforemerge() { |
|
34 | beforemerge() { | |
35 | cat .hg/hgrc |
|
35 | cat .hg/hgrc | |
36 | echo "# hg update -C 1" |
|
36 | echo "# hg update -C 1" | |
37 | hg update -C 1 > /dev/null |
|
37 | hg update -C 1 > /dev/null | |
38 | } |
|
38 | } | |
39 |
|
39 | |||
40 | aftermerge() { |
|
40 | aftermerge() { | |
41 | echo "# cat f" |
|
41 | echo "# cat f" | |
42 | cat f |
|
42 | cat f | |
43 | echo "# hg stat" |
|
43 | echo "# hg stat" | |
44 | hg stat |
|
44 | hg stat | |
45 | rm -f f.orig |
|
45 | rm -f f.orig | |
46 | echo |
|
46 | echo | |
47 | } |
|
47 | } | |
48 |
|
48 | |||
49 | domerge() { |
|
49 | domerge() { | |
50 | beforemerge |
|
50 | beforemerge | |
51 | echo "# hg merge $*" |
|
51 | echo "# hg merge $*" | |
52 | hg merge $* |
|
52 | hg merge $* | |
53 | aftermerge |
|
53 | aftermerge | |
54 | } |
|
54 | } | |
55 |
|
55 | |||
56 | echo |
|
56 | echo | |
57 | echo Tool selection |
|
57 | echo Tool selection | |
58 | echo |
|
58 | echo | |
59 |
|
59 | |||
60 | echo "# default is internal merge:" |
|
60 | echo "# default is internal merge:" | |
61 | domerge -r 2 |
|
61 | domerge -r 2 | |
62 |
|
62 | |||
63 | echo "# simplest hgrc using false for merge:" |
|
63 | echo "# simplest hgrc using false for merge:" | |
64 | echo "false.whatever=" >> .hg/hgrc |
|
64 | echo "false.whatever=" >> .hg/hgrc | |
65 | domerge -r 2 |
|
65 | domerge -r 2 | |
66 |
|
66 | |||
67 | echo "# true with higher .priority gets precedence:" |
|
67 | echo "# true with higher .priority gets precedence:" | |
68 | echo "true.priority=1" >> .hg/hgrc |
|
68 | echo "true.priority=1" >> .hg/hgrc | |
69 | domerge -r 2 |
|
69 | domerge -r 2 | |
70 |
|
70 | |||
71 | echo "# unless lowered on command line:" |
|
71 | echo "# unless lowered on command line:" | |
72 | domerge -r 2 --config merge-tools.true.priority=-7 |
|
72 | domerge -r 2 --config merge-tools.true.priority=-7 | |
73 |
|
73 | |||
74 | echo "# or false set higher on command line:" |
|
74 | echo "# or false set higher on command line:" | |
75 | domerge -r 2 --config merge-tools.false.priority=117 |
|
75 | domerge -r 2 --config merge-tools.false.priority=117 | |
76 |
|
76 | |||
77 | echo "# or true.executable not found in PATH:" |
|
77 | echo "# or true.executable not found in PATH:" | |
78 | domerge -r 2 --config merge-tools.true.executable=nonexistingmergetool |
|
78 | domerge -r 2 --config merge-tools.true.executable=nonexistingmergetool | |
79 |
|
79 | |||
80 | echo "# or true.executable with bogus path:" |
|
80 | echo "# or true.executable with bogus path:" | |
81 | domerge -r 2 --config merge-tools.true.executable=/bin/nonexistingmergetool |
|
81 | domerge -r 2 --config merge-tools.true.executable=/bin/nonexistingmergetool | |
82 |
|
82 | |||
83 | echo "# but true.executable set to cat found in PATH works:" |
|
83 | echo "# but true.executable set to cat found in PATH works:" | |
84 | echo "true.executable=cat" >> .hg/hgrc |
|
84 | echo "true.executable=cat" >> .hg/hgrc | |
85 | domerge -r 2 |
|
85 | domerge -r 2 | |
86 |
|
86 | |||
87 | echo "# and true.executable set to cat with path works:" |
|
87 | echo "# and true.executable set to cat with path works:" | |
88 | domerge -r 2 --config merge-tools.true.executable=/bin/cat |
|
88 | domerge -r 2 --config merge-tools.true.executable=/bin/cat | |
89 |
|
89 | |||
90 |
|
90 | |||
91 | echo |
|
91 | echo | |
92 | echo Tool selection and merge-patterns |
|
92 | echo Tool selection and merge-patterns | |
93 | echo |
|
93 | echo | |
94 |
|
94 | |||
95 |
echo "# merge-patterns specifies new tool |
|
95 | echo "# merge-patterns specifies new tool false:" | |
96 |
domerge -r 2 --config merge-patterns.f= |
|
96 | domerge -r 2 --config merge-patterns.f=false | |
97 |
|
97 | |||
98 | echo "# merge-patterns specifies executable not found in PATH and gets warning:" |
|
98 | echo "# merge-patterns specifies executable not found in PATH and gets warning:" | |
99 | domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool |
|
99 | domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool | |
100 |
|
100 | |||
101 | echo "# merge-patterns specifies executable with bogus path and gets warning:" |
|
101 | echo "# merge-patterns specifies executable with bogus path and gets warning:" | |
102 | domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/bin/nonexistingmergetool |
|
102 | domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/bin/nonexistingmergetool | |
103 |
|
103 | |||
104 |
|
104 | |||
105 | echo |
|
105 | echo | |
106 | echo Premerge |
|
106 | echo Premerge | |
107 | echo |
|
107 | echo | |
108 |
|
108 | |||
109 | echo "# Default is silent simplemerge:" |
|
109 | echo "# Default is silent simplemerge:" | |
110 | domerge -r 3 |
|
110 | domerge -r 3 | |
111 |
|
111 | |||
112 | echo "# .premerge=True is same:" |
|
112 | echo "# .premerge=True is same:" | |
113 | domerge -r 3 --config merge-tools.true.premerge=True |
|
113 | domerge -r 3 --config merge-tools.true.premerge=True | |
114 |
|
114 | |||
115 | echo "# .premerge=False executes merge-tool:" |
|
115 | echo "# .premerge=False executes merge-tool:" | |
116 | domerge -r 3 --config merge-tools.true.premerge=False |
|
116 | domerge -r 3 --config merge-tools.true.premerge=False | |
117 |
|
117 | |||
118 |
|
118 | |||
119 | echo |
|
119 | echo | |
120 | echo Tool execution |
|
120 | echo Tool execution | |
121 | echo |
|
121 | echo | |
122 |
|
122 | |||
123 | echo '# set tools.args explicit to include $base $local $other $output:' # default '$local $base $other' |
|
123 | echo '# set tools.args explicit to include $base $local $other $output:' # default '$local $base $other' | |
124 | beforemerge |
|
124 | beforemerge | |
125 | hg merge -r 2 --config merge-tools.true.executable=head --config merge-tools.true.args='$base $local $other $output' \ |
|
125 | hg merge -r 2 --config merge-tools.true.executable=head --config merge-tools.true.args='$base $local $other $output' \ | |
126 | | sed 's,==> .* <==,==> ... <==,g' |
|
126 | | sed 's,==> .* <==,==> ... <==,g' | |
127 | aftermerge |
|
127 | aftermerge | |
128 |
|
128 | |||
129 | echo '# Merge with "echo mergeresult > $local":' |
|
129 | echo '# Merge with "echo mergeresult > $local":' | |
130 | beforemerge |
|
130 | beforemerge | |
131 | hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $local' |
|
131 | hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $local' | |
132 | aftermerge |
|
132 | aftermerge | |
133 |
|
133 | |||
134 | echo '# - and $local is the file f:' |
|
134 | echo '# - and $local is the file f:' | |
135 | beforemerge |
|
135 | beforemerge | |
136 | hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > f' |
|
136 | hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > f' | |
137 | aftermerge |
|
137 | aftermerge | |
138 |
|
138 | |||
139 | echo '# Merge with "echo mergeresult > $output" - the variable is a bit magic:' |
|
139 | echo '# Merge with "echo mergeresult > $output" - the variable is a bit magic:' | |
140 | beforemerge |
|
140 | beforemerge | |
141 | hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $output' |
|
141 | hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $output' | |
142 | aftermerge |
|
142 | aftermerge | |
143 |
|
143 | |||
144 |
|
144 | |||
145 | echo |
|
145 | echo | |
146 | echo Merge post-processing |
|
146 | echo Merge post-processing | |
147 | echo |
|
147 | echo | |
148 |
|
148 | |||
149 | echo "# cat is a bad merge-tool and doesn't change:" |
|
149 | echo "# cat is a bad merge-tool and doesn't change:" | |
150 | domerge -r 2 --config merge-tools.true.checkchanged=1 |
|
150 | domerge -r 2 --config merge-tools.true.checkchanged=1 |
@@ -1,399 +1,395 | |||||
1 | # revision 0 |
|
1 | # revision 0 | |
2 | adding f |
|
2 | adding f | |
3 | # revision 1 |
|
3 | # revision 1 | |
4 | # revision 2 |
|
4 | # revision 2 | |
5 | created new head |
|
5 | created new head | |
6 | # revision 3 - simple to merge |
|
6 | # revision 3 - simple to merge | |
7 | created new head |
|
7 | created new head | |
8 |
|
8 | |||
9 |
|
9 | |||
10 | Tool selection |
|
10 | Tool selection | |
11 |
|
11 | |||
12 | # default is internal merge: |
|
12 | # default is internal merge: | |
13 | [merge-tools] |
|
13 | [merge-tools] | |
14 | # hg update -C 1 |
|
14 | # hg update -C 1 | |
15 | # hg merge -r 2 |
|
15 | # hg merge -r 2 | |
16 | merging f |
|
16 | merging f | |
17 | warning: conflicts during merge. |
|
17 | warning: conflicts during merge. | |
18 | merging f failed! |
|
18 | merging f failed! | |
19 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
19 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
20 | use 'hg resolve' to retry unresolved file merges |
|
20 | use 'hg resolve' to retry unresolved file merges | |
21 | # cat f |
|
21 | # cat f | |
22 | <<<<<<< local |
|
22 | <<<<<<< local | |
23 | revision 1 |
|
23 | revision 1 | |
24 | ======= |
|
24 | ======= | |
25 | revision 2 |
|
25 | revision 2 | |
26 | >>>>>>> other |
|
26 | >>>>>>> other | |
27 | space |
|
27 | space | |
28 | # hg stat |
|
28 | # hg stat | |
29 | M f |
|
29 | M f | |
30 | ? f.orig |
|
30 | ? f.orig | |
31 |
|
31 | |||
32 | # simplest hgrc using false for merge: |
|
32 | # simplest hgrc using false for merge: | |
33 | [merge-tools] |
|
33 | [merge-tools] | |
34 | false.whatever= |
|
34 | false.whatever= | |
35 | # hg update -C 1 |
|
35 | # hg update -C 1 | |
36 | # hg merge -r 2 |
|
36 | # hg merge -r 2 | |
37 | merging f |
|
37 | merging f | |
38 | merging f failed! |
|
38 | merging f failed! | |
39 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
39 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
40 | use 'hg resolve' to retry unresolved file merges |
|
40 | use 'hg resolve' to retry unresolved file merges | |
41 | # cat f |
|
41 | # cat f | |
42 | revision 1 |
|
42 | revision 1 | |
43 | space |
|
43 | space | |
44 | # hg stat |
|
44 | # hg stat | |
45 | M f |
|
45 | M f | |
46 | ? f.orig |
|
46 | ? f.orig | |
47 |
|
47 | |||
48 | # true with higher .priority gets precedence: |
|
48 | # true with higher .priority gets precedence: | |
49 | [merge-tools] |
|
49 | [merge-tools] | |
50 | false.whatever= |
|
50 | false.whatever= | |
51 | true.priority=1 |
|
51 | true.priority=1 | |
52 | # hg update -C 1 |
|
52 | # hg update -C 1 | |
53 | # hg merge -r 2 |
|
53 | # hg merge -r 2 | |
54 | merging f |
|
54 | merging f | |
55 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
55 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
56 | (branch merge, don't forget to commit) |
|
56 | (branch merge, don't forget to commit) | |
57 | # cat f |
|
57 | # cat f | |
58 | revision 1 |
|
58 | revision 1 | |
59 | space |
|
59 | space | |
60 | # hg stat |
|
60 | # hg stat | |
61 | M f |
|
61 | M f | |
62 |
|
62 | |||
63 | # unless lowered on command line: |
|
63 | # unless lowered on command line: | |
64 | [merge-tools] |
|
64 | [merge-tools] | |
65 | false.whatever= |
|
65 | false.whatever= | |
66 | true.priority=1 |
|
66 | true.priority=1 | |
67 | # hg update -C 1 |
|
67 | # hg update -C 1 | |
68 | # hg merge -r 2 --config merge-tools.true.priority=-7 |
|
68 | # hg merge -r 2 --config merge-tools.true.priority=-7 | |
69 | merging f |
|
69 | merging f | |
70 | merging f failed! |
|
70 | merging f failed! | |
71 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
71 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
72 | use 'hg resolve' to retry unresolved file merges |
|
72 | use 'hg resolve' to retry unresolved file merges | |
73 | # cat f |
|
73 | # cat f | |
74 | revision 1 |
|
74 | revision 1 | |
75 | space |
|
75 | space | |
76 | # hg stat |
|
76 | # hg stat | |
77 | M f |
|
77 | M f | |
78 | ? f.orig |
|
78 | ? f.orig | |
79 |
|
79 | |||
80 | # or false set higher on command line: |
|
80 | # or false set higher on command line: | |
81 | [merge-tools] |
|
81 | [merge-tools] | |
82 | false.whatever= |
|
82 | false.whatever= | |
83 | true.priority=1 |
|
83 | true.priority=1 | |
84 | # hg update -C 1 |
|
84 | # hg update -C 1 | |
85 | # hg merge -r 2 --config merge-tools.false.priority=117 |
|
85 | # hg merge -r 2 --config merge-tools.false.priority=117 | |
86 | merging f |
|
86 | merging f | |
87 | merging f failed! |
|
87 | merging f failed! | |
88 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
88 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
89 | use 'hg resolve' to retry unresolved file merges |
|
89 | use 'hg resolve' to retry unresolved file merges | |
90 | # cat f |
|
90 | # cat f | |
91 | revision 1 |
|
91 | revision 1 | |
92 | space |
|
92 | space | |
93 | # hg stat |
|
93 | # hg stat | |
94 | M f |
|
94 | M f | |
95 | ? f.orig |
|
95 | ? f.orig | |
96 |
|
96 | |||
97 | # or true.executable not found in PATH: |
|
97 | # or true.executable not found in PATH: | |
98 | [merge-tools] |
|
98 | [merge-tools] | |
99 | false.whatever= |
|
99 | false.whatever= | |
100 | true.priority=1 |
|
100 | true.priority=1 | |
101 | # hg update -C 1 |
|
101 | # hg update -C 1 | |
102 | # hg merge -r 2 --config merge-tools.true.executable=nonexistingmergetool |
|
102 | # hg merge -r 2 --config merge-tools.true.executable=nonexistingmergetool | |
103 | merging f |
|
103 | merging f | |
104 | merging f failed! |
|
104 | merging f failed! | |
105 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
105 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
106 | use 'hg resolve' to retry unresolved file merges |
|
106 | use 'hg resolve' to retry unresolved file merges | |
107 | # cat f |
|
107 | # cat f | |
108 | revision 1 |
|
108 | revision 1 | |
109 | space |
|
109 | space | |
110 | # hg stat |
|
110 | # hg stat | |
111 | M f |
|
111 | M f | |
112 | ? f.orig |
|
112 | ? f.orig | |
113 |
|
113 | |||
114 | # or true.executable with bogus path: |
|
114 | # or true.executable with bogus path: | |
115 | [merge-tools] |
|
115 | [merge-tools] | |
116 | false.whatever= |
|
116 | false.whatever= | |
117 | true.priority=1 |
|
117 | true.priority=1 | |
118 | # hg update -C 1 |
|
118 | # hg update -C 1 | |
119 | # hg merge -r 2 --config merge-tools.true.executable=/bin/nonexistingmergetool |
|
119 | # hg merge -r 2 --config merge-tools.true.executable=/bin/nonexistingmergetool | |
120 | merging f |
|
120 | merging f | |
121 | merging f failed! |
|
121 | merging f failed! | |
122 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
122 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
123 | use 'hg resolve' to retry unresolved file merges |
|
123 | use 'hg resolve' to retry unresolved file merges | |
124 | # cat f |
|
124 | # cat f | |
125 | revision 1 |
|
125 | revision 1 | |
126 | space |
|
126 | space | |
127 | # hg stat |
|
127 | # hg stat | |
128 | M f |
|
128 | M f | |
129 | ? f.orig |
|
129 | ? f.orig | |
130 |
|
130 | |||
131 | # but true.executable set to cat found in PATH works: |
|
131 | # but true.executable set to cat found in PATH works: | |
132 | [merge-tools] |
|
132 | [merge-tools] | |
133 | false.whatever= |
|
133 | false.whatever= | |
134 | true.priority=1 |
|
134 | true.priority=1 | |
135 | true.executable=cat |
|
135 | true.executable=cat | |
136 | # hg update -C 1 |
|
136 | # hg update -C 1 | |
137 | # hg merge -r 2 |
|
137 | # hg merge -r 2 | |
138 | revision 1 |
|
138 | revision 1 | |
139 | space |
|
139 | space | |
140 | revision 0 |
|
140 | revision 0 | |
141 | space |
|
141 | space | |
142 | revision 2 |
|
142 | revision 2 | |
143 | space |
|
143 | space | |
144 | merging f |
|
144 | merging f | |
145 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
145 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
146 | (branch merge, don't forget to commit) |
|
146 | (branch merge, don't forget to commit) | |
147 | # cat f |
|
147 | # cat f | |
148 | revision 1 |
|
148 | revision 1 | |
149 | space |
|
149 | space | |
150 | # hg stat |
|
150 | # hg stat | |
151 | M f |
|
151 | M f | |
152 |
|
152 | |||
153 | # and true.executable set to cat with path works: |
|
153 | # and true.executable set to cat with path works: | |
154 | [merge-tools] |
|
154 | [merge-tools] | |
155 | false.whatever= |
|
155 | false.whatever= | |
156 | true.priority=1 |
|
156 | true.priority=1 | |
157 | true.executable=cat |
|
157 | true.executable=cat | |
158 | # hg update -C 1 |
|
158 | # hg update -C 1 | |
159 | # hg merge -r 2 --config merge-tools.true.executable=/bin/cat |
|
159 | # hg merge -r 2 --config merge-tools.true.executable=/bin/cat | |
160 | revision 1 |
|
160 | revision 1 | |
161 | space |
|
161 | space | |
162 | revision 0 |
|
162 | revision 0 | |
163 | space |
|
163 | space | |
164 | revision 2 |
|
164 | revision 2 | |
165 | space |
|
165 | space | |
166 | merging f |
|
166 | merging f | |
167 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
167 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
168 | (branch merge, don't forget to commit) |
|
168 | (branch merge, don't forget to commit) | |
169 | # cat f |
|
169 | # cat f | |
170 | revision 1 |
|
170 | revision 1 | |
171 | space |
|
171 | space | |
172 | # hg stat |
|
172 | # hg stat | |
173 | M f |
|
173 | M f | |
174 |
|
174 | |||
175 |
|
175 | |||
176 | Tool selection and merge-patterns |
|
176 | Tool selection and merge-patterns | |
177 |
|
177 | |||
178 |
# merge-patterns specifies new tool |
|
178 | # merge-patterns specifies new tool false: | |
179 | [merge-tools] |
|
179 | [merge-tools] | |
180 | false.whatever= |
|
180 | false.whatever= | |
181 | true.priority=1 |
|
181 | true.priority=1 | |
182 | true.executable=cat |
|
182 | true.executable=cat | |
183 | # hg update -C 1 |
|
183 | # hg update -C 1 | |
184 |
# hg merge -r 2 --config merge-patterns.f= |
|
184 | # hg merge -r 2 --config merge-patterns.f=false | |
185 | space |
|
|||
186 | revision 1 |
|
|||
187 | space |
|
|||
188 | revision 0 |
|
|||
189 | space |
|
|||
190 | revision 2 |
|
|||
191 | merging f |
|
185 | merging f | |
192 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
186 | merging f failed! | |
193 | (branch merge, don't forget to commit) |
|
187 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
|
188 | use 'hg resolve' to retry unresolved file merges | |||
194 | # cat f |
|
189 | # cat f | |
195 | revision 1 |
|
190 | revision 1 | |
196 | space |
|
191 | space | |
197 | # hg stat |
|
192 | # hg stat | |
198 | M f |
|
193 | M f | |
|
194 | ? f.orig | |||
199 |
|
195 | |||
200 | # merge-patterns specifies executable not found in PATH and gets warning: |
|
196 | # merge-patterns specifies executable not found in PATH and gets warning: | |
201 | [merge-tools] |
|
197 | [merge-tools] | |
202 | false.whatever= |
|
198 | false.whatever= | |
203 | true.priority=1 |
|
199 | true.priority=1 | |
204 | true.executable=cat |
|
200 | true.executable=cat | |
205 | # hg update -C 1 |
|
201 | # hg update -C 1 | |
206 | # hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool |
|
202 | # hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool | |
207 | couldn't find merge tool true specified for f |
|
203 | couldn't find merge tool true specified for f | |
208 | merging f |
|
204 | merging f | |
209 | merging f failed! |
|
205 | merging f failed! | |
210 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
206 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
211 | use 'hg resolve' to retry unresolved file merges |
|
207 | use 'hg resolve' to retry unresolved file merges | |
212 | # cat f |
|
208 | # cat f | |
213 | revision 1 |
|
209 | revision 1 | |
214 | space |
|
210 | space | |
215 | # hg stat |
|
211 | # hg stat | |
216 | M f |
|
212 | M f | |
217 | ? f.orig |
|
213 | ? f.orig | |
218 |
|
214 | |||
219 | # merge-patterns specifies executable with bogus path and gets warning: |
|
215 | # merge-patterns specifies executable with bogus path and gets warning: | |
220 | [merge-tools] |
|
216 | [merge-tools] | |
221 | false.whatever= |
|
217 | false.whatever= | |
222 | true.priority=1 |
|
218 | true.priority=1 | |
223 | true.executable=cat |
|
219 | true.executable=cat | |
224 | # hg update -C 1 |
|
220 | # hg update -C 1 | |
225 | # hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/bin/nonexistingmergetool |
|
221 | # hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/bin/nonexistingmergetool | |
226 | couldn't find merge tool true specified for f |
|
222 | couldn't find merge tool true specified for f | |
227 | merging f |
|
223 | merging f | |
228 | merging f failed! |
|
224 | merging f failed! | |
229 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
225 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
230 | use 'hg resolve' to retry unresolved file merges |
|
226 | use 'hg resolve' to retry unresolved file merges | |
231 | # cat f |
|
227 | # cat f | |
232 | revision 1 |
|
228 | revision 1 | |
233 | space |
|
229 | space | |
234 | # hg stat |
|
230 | # hg stat | |
235 | M f |
|
231 | M f | |
236 | ? f.orig |
|
232 | ? f.orig | |
237 |
|
233 | |||
238 |
|
234 | |||
239 | Premerge |
|
235 | Premerge | |
240 |
|
236 | |||
241 | # Default is silent simplemerge: |
|
237 | # Default is silent simplemerge: | |
242 | [merge-tools] |
|
238 | [merge-tools] | |
243 | false.whatever= |
|
239 | false.whatever= | |
244 | true.priority=1 |
|
240 | true.priority=1 | |
245 | true.executable=cat |
|
241 | true.executable=cat | |
246 | # hg update -C 1 |
|
242 | # hg update -C 1 | |
247 | # hg merge -r 3 |
|
243 | # hg merge -r 3 | |
248 | merging f |
|
244 | merging f | |
249 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
245 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
250 | (branch merge, don't forget to commit) |
|
246 | (branch merge, don't forget to commit) | |
251 | # cat f |
|
247 | # cat f | |
252 | revision 1 |
|
248 | revision 1 | |
253 | space |
|
249 | space | |
254 | revision 3 |
|
250 | revision 3 | |
255 | # hg stat |
|
251 | # hg stat | |
256 | M f |
|
252 | M f | |
257 |
|
253 | |||
258 | # .premerge=True is same: |
|
254 | # .premerge=True is same: | |
259 | [merge-tools] |
|
255 | [merge-tools] | |
260 | false.whatever= |
|
256 | false.whatever= | |
261 | true.priority=1 |
|
257 | true.priority=1 | |
262 | true.executable=cat |
|
258 | true.executable=cat | |
263 | # hg update -C 1 |
|
259 | # hg update -C 1 | |
264 | # hg merge -r 3 --config merge-tools.true.premerge=True |
|
260 | # hg merge -r 3 --config merge-tools.true.premerge=True | |
265 | merging f |
|
261 | merging f | |
266 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
262 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
267 | (branch merge, don't forget to commit) |
|
263 | (branch merge, don't forget to commit) | |
268 | # cat f |
|
264 | # cat f | |
269 | revision 1 |
|
265 | revision 1 | |
270 | space |
|
266 | space | |
271 | revision 3 |
|
267 | revision 3 | |
272 | # hg stat |
|
268 | # hg stat | |
273 | M f |
|
269 | M f | |
274 |
|
270 | |||
275 | # .premerge=False executes merge-tool: |
|
271 | # .premerge=False executes merge-tool: | |
276 | [merge-tools] |
|
272 | [merge-tools] | |
277 | false.whatever= |
|
273 | false.whatever= | |
278 | true.priority=1 |
|
274 | true.priority=1 | |
279 | true.executable=cat |
|
275 | true.executable=cat | |
280 | # hg update -C 1 |
|
276 | # hg update -C 1 | |
281 | # hg merge -r 3 --config merge-tools.true.premerge=False |
|
277 | # hg merge -r 3 --config merge-tools.true.premerge=False | |
282 | revision 1 |
|
278 | revision 1 | |
283 | space |
|
279 | space | |
284 | revision 0 |
|
280 | revision 0 | |
285 | space |
|
281 | space | |
286 | revision 0 |
|
282 | revision 0 | |
287 | space |
|
283 | space | |
288 | revision 3 |
|
284 | revision 3 | |
289 | merging f |
|
285 | merging f | |
290 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
286 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
291 | (branch merge, don't forget to commit) |
|
287 | (branch merge, don't forget to commit) | |
292 | # cat f |
|
288 | # cat f | |
293 | revision 1 |
|
289 | revision 1 | |
294 | space |
|
290 | space | |
295 | # hg stat |
|
291 | # hg stat | |
296 | M f |
|
292 | M f | |
297 |
|
293 | |||
298 |
|
294 | |||
299 | Tool execution |
|
295 | Tool execution | |
300 |
|
296 | |||
301 | # set tools.args explicit to include $base $local $other $output: |
|
297 | # set tools.args explicit to include $base $local $other $output: | |
302 | [merge-tools] |
|
298 | [merge-tools] | |
303 | false.whatever= |
|
299 | false.whatever= | |
304 | true.priority=1 |
|
300 | true.priority=1 | |
305 | true.executable=cat |
|
301 | true.executable=cat | |
306 | # hg update -C 1 |
|
302 | # hg update -C 1 | |
307 | ==> ... <== |
|
303 | ==> ... <== | |
308 | revision 0 |
|
304 | revision 0 | |
309 | space |
|
305 | space | |
310 |
|
306 | |||
311 | ==> ... <== |
|
307 | ==> ... <== | |
312 | revision 1 |
|
308 | revision 1 | |
313 | space |
|
309 | space | |
314 |
|
310 | |||
315 | ==> ... <== |
|
311 | ==> ... <== | |
316 | revision 2 |
|
312 | revision 2 | |
317 | space |
|
313 | space | |
318 |
|
314 | |||
319 | ==> ... <== |
|
315 | ==> ... <== | |
320 | revision 1 |
|
316 | revision 1 | |
321 | space |
|
317 | space | |
322 | merging f |
|
318 | merging f | |
323 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
319 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
324 | (branch merge, don't forget to commit) |
|
320 | (branch merge, don't forget to commit) | |
325 | # cat f |
|
321 | # cat f | |
326 | revision 1 |
|
322 | revision 1 | |
327 | space |
|
323 | space | |
328 | # hg stat |
|
324 | # hg stat | |
329 | M f |
|
325 | M f | |
330 |
|
326 | |||
331 | # Merge with "echo mergeresult > $local": |
|
327 | # Merge with "echo mergeresult > $local": | |
332 | [merge-tools] |
|
328 | [merge-tools] | |
333 | false.whatever= |
|
329 | false.whatever= | |
334 | true.priority=1 |
|
330 | true.priority=1 | |
335 | true.executable=cat |
|
331 | true.executable=cat | |
336 | # hg update -C 1 |
|
332 | # hg update -C 1 | |
337 | merging f |
|
333 | merging f | |
338 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
334 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
339 | (branch merge, don't forget to commit) |
|
335 | (branch merge, don't forget to commit) | |
340 | # cat f |
|
336 | # cat f | |
341 | mergeresult |
|
337 | mergeresult | |
342 | # hg stat |
|
338 | # hg stat | |
343 | M f |
|
339 | M f | |
344 |
|
340 | |||
345 | # - and $local is the file f: |
|
341 | # - and $local is the file f: | |
346 | [merge-tools] |
|
342 | [merge-tools] | |
347 | false.whatever= |
|
343 | false.whatever= | |
348 | true.priority=1 |
|
344 | true.priority=1 | |
349 | true.executable=cat |
|
345 | true.executable=cat | |
350 | # hg update -C 1 |
|
346 | # hg update -C 1 | |
351 | merging f |
|
347 | merging f | |
352 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
348 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
353 | (branch merge, don't forget to commit) |
|
349 | (branch merge, don't forget to commit) | |
354 | # cat f |
|
350 | # cat f | |
355 | mergeresult |
|
351 | mergeresult | |
356 | # hg stat |
|
352 | # hg stat | |
357 | M f |
|
353 | M f | |
358 |
|
354 | |||
359 | # Merge with "echo mergeresult > $output" - the variable is a bit magic: |
|
355 | # Merge with "echo mergeresult > $output" - the variable is a bit magic: | |
360 | [merge-tools] |
|
356 | [merge-tools] | |
361 | false.whatever= |
|
357 | false.whatever= | |
362 | true.priority=1 |
|
358 | true.priority=1 | |
363 | true.executable=cat |
|
359 | true.executable=cat | |
364 | # hg update -C 1 |
|
360 | # hg update -C 1 | |
365 | merging f |
|
361 | merging f | |
366 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
362 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
367 | (branch merge, don't forget to commit) |
|
363 | (branch merge, don't forget to commit) | |
368 | # cat f |
|
364 | # cat f | |
369 | mergeresult |
|
365 | mergeresult | |
370 | # hg stat |
|
366 | # hg stat | |
371 | M f |
|
367 | M f | |
372 |
|
368 | |||
373 |
|
369 | |||
374 | Merge post-processing |
|
370 | Merge post-processing | |
375 |
|
371 | |||
376 | # cat is a bad merge-tool and doesn't change: |
|
372 | # cat is a bad merge-tool and doesn't change: | |
377 | [merge-tools] |
|
373 | [merge-tools] | |
378 | false.whatever= |
|
374 | false.whatever= | |
379 | true.priority=1 |
|
375 | true.priority=1 | |
380 | true.executable=cat |
|
376 | true.executable=cat | |
381 | # hg update -C 1 |
|
377 | # hg update -C 1 | |
382 | # hg merge -r 2 --config merge-tools.true.checkchanged=1 |
|
378 | # hg merge -r 2 --config merge-tools.true.checkchanged=1 | |
383 | revision 1 |
|
379 | revision 1 | |
384 | space |
|
380 | space | |
385 | revision 0 |
|
381 | revision 0 | |
386 | space |
|
382 | space | |
387 | revision 2 |
|
383 | revision 2 | |
388 | space |
|
384 | space | |
389 | merging f |
|
385 | merging f | |
390 | merging f failed! |
|
386 | merging f failed! | |
391 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
387 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
392 | use 'hg resolve' to retry unresolved file merges |
|
388 | use 'hg resolve' to retry unresolved file merges | |
393 | # cat f |
|
389 | # cat f | |
394 | revision 1 |
|
390 | revision 1 | |
395 | space |
|
391 | space | |
396 | # hg stat |
|
392 | # hg stat | |
397 | M f |
|
393 | M f | |
398 | ? f.orig |
|
394 | ? f.orig | |
399 |
|
395 |
General Comments 0
You need to be logged in to leave comments.
Login now