Mercurial > hg
changeset 50547:003418163195
debug: slightly improve wording on the InputErrors from the previous patch
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 31 May 2023 12:00:21 -0300 |
parents | 2f5270af57c7 |
children | 720a23405fe9 |
files | mercurial/debugcommands.py |
diffstat | 1 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/debugcommands.py Wed May 31 11:30:33 2023 -0300 +++ b/mercurial/debugcommands.py Wed May 31 12:00:21 2023 -0300 @@ -711,10 +711,12 @@ opts = pycompat.byteskwargs(opts) if opts.get(b'changelog') or opts.get(b'manifest') or opts.get(b'dir'): if rev is not None: - raise error.InputError(_(b'invalid arguments')) + raise error.InputError( + _(b'cannot specify a revision with other arguments') + ) file_, rev = None, file_ elif rev is None: - raise error.InputError(_(b'invalid arguments')) + raise error.InputError(_(b'please specify a revision')) r = cmdutil.openstorage(repo, b'debugdata', file_, opts) try: ui.write(r.rawdata(r.lookup(rev))) @@ -2632,7 +2634,9 @@ """write and inspect on disk nodemap""" if opts.get('changelog') or opts.get('manifest') or opts.get('dir'): if file_ is not None: - raise error.InputError(_(b'invalid arguments')) + raise error.InputError( + _(b'cannot specify a file with other arguments') + ) elif file_ is None: opts['changelog'] = True r = cmdutil.openstorage( @@ -3561,10 +3565,12 @@ opts = pycompat.byteskwargs(opts) if opts.get(b'changelog') or opts.get(b'manifest') or opts.get(b'dir'): if rev is not None: - raise error.InputError(_(b'invalid arguments')) + raise error.InputError( + _(b'cannot specify a revision with other arguments') + ) file_, rev = None, file_ elif rev is None: - raise error.InputError(_(b'invalid arguments')) + raise error.InputError(_(b'please specify a revision')) r = cmdutil.openstorage(repo, b'debugdata', file_, opts) r = getattr(r, '_revlog', r) try: