This instance will be upgraded to Heptapod 0.21.0rc3 on 2021-04-23 at 10:30 UTC+2 (a few minutes of down time)

Commit 66318c9e authored by Martin von Zweigbergk's avatar Martin von Zweigbergk

errors: raise InputError in `hg debugobsolete`

Differential Revision: https://phab.mercurial-scm.org/D9336
parent c8860a212770
......@@ -2253,7 +2253,7 @@ def debugobsolete(ui, repo, precursor=None, *successors, **opts):
raise TypeError()
return n
except TypeError:
raise error.Abort(
raise error.InputError(
b'changeset references must be full hexadecimal '
b'node identifiers'
)
......@@ -2264,7 +2264,7 @@ def debugobsolete(ui, repo, precursor=None, *successors, **opts):
try:
indices.append(int(v))
except ValueError:
raise error.Abort(
raise error.InputError(
_(b'invalid index value: %r') % v,
hint=_(b'use integers for indices'),
)
......@@ -2282,7 +2282,9 @@ def debugobsolete(ui, repo, precursor=None, *successors, **opts):
if precursor is not None:
if opts[b'rev']:
raise error.Abort(b'cannot select revision when creating marker')
raise error.InputError(
b'cannot select revision when creating marker'
)
metadata = {}
metadata[b'user'] = encoding.fromlocal(opts[b'user'] or ui.username())
succs = tuple(parsenodeid(succ) for succ in successors)
......
......@@ -47,10 +47,10 @@ Killing a single changeset without replacement
$ hg debugobsolete 0
abort: changeset references must be full hexadecimal node identifiers
[255]
[10]
$ hg debugobsolete '00'
abort: changeset references must be full hexadecimal node identifiers
[255]
[10]
$ hg debugobsolete -d '0 0' `getid kill_me` -u babar
1 new obsolescence markers
obsoleted 1 changesets
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment