comparison mercurial/cmdutil.py @ 48130:5105a9975407

errors: raise InputError from revsingle() iff revset provided by the user Same reasoning as for `revrange()` in an earlier patch. Differential Revision: https://phab.mercurial-scm.org/D11562
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 28 Sep 2021 15:11:22 -0700
parents 5ced12cfa41b
children c62e4397eb28
comparison
equal deleted inserted replaced
48129:b74e128676d4 48130:5105a9975407
1478 if rev: 1478 if rev:
1479 if not forget and not after: 1479 if not forget and not after:
1480 # TODO: Remove this restriction and make it also create the copy 1480 # TODO: Remove this restriction and make it also create the copy
1481 # targets (and remove the rename source if rename==True). 1481 # targets (and remove the rename source if rename==True).
1482 raise error.InputError(_(b'--at-rev requires --after')) 1482 raise error.InputError(_(b'--at-rev requires --after'))
1483 ctx = scmutil.revsingle(repo, rev) 1483 ctx = logcmdutil.revsingle(repo, rev)
1484 if len(ctx.parents()) > 1: 1484 if len(ctx.parents()) > 1:
1485 raise error.InputError( 1485 raise error.InputError(
1486 _(b'cannot mark/unmark copy in merge commit') 1486 _(b'cannot mark/unmark copy in merge commit')
1487 ) 1487 )
1488 else: 1488 else: