comparison tests/test-log-linerange.t @ 34906:2e45bbd3db7b

log: disable bare file patterns with --line-range Currently, specifying both a line-range pattern and a bare file pattern results in an AND operation whereas we probably want an OR so that bare file patterns are like a line-range pattern with all lines specified. So, until this works as expected, we disable this.
author Denis Laxalde <denis.laxalde@logilab.fr>
date Thu, 19 Oct 2017 14:12:49 +0200
parents 5c7dbb730179
children 0ccfc468423a
comparison
equal deleted inserted replaced
34905:5c7dbb730179 34906:2e45bbd3db7b
286 +2 286 +2
287 +3 287 +3
288 +4 288 +4
289 289
290 290
291 Regular file patterns are allowed with -L and their diff shows all lines. 291 Regular file patterns are not allowed.
292 292
293 $ hg log -f -L foo,5:7 -p bar 293 $ hg log -f -L foo,5:7 -p bar
294 changeset: 5:cfdf972b3971 294 abort: FILE arguments are not compatible with --line-range option
295 tag: tip 295 [255]
296 user: test
297 date: Thu Jan 01 00:00:00 1970 +0000
298 summary: foo: 3 -> 3+ and 11+ -> 11-; bar: a -> a+
299
300 diff --git a/bar b/bar
301 --- a/bar
302 +++ b/bar
303 @@ -1,4 +1,4 @@
304 -a
305 +a+
306 b
307 c
308 d
309 diff --git a/foo b/foo
310 --- a/foo
311 +++ b/foo
312 @@ -4,7 +4,7 @@
313 0
314 1
315 2+
316 -3
317 +3+
318 4
319 5
320 6
321
322 changeset: 2:63a884426fd0
323 user: test
324 date: Thu Jan 01 00:00:00 1970 +0000
325 summary: 2 -> 2+; added bar
326
327 diff --git a/bar b/bar
328 new file mode 100644
329 --- /dev/null
330 +++ b/bar
331 @@ -0,0 +1,5 @@
332 +a
333 +b
334 +c
335 +d
336 +e
337 diff --git a/foo b/foo
338 --- a/foo
339 +++ b/foo
340 @@ -3,6 +3,6 @@
341 0
342 0
343 1
344 -2
345 +2+
346 3
347 4
348
349 296
350 Option --rev acts as a restriction. 297 Option --rev acts as a restriction.
351 298
352 $ hg log -f -L foo,5:7 -p -r 'desc(2)' 299 $ hg log -f -L foo,5:7 -p -r 'desc(2)'
353 changeset: 2:63a884426fd0 300 changeset: 2:63a884426fd0