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