Show More
@@ -1,277 +1,277 b'' | |||||
1 | Set vars: |
|
1 | Set vars: | |
2 |
|
2 | |||
3 | $ CONTRIBDIR="$TESTDIR/../contrib" |
|
3 | $ CONTRIBDIR="$TESTDIR/../contrib" | |
4 |
|
4 | |||
5 | Prepare repo-a: |
|
5 | Prepare repo-a: | |
6 |
|
6 | |||
7 | $ hg init repo-a |
|
7 | $ hg init repo-a | |
8 | $ cd repo-a |
|
8 | $ cd repo-a | |
9 |
|
9 | |||
10 | $ echo this is file a > a |
|
10 | $ echo this is file a > a | |
11 | $ hg add a |
|
11 | $ hg add a | |
12 | $ hg commit -m first |
|
12 | $ hg commit -m first | |
13 |
|
13 | |||
14 | $ echo adding to file a >> a |
|
14 | $ echo adding to file a >> a | |
15 | $ hg commit -m second |
|
15 | $ hg commit -m second | |
16 |
|
16 | |||
17 | $ echo adding more to file a >> a |
|
17 | $ echo adding more to file a >> a | |
18 | $ hg commit -m third |
|
18 | $ hg commit -m third | |
19 |
|
19 | |||
20 | $ hg verify |
|
20 | $ hg verify | |
21 | checking changesets |
|
21 | checking changesets | |
22 | checking manifests |
|
22 | checking manifests | |
23 | crosschecking files in changesets and manifests |
|
23 | crosschecking files in changesets and manifests | |
24 | checking files |
|
24 | checking files | |
25 | 1 files, 3 changesets, 3 total revisions |
|
25 | 1 files, 3 changesets, 3 total revisions | |
26 |
|
26 | |||
27 | Dumping revlog of file a to stdout: |
|
27 | Dumping revlog of file a to stdout: | |
28 |
|
28 | |||
29 | $ $PYTHON "$CONTRIBDIR/dumprevlog" .hg/store/data/a.i |
|
29 | $ $PYTHON "$CONTRIBDIR/dumprevlog" .hg/store/data/a.i | |
30 | file: .hg/store/data/a.i |
|
30 | file: .hg/store/data/a.i | |
31 | node: 183d2312b35066fb6b3b449b84efc370d50993d0 |
|
31 | node: 183d2312b35066fb6b3b449b84efc370d50993d0 | |
32 | linkrev: 0 |
|
32 | linkrev: 0 | |
33 | parents: 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 |
|
33 | parents: 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 | |
34 | length: 15 |
|
34 | length: 15 | |
35 | -start- |
|
35 | -start- | |
36 | this is file a |
|
36 | this is file a | |
37 |
|
37 | |||
38 | -end- |
|
38 | -end- | |
39 | node: b1047953b6e6b633c0d8197eaa5116fbdfd3095b |
|
39 | node: b1047953b6e6b633c0d8197eaa5116fbdfd3095b | |
40 | linkrev: 1 |
|
40 | linkrev: 1 | |
41 | parents: 183d2312b35066fb6b3b449b84efc370d50993d0 0000000000000000000000000000000000000000 |
|
41 | parents: 183d2312b35066fb6b3b449b84efc370d50993d0 0000000000000000000000000000000000000000 | |
42 | length: 32 |
|
42 | length: 32 | |
43 | -start- |
|
43 | -start- | |
44 | this is file a |
|
44 | this is file a | |
45 | adding to file a |
|
45 | adding to file a | |
46 |
|
46 | |||
47 | -end- |
|
47 | -end- | |
48 | node: 8c4fd1f7129b8cdec6c7f58bf48fb5237a4030c1 |
|
48 | node: 8c4fd1f7129b8cdec6c7f58bf48fb5237a4030c1 | |
49 | linkrev: 2 |
|
49 | linkrev: 2 | |
50 | parents: b1047953b6e6b633c0d8197eaa5116fbdfd3095b 0000000000000000000000000000000000000000 |
|
50 | parents: b1047953b6e6b633c0d8197eaa5116fbdfd3095b 0000000000000000000000000000000000000000 | |
51 | length: 54 |
|
51 | length: 54 | |
52 | -start- |
|
52 | -start- | |
53 | this is file a |
|
53 | this is file a | |
54 | adding to file a |
|
54 | adding to file a | |
55 | adding more to file a |
|
55 | adding more to file a | |
56 |
|
56 | |||
57 | -end- |
|
57 | -end- | |
58 |
|
58 | |||
59 | Dump all revlogs to file repo.dump: |
|
59 | Dump all revlogs to file repo.dump: | |
60 |
|
60 | |||
61 | $ find .hg/store -name "*.i" | sort | xargs $PYTHON "$CONTRIBDIR/dumprevlog" > ../repo.dump |
|
61 | $ find .hg/store -name "*.i" | sort | xargs $PYTHON "$CONTRIBDIR/dumprevlog" > ../repo.dump | |
62 | $ cd .. |
|
62 | $ cd .. | |
63 |
|
63 | |||
64 | Undumping into repo-b: |
|
64 | Undumping into repo-b: | |
65 |
|
65 | |||
66 | $ hg init repo-b |
|
66 | $ hg init repo-b | |
67 | $ cd repo-b |
|
67 | $ cd repo-b | |
68 | $ $PYTHON "$CONTRIBDIR/undumprevlog" < ../repo.dump |
|
68 | $ $PYTHON "$CONTRIBDIR/undumprevlog" < ../repo.dump | |
69 | .hg/store/00changelog.i |
|
69 | .hg/store/00changelog.i | |
70 | .hg/store/00manifest.i |
|
70 | .hg/store/00manifest.i | |
71 | .hg/store/data/a.i |
|
71 | .hg/store/data/a.i | |
72 | $ cd .. |
|
72 | $ cd .. | |
73 |
|
73 | |||
74 | Rebuild fncache with clone --pull: |
|
74 | Rebuild fncache with clone --pull: | |
75 |
|
75 | |||
76 | $ hg clone --pull -U repo-b repo-c |
|
76 | $ hg clone --pull -U repo-b repo-c | |
77 | requesting all changes |
|
77 | requesting all changes | |
78 | adding changesets |
|
78 | adding changesets | |
79 | adding manifests |
|
79 | adding manifests | |
80 | adding file changes |
|
80 | adding file changes | |
81 | added 3 changesets with 3 changes to 1 files |
|
81 | added 3 changesets with 3 changes to 1 files | |
82 | new changesets de1da620e7d8:46946d278c50 |
|
82 | new changesets de1da620e7d8:46946d278c50 | |
83 |
|
83 | |||
84 | Verify: |
|
84 | Verify: | |
85 |
|
85 | |||
86 | $ hg -R repo-c verify |
|
86 | $ hg -R repo-c verify | |
87 | checking changesets |
|
87 | checking changesets | |
88 | checking manifests |
|
88 | checking manifests | |
89 | crosschecking files in changesets and manifests |
|
89 | crosschecking files in changesets and manifests | |
90 | checking files |
|
90 | checking files | |
91 | 1 files, 3 changesets, 3 total revisions |
|
91 | 1 files, 3 changesets, 3 total revisions | |
92 |
|
92 | |||
93 | Compare repos: |
|
93 | Compare repos: | |
94 |
|
94 | |||
95 | $ hg -R repo-c incoming repo-a |
|
95 | $ hg -R repo-c incoming repo-a | |
96 | comparing with repo-a |
|
96 | comparing with repo-a | |
97 | searching for changes |
|
97 | searching for changes | |
98 | no changes found |
|
98 | no changes found | |
99 | [1] |
|
99 | [1] | |
100 |
|
100 | |||
101 | $ hg -R repo-a incoming repo-c |
|
101 | $ hg -R repo-a incoming repo-c | |
102 | comparing with repo-c |
|
102 | comparing with repo-c | |
103 | searching for changes |
|
103 | searching for changes | |
104 | no changes found |
|
104 | no changes found | |
105 | [1] |
|
105 | [1] | |
106 |
|
106 | |||
107 | Test simplemerge command: |
|
107 | Test simplemerge command: | |
108 |
|
108 | |||
109 | $ cp "$CONTRIBDIR/simplemerge" . |
|
109 | $ cp "$CONTRIBDIR/simplemerge" . | |
110 | $ echo base > base |
|
110 | $ echo base > base | |
111 | $ echo local > local |
|
111 | $ echo local > local | |
112 | $ cat base >> local |
|
112 | $ cat base >> local | |
113 | $ cp local orig |
|
113 | $ cp local orig | |
114 | $ cat base > other |
|
114 | $ cat base > other | |
115 | $ echo other >> other |
|
115 | $ echo other >> other | |
116 |
|
116 | |||
117 | changing local directly |
|
117 | changing local directly | |
118 |
|
118 | |||
119 | $ $PYTHON simplemerge local base other && echo "merge succeeded" |
|
119 | $ $PYTHON simplemerge local base other && echo "merge succeeded" | |
120 | merge succeeded |
|
120 | merge succeeded | |
121 | $ cat local |
|
121 | $ cat local | |
122 | local |
|
122 | local | |
123 | base |
|
123 | base | |
124 | other |
|
124 | other | |
125 | $ cp orig local |
|
125 | $ cp orig local | |
126 |
|
126 | |||
127 | printing to stdout |
|
127 | printing to stdout | |
128 |
|
128 | |||
129 | $ $PYTHON simplemerge -p local base other |
|
129 | $ $PYTHON simplemerge -p local base other | |
130 | local |
|
130 | local | |
131 | base |
|
131 | base | |
132 | other |
|
132 | other | |
133 |
|
133 | |||
134 | local: |
|
134 | local: | |
135 |
|
135 | |||
136 | $ cat local |
|
136 | $ cat local | |
137 | local |
|
137 | local | |
138 | base |
|
138 | base | |
139 |
|
139 | |||
140 | conflicts |
|
140 | conflicts | |
141 |
|
141 | |||
142 | $ cp base conflict-local |
|
142 | $ cp base conflict-local | |
143 | $ cp other conflict-other |
|
143 | $ cp other conflict-other | |
144 | $ echo not other >> conflict-local |
|
144 | $ echo not other >> conflict-local | |
145 | $ echo end >> conflict-local |
|
145 | $ echo end >> conflict-local | |
146 | $ echo end >> conflict-other |
|
146 | $ echo end >> conflict-other | |
147 |
|
147 | |||
148 | $ $PYTHON simplemerge -p conflict-local base conflict-other |
|
148 | $ $PYTHON simplemerge -p conflict-local base conflict-other | |
149 | base |
|
149 | base | |
150 | <<<<<<< conflict-local |
|
150 | <<<<<<< conflict-local | |
151 | not other |
|
151 | not other | |
152 | ======= |
|
152 | ======= | |
153 | other |
|
153 | other | |
154 | >>>>>>> conflict-other |
|
154 | >>>>>>> conflict-other | |
155 | end |
|
155 | end | |
156 | [1] |
|
156 | [1] | |
157 |
|
157 | |||
158 | 1 label |
|
158 | 1 label | |
159 |
|
159 | |||
160 | $ $PYTHON simplemerge -p -L foo conflict-local base conflict-other |
|
160 | $ $PYTHON simplemerge -p -L foo conflict-local base conflict-other | |
161 | base |
|
161 | base | |
162 | <<<<<<< foo |
|
162 | <<<<<<< foo | |
163 | not other |
|
163 | not other | |
164 | ======= |
|
164 | ======= | |
165 | other |
|
165 | other | |
166 | >>>>>>> conflict-other |
|
166 | >>>>>>> conflict-other | |
167 | end |
|
167 | end | |
168 | [1] |
|
168 | [1] | |
169 |
|
169 | |||
170 | 2 labels |
|
170 | 2 labels | |
171 |
|
171 | |||
172 | $ $PYTHON simplemerge -p -L foo -L bar conflict-local base conflict-other |
|
172 | $ $PYTHON simplemerge -p -L foo -L bar conflict-local base conflict-other | |
173 | base |
|
173 | base | |
174 | <<<<<<< foo |
|
174 | <<<<<<< foo | |
175 | not other |
|
175 | not other | |
176 | ======= |
|
176 | ======= | |
177 | other |
|
177 | other | |
178 | >>>>>>> bar |
|
178 | >>>>>>> bar | |
179 | end |
|
179 | end | |
180 | [1] |
|
180 | [1] | |
181 |
|
181 | |||
182 | 3 labels |
|
182 | 3 labels | |
183 |
|
183 | |||
184 | $ $PYTHON simplemerge -p -L foo -L bar -L base conflict-local base conflict-other |
|
184 | $ $PYTHON simplemerge -p -L foo -L bar -L base conflict-local base conflict-other | |
185 | base |
|
185 | base | |
186 | <<<<<<< foo |
|
186 | <<<<<<< foo | |
187 | not other |
|
187 | not other | |
188 | end |
|
188 | end | |
189 | ||||||| base |
|
189 | ||||||| base | |
190 | ======= |
|
190 | ======= | |
191 | other |
|
191 | other | |
192 | end |
|
192 | end | |
193 | >>>>>>> bar |
|
193 | >>>>>>> bar | |
194 | [1] |
|
194 | [1] | |
195 |
|
195 | |||
196 | too many labels |
|
196 | too many labels | |
197 |
|
197 | |||
198 | $ $PYTHON simplemerge -p -L foo -L bar -L baz -L buz conflict-local base conflict-other |
|
198 | $ $PYTHON simplemerge -p -L foo -L bar -L baz -L buz conflict-local base conflict-other | |
199 | abort: can only specify three labels. |
|
199 | abort: can only specify three labels. | |
200 | [255] |
|
200 | [255] | |
201 |
|
201 | |||
202 | binary file |
|
202 | binary file | |
203 |
|
203 | |||
204 |
$ $PYTHON -c "f = |
|
204 | $ $PYTHON -c "f = open('binary-local', 'w'); f.write('\x00'); f.close()" | |
205 | $ cat orig >> binary-local |
|
205 | $ cat orig >> binary-local | |
206 | $ $PYTHON simplemerge -p binary-local base other |
|
206 | $ $PYTHON simplemerge -p binary-local base other | |
207 | warning: binary-local looks like a binary file. |
|
207 | warning: binary-local looks like a binary file. | |
208 | [1] |
|
208 | [1] | |
209 |
|
209 | |||
210 | binary file --text |
|
210 | binary file --text | |
211 |
|
211 | |||
212 | $ $PYTHON simplemerge -a -p binary-local base other 2>&1 |
|
212 | $ $PYTHON simplemerge -a -p binary-local base other 2>&1 | |
213 | warning: binary-local looks like a binary file. |
|
213 | warning: binary-local looks like a binary file. | |
214 | \x00local (esc) |
|
214 | \x00local (esc) | |
215 | base |
|
215 | base | |
216 | other |
|
216 | other | |
217 |
|
217 | |||
218 | help |
|
218 | help | |
219 |
|
219 | |||
220 | $ $PYTHON simplemerge --help |
|
220 | $ $PYTHON simplemerge --help | |
221 | simplemerge [OPTS] LOCAL BASE OTHER |
|
221 | simplemerge [OPTS] LOCAL BASE OTHER | |
222 |
|
222 | |||
223 | Simple three-way file merge utility with a minimal feature set. |
|
223 | Simple three-way file merge utility with a minimal feature set. | |
224 |
|
224 | |||
225 | Apply to LOCAL the changes necessary to go from BASE to OTHER. |
|
225 | Apply to LOCAL the changes necessary to go from BASE to OTHER. | |
226 |
|
226 | |||
227 | By default, LOCAL is overwritten with the results of this operation. |
|
227 | By default, LOCAL is overwritten with the results of this operation. | |
228 |
|
228 | |||
229 | options: |
|
229 | options: | |
230 | -L --label labels to use on conflict markers |
|
230 | -L --label labels to use on conflict markers | |
231 | -a --text treat all files as text |
|
231 | -a --text treat all files as text | |
232 | -p --print print results instead of overwriting LOCAL |
|
232 | -p --print print results instead of overwriting LOCAL | |
233 | --no-minimal no effect (DEPRECATED) |
|
233 | --no-minimal no effect (DEPRECATED) | |
234 | -h --help display help and exit |
|
234 | -h --help display help and exit | |
235 | -q --quiet suppress output |
|
235 | -q --quiet suppress output | |
236 |
|
236 | |||
237 | wrong number of arguments |
|
237 | wrong number of arguments | |
238 |
|
238 | |||
239 | $ $PYTHON simplemerge |
|
239 | $ $PYTHON simplemerge | |
240 | simplemerge: wrong number of arguments |
|
240 | simplemerge: wrong number of arguments | |
241 | simplemerge [OPTS] LOCAL BASE OTHER |
|
241 | simplemerge [OPTS] LOCAL BASE OTHER | |
242 |
|
242 | |||
243 | Simple three-way file merge utility with a minimal feature set. |
|
243 | Simple three-way file merge utility with a minimal feature set. | |
244 |
|
244 | |||
245 | Apply to LOCAL the changes necessary to go from BASE to OTHER. |
|
245 | Apply to LOCAL the changes necessary to go from BASE to OTHER. | |
246 |
|
246 | |||
247 | By default, LOCAL is overwritten with the results of this operation. |
|
247 | By default, LOCAL is overwritten with the results of this operation. | |
248 |
|
248 | |||
249 | options: |
|
249 | options: | |
250 | -L --label labels to use on conflict markers |
|
250 | -L --label labels to use on conflict markers | |
251 | -a --text treat all files as text |
|
251 | -a --text treat all files as text | |
252 | -p --print print results instead of overwriting LOCAL |
|
252 | -p --print print results instead of overwriting LOCAL | |
253 | --no-minimal no effect (DEPRECATED) |
|
253 | --no-minimal no effect (DEPRECATED) | |
254 | -h --help display help and exit |
|
254 | -h --help display help and exit | |
255 | -q --quiet suppress output |
|
255 | -q --quiet suppress output | |
256 | [1] |
|
256 | [1] | |
257 |
|
257 | |||
258 | bad option |
|
258 | bad option | |
259 |
|
259 | |||
260 | $ $PYTHON simplemerge --foo -p local base other |
|
260 | $ $PYTHON simplemerge --foo -p local base other | |
261 | simplemerge: option --foo not recognized |
|
261 | simplemerge: option --foo not recognized | |
262 | simplemerge [OPTS] LOCAL BASE OTHER |
|
262 | simplemerge [OPTS] LOCAL BASE OTHER | |
263 |
|
263 | |||
264 | Simple three-way file merge utility with a minimal feature set. |
|
264 | Simple three-way file merge utility with a minimal feature set. | |
265 |
|
265 | |||
266 | Apply to LOCAL the changes necessary to go from BASE to OTHER. |
|
266 | Apply to LOCAL the changes necessary to go from BASE to OTHER. | |
267 |
|
267 | |||
268 | By default, LOCAL is overwritten with the results of this operation. |
|
268 | By default, LOCAL is overwritten with the results of this operation. | |
269 |
|
269 | |||
270 | options: |
|
270 | options: | |
271 | -L --label labels to use on conflict markers |
|
271 | -L --label labels to use on conflict markers | |
272 | -a --text treat all files as text |
|
272 | -a --text treat all files as text | |
273 | -p --print print results instead of overwriting LOCAL |
|
273 | -p --print print results instead of overwriting LOCAL | |
274 | --no-minimal no effect (DEPRECATED) |
|
274 | --no-minimal no effect (DEPRECATED) | |
275 | -h --help display help and exit |
|
275 | -h --help display help and exit | |
276 | -q --quiet suppress output |
|
276 | -q --quiet suppress output | |
277 | [1] |
|
277 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now