# HG changeset patch # User Yuya Nishihara # Date 2018-01-21 07:04:59 # Node ID db26e6a0a677377369e2741ecf29951417fe483b # Parent 1abf089a1d7009f0077af7a6e6dbab4e0ab249c9 graphlog: unblock --line-range option It should work now. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3420,11 +3420,6 @@ def log(ui, repo, *pats, **opts): repo = scmutil.unhidehashlikerevs(repo, opts.get('rev'), 'nowarn') revs, differ = logcmdutil.getrevs(repo, pats, opts) - - if opts.get('graph'): - if linerange: - raise error.Abort(_('graph not supported with line range patterns')) - if linerange: revs, differ = logcmdutil.getlinerangerevs(repo, revs, opts) diff --git a/tests/test-log-linerange.t b/tests/test-log-linerange.t --- a/tests/test-log-linerange.t +++ b/tests/test-log-linerange.t @@ -173,8 +173,76 @@ Add some changes with two diff hunks +4 $ hg log -f --graph -L foo,5:7 -p - abort: graph not supported with line range patterns - [255] + @ changeset: 5:cfdf972b3971 + | tag: tip + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: foo: 3 -> 3+ and 11+ -> 11-; bar: a -> a+ + | + | diff --git a/foo b/foo + | --- a/foo + | +++ b/foo + | @@ -4,7 +4,7 @@ + | 0 + | 1 + | 2+ + | -3 + | +3+ + | 4 + | 5 + | 6 + | + o changeset: 4:eaec41c1a0c9 + : user: test + : date: Thu Jan 01 00:00:00 1970 +0000 + : summary: 11 -> 11+; leading space before "1" + : + : diff --git a/foo b/foo + : --- a/foo + : +++ b/foo + : @@ -2,7 +2,7 @@ + : 0 + : 0 + : 0 + : -1 + : + 1 + : 2+ + : 3 + : 4 + : + o changeset: 2:63a884426fd0 + : user: test + : date: Thu Jan 01 00:00:00 1970 +0000 + : summary: 2 -> 2+; added bar + : + : diff --git a/foo b/foo + : --- a/foo + : +++ b/foo + : @@ -3,6 +3,6 @@ + : 0 + : 0 + : 1 + : -2 + : +2+ + : 3 + : 4 + : + o changeset: 0:5ae1f82b9a00 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: init + + diff --git a/foo b/foo + new file mode 100644 + --- /dev/null + +++ b/foo + @@ -0,0 +1,5 @@ + +0 + +1 + +2 + +3 + +4 + With --template.