diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -4716,6 +4716,9 @@ raise error.Abort( _(b'FILE arguments are not compatible with --line-range option') ) + copies = opts.get(b'copies') + if linerange and copies: + raise error.Abort(_(b'--line-range is incompatible with --copies')) repo = scmutil.unhidehashlikerevs(repo, opts.get(b'rev'), b'nowarn') revs, differ = logcmdutil.getrevs(repo, pats, opts) @@ -4725,7 +4728,7 @@ revs, differ = logcmdutil.getlinerangerevs(repo, revs, opts) getcopies = None - if opts.get(b'copies'): + if copies: endrev = None if revs: endrev = revs.max() + 1