##// END OF EJS Templates
fix test broken in merge from stable
Sune Foldager -
r14330:473d0aaf default
parent child Browse files
Show More
@@ -1,302 +1,302
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
82
83 Verify:
83 Verify:
84
84
85 $ hg -R repo-c verify
85 $ hg -R repo-c verify
86 checking changesets
86 checking changesets
87 checking manifests
87 checking manifests
88 crosschecking files in changesets and manifests
88 crosschecking files in changesets and manifests
89 checking files
89 checking files
90 1 files, 3 changesets, 3 total revisions
90 1 files, 3 changesets, 3 total revisions
91
91
92 Compare repos:
92 Compare repos:
93
93
94 $ hg -R repo-c incoming repo-a
94 $ hg -R repo-c incoming repo-a
95 comparing with repo-a
95 comparing with repo-a
96 searching for changes
96 searching for changes
97 no changes found
97 no changes found
98 [1]
98 [1]
99
99
100 $ hg -R repo-a incoming repo-c
100 $ hg -R repo-a incoming repo-c
101 comparing with repo-c
101 comparing with repo-c
102 searching for changes
102 searching for changes
103 no changes found
103 no changes found
104 [1]
104 [1]
105
105
106
106
107 Test shrink-revlog:
107 Test shrink-revlog:
108 $ cd repo-a
108 $ cd repo-a
109 $ hg --config extensions.shrink=$CONTRIBDIR/shrink-revlog.py shrink
109 $ hg --config extensions.shrink=$CONTRIBDIR/shrink-revlog.py shrink
110 shrinking $TESTTMP/repo-a/.hg/store/00manifest.i
110 shrinking $TESTTMP/repo-a/.hg/store/00manifest.i
111 reading revs
111 reading revs
112 sorting revs
112 sorting revs
113 writing revs
113 writing revs
114 old file size: 324 bytes ( 0.0 MiB)
114 old file size: 324 bytes ( 0.0 MiB)
115 new file size: 324 bytes ( 0.0 MiB)
115 new file size: 324 bytes ( 0.0 MiB)
116 shrinkage: 0.0% (1.0x)
116 shrinkage: 0.0% (1.0x)
117 note: old revlog saved in:
117 note: old revlog saved in:
118 $TESTTMP/repo-a/.hg/store/00manifest.i.old
118 $TESTTMP/repo-a/.hg/store/00manifest.i.old
119 $TESTTMP/repo-a/.hg/store/00manifest.d.old
119 $TESTTMP/repo-a/.hg/store/00manifest.d.old
120 (You can delete those files when you are satisfied that your
120 (You can delete those files when you are satisfied that your
121 repository is still sane. Running 'hg verify' is strongly recommended.)
121 repository is still sane. Running 'hg verify' is strongly recommended.)
122 $ hg verify
122 $ hg verify
123 checking changesets
123 checking changesets
124 checking manifests
124 checking manifests
125 crosschecking files in changesets and manifests
125 crosschecking files in changesets and manifests
126 checking files
126 checking files
127 1 files, 3 changesets, 3 total revisions
127 1 files, 3 changesets, 3 total revisions
128 $ cd ..
128 $ cd ..
129
129
130 Test simplemerge command:
130 Test simplemerge command:
131
131
132 $ cp "$CONTRIBDIR/simplemerge" .
132 $ cp "$CONTRIBDIR/simplemerge" .
133 $ echo base > base
133 $ echo base > base
134 $ echo local > local
134 $ echo local > local
135 $ cat base >> local
135 $ cat base >> local
136 $ cp local orig
136 $ cp local orig
137 $ cat base > other
137 $ cat base > other
138 $ echo other >> other
138 $ echo other >> other
139
139
140 changing local directly
140 changing local directly
141
141
142 $ python simplemerge local base other && echo "merge succeeded"
142 $ python simplemerge local base other && echo "merge succeeded"
143 merge succeeded
143 merge succeeded
144 $ cat local
144 $ cat local
145 local
145 local
146 base
146 base
147 other
147 other
148 $ cp orig local
148 $ cp orig local
149
149
150 printing to stdout
150 printing to stdout
151
151
152 $ python simplemerge -p local base other
152 $ python simplemerge -p local base other
153 local
153 local
154 base
154 base
155 other
155 other
156
156
157 local:
157 local:
158
158
159 $ cat local
159 $ cat local
160 local
160 local
161 base
161 base
162
162
163 conflicts
163 conflicts
164
164
165 $ cp base conflict-local
165 $ cp base conflict-local
166 $ cp other conflict-other
166 $ cp other conflict-other
167 $ echo not other >> conflict-local
167 $ echo not other >> conflict-local
168 $ echo end >> conflict-local
168 $ echo end >> conflict-local
169 $ echo end >> conflict-other
169 $ echo end >> conflict-other
170 $ python simplemerge -p conflict-local base conflict-other
170 $ python simplemerge -p conflict-local base conflict-other
171 base
171 base
172 <<<<<<< conflict-local
172 <<<<<<< conflict-local
173 not other
173 not other
174 =======
174 =======
175 other
175 other
176 >>>>>>> conflict-other
176 >>>>>>> conflict-other
177 end
177 end
178 warning: conflicts during merge.
178 warning: conflicts during merge.
179 [1]
179 [1]
180
180
181 --no-minimal
181 --no-minimal
182
182
183 $ python simplemerge -p --no-minimal conflict-local base conflict-other
183 $ python simplemerge -p --no-minimal conflict-local base conflict-other
184 base
184 base
185 <<<<<<< conflict-local
185 <<<<<<< conflict-local
186 not other
186 not other
187 end
187 end
188 =======
188 =======
189 other
189 other
190 end
190 end
191 >>>>>>> conflict-other
191 >>>>>>> conflict-other
192 warning: conflicts during merge.
192 warning: conflicts during merge.
193 [1]
193 [1]
194
194
195 1 label
195 1 label
196
196
197 $ python simplemerge -p -L foo conflict-local base conflict-other
197 $ python simplemerge -p -L foo conflict-local base conflict-other
198 base
198 base
199 <<<<<<< foo
199 <<<<<<< foo
200 not other
200 not other
201 =======
201 =======
202 other
202 other
203 >>>>>>> conflict-other
203 >>>>>>> conflict-other
204 end
204 end
205 warning: conflicts during merge.
205 warning: conflicts during merge.
206 [1]
206 [1]
207
207
208 2 labels
208 2 labels
209
209
210 $ python simplemerge -p -L foo -L bar conflict-local base conflict-other
210 $ python simplemerge -p -L foo -L bar conflict-local base conflict-other
211 base
211 base
212 <<<<<<< foo
212 <<<<<<< foo
213 not other
213 not other
214 =======
214 =======
215 other
215 other
216 >>>>>>> bar
216 >>>>>>> bar
217 end
217 end
218 warning: conflicts during merge.
218 warning: conflicts during merge.
219 [1]
219 [1]
220
220
221 too many labels
221 too many labels
222
222
223 $ python simplemerge -p -L foo -L bar -L baz conflict-local base conflict-other
223 $ python simplemerge -p -L foo -L bar -L baz conflict-local base conflict-other
224 abort: can only specify two labels.
224 abort: can only specify two labels.
225 [255]
225 [255]
226
226
227 binary file
227 binary file
228
228
229 $ python -c "f = file('binary-local', 'w'); f.write('\x00'); f.close()"
229 $ python -c "f = file('binary-local', 'w'); f.write('\x00'); f.close()"
230 $ cat orig >> binary-local
230 $ cat orig >> binary-local
231 $ python simplemerge -p binary-local base other
231 $ python simplemerge -p binary-local base other
232 abort: binary-local looks like a binary file.
232 warning: binary-local looks like a binary file.
233 [255]
233 [1]
234
234
235 binary file --text
235 binary file --text
236
236
237 $ python simplemerge -a -p binary-local base other 2>&1
237 $ python simplemerge -a -p binary-local base other 2>&1
238 warning: binary-local looks like a binary file.
238 warning: binary-local looks like a binary file.
239 \x00local (esc)
239 \x00local (esc)
240 base
240 base
241 other
241 other
242
242
243 help
243 help
244
244
245 $ python simplemerge --help
245 $ python simplemerge --help
246 simplemerge [OPTS] LOCAL BASE OTHER
246 simplemerge [OPTS] LOCAL BASE OTHER
247
247
248 Simple three-way file merge utility with a minimal feature set.
248 Simple three-way file merge utility with a minimal feature set.
249
249
250 Apply to LOCAL the changes necessary to go from BASE to OTHER.
250 Apply to LOCAL the changes necessary to go from BASE to OTHER.
251
251
252 By default, LOCAL is overwritten with the results of this operation.
252 By default, LOCAL is overwritten with the results of this operation.
253
253
254 options:
254 options:
255 -L --label labels to use on conflict markers
255 -L --label labels to use on conflict markers
256 -a --text treat all files as text
256 -a --text treat all files as text
257 -p --print print results instead of overwriting LOCAL
257 -p --print print results instead of overwriting LOCAL
258 --no-minimal do not try to minimize conflict regions
258 --no-minimal do not try to minimize conflict regions
259 -h --help display help and exit
259 -h --help display help and exit
260 -q --quiet suppress output
260 -q --quiet suppress output
261
261
262 wrong number of arguments
262 wrong number of arguments
263
263
264 $ python simplemerge
264 $ python simplemerge
265 simplemerge: wrong number of arguments
265 simplemerge: wrong number of arguments
266 simplemerge [OPTS] LOCAL BASE OTHER
266 simplemerge [OPTS] LOCAL BASE OTHER
267
267
268 Simple three-way file merge utility with a minimal feature set.
268 Simple three-way file merge utility with a minimal feature set.
269
269
270 Apply to LOCAL the changes necessary to go from BASE to OTHER.
270 Apply to LOCAL the changes necessary to go from BASE to OTHER.
271
271
272 By default, LOCAL is overwritten with the results of this operation.
272 By default, LOCAL is overwritten with the results of this operation.
273
273
274 options:
274 options:
275 -L --label labels to use on conflict markers
275 -L --label labels to use on conflict markers
276 -a --text treat all files as text
276 -a --text treat all files as text
277 -p --print print results instead of overwriting LOCAL
277 -p --print print results instead of overwriting LOCAL
278 --no-minimal do not try to minimize conflict regions
278 --no-minimal do not try to minimize conflict regions
279 -h --help display help and exit
279 -h --help display help and exit
280 -q --quiet suppress output
280 -q --quiet suppress output
281 [1]
281 [1]
282
282
283 bad option
283 bad option
284
284
285 $ python simplemerge --foo -p local base other
285 $ python simplemerge --foo -p local base other
286 simplemerge: option --foo not recognized
286 simplemerge: option --foo not recognized
287 simplemerge [OPTS] LOCAL BASE OTHER
287 simplemerge [OPTS] LOCAL BASE OTHER
288
288
289 Simple three-way file merge utility with a minimal feature set.
289 Simple three-way file merge utility with a minimal feature set.
290
290
291 Apply to LOCAL the changes necessary to go from BASE to OTHER.
291 Apply to LOCAL the changes necessary to go from BASE to OTHER.
292
292
293 By default, LOCAL is overwritten with the results of this operation.
293 By default, LOCAL is overwritten with the results of this operation.
294
294
295 options:
295 options:
296 -L --label labels to use on conflict markers
296 -L --label labels to use on conflict markers
297 -a --text treat all files as text
297 -a --text treat all files as text
298 -p --print print results instead of overwriting LOCAL
298 -p --print print results instead of overwriting LOCAL
299 --no-minimal do not try to minimize conflict regions
299 --no-minimal do not try to minimize conflict regions
300 -h --help display help and exit
300 -h --help display help and exit
301 -q --quiet suppress output
301 -q --quiet suppress output
302 [1]
302 [1]
General Comments 0
You need to be logged in to leave comments. Login now