Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 48030:7d908ee19b5b
errors: use InputError for some invalid revsets and such
Differential Revision: https://phab.mercurial-scm.org/D11496
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 23 Sep 2021 09:38:45 -0700 |
parents | 76dccbbe73fd |
children | 12966768595a |
comparison
equal
deleted
inserted
replaced
48029:f82c4e8afe5c | 48030:7d908ee19b5b |
---|---|
1079 node, p2 = repo.dirstate.parents() | 1079 node, p2 = repo.dirstate.parents() |
1080 if p2 != repo.nullid: | 1080 if p2 != repo.nullid: |
1081 raise error.StateError(_(b'current bisect revision is a merge')) | 1081 raise error.StateError(_(b'current bisect revision is a merge')) |
1082 if rev: | 1082 if rev: |
1083 if not nodes: | 1083 if not nodes: |
1084 raise error.Abort(_(b'empty revision set')) | 1084 raise error.InputError(_(b'empty revision set')) |
1085 node = repo[nodes[-1]].node() | 1085 node = repo[nodes[-1]].node() |
1086 with hbisect.restore_state(repo, state, node): | 1086 with hbisect.restore_state(repo, state, node): |
1087 while changesets: | 1087 while changesets: |
1088 # update state | 1088 # update state |
1089 state[b'current'] = [node] | 1089 state[b'current'] = [node] |