comparison tests/test-annotate.t @ 32486:1df80eff24cf

annotate: add a new experimental --skip option to skip revs This option is most useful for mechanical code modifications, especially ones that retain the same number of lines.
author Siddharth Agarwal <sid0@fb.com>
date Wed, 24 May 2017 19:39:33 -0700
parents 2a2744dffecf
children 7a209737f01c
comparison
equal deleted inserted replaced
32485:05abc47f3746 32486:1df80eff24cf
214 1 a:3: a 214 1 a:3: a
215 3 b:4: b4 215 3 b:4: b4
216 4 b:5: c 216 4 b:5: c
217 3 b:5: b5 217 3 b:5: b5
218 7 b:7: d 218 7 b:7: d
219
220 --skip nothing (should be the same as no --skip at all)
221
222 $ hg annotate -nlf b --skip '1::0'
223 0 a:1: a
224 6 b:2: z
225 1 a:3: a
226 3 b:4: b4
227 4 b:5: c
228 3 b:5: b5
229 7 b:7: d
230
231 --skip a modified line
232
233 $ hg annotate -nlf b --skip 6
234 0 a:1: a
235 1 a:2: z
236 1 a:3: a
237 3 b:4: b4
238 4 b:5: c
239 3 b:5: b5
240 7 b:7: d
241
242 --skip added lines (and test multiple skip)
243
244 $ hg annotate -nlf b --skip 3
245 0 a:1: a
246 6 b:2: z
247 1 a:3: a
248 1 a:3: b4
249 4 b:5: c
250 1 a:3: b5
251 7 b:7: d
252
253 $ hg annotate -nlf b --skip 4
254 0 a:1: a
255 6 b:2: z
256 1 a:3: a
257 3 b:4: b4
258 1 a:3: c
259 3 b:5: b5
260 7 b:7: d
261
262 $ hg annotate -nlf b --skip 3 --skip 4
263 0 a:1: a
264 6 b:2: z
265 1 a:3: a
266 1 a:3: b4
267 1 a:3: c
268 1 a:3: b5
269 7 b:7: d
270
271 $ hg annotate -nlf b --skip 'merge()'
272 0 a:1: a
273 6 b:2: z
274 1 a:3: a
275 3 b:4: b4
276 4 b:5: c
277 3 b:5: b5
278 3 b:5: d
279
280 --skip everything -- use the revision the file was introduced in
281
282 $ hg annotate -nlf b --skip 'all()'
283 0 a:1: a
284 0 a:1: z
285 0 a:1: a
286 0 a:1: b4
287 0 a:1: c
288 0 a:1: b5
289 0 a:1: d
219 290
220 Issue2807: alignment of line numbers with -l 291 Issue2807: alignment of line numbers with -l
221 292
222 $ echo more >> b 293 $ echo more >> b
223 $ hg ci -mmore -d '5 0' 294 $ hg ci -mmore -d '5 0'