# HG changeset patch # User Anton Shestakov # Date 2023-05-31 15:00:21 # Node ID 0034181631959e6b152c5f9dfae8c2536c8557c0 # Parent 2f5270af57c73e584aabda2c3afe58cb98d80582 debug: slightly improve wording on the InputErrors from the previous patch diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -711,10 +711,12 @@ def debugdata(ui, repo, file_, rev=None, 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 @@ def debugnodemap(ui, repo, file_=None, * """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 @@ def debugsidedata(ui, repo, file_, rev=N 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: