# HG changeset patch # User Martin von Zweigbergk # Date 1466792755 25200 # Node ID 26ac04a39e11dc9e875d3a9682fc99dd8826e217 # Parent 4f5531f8ac386d793f90ec52011b1c7821741ad0 debugdata: disallow trailing option with -c/-m Before this change, "hg debugdata -c 0 foo" was allowed. diff -r 4f5531f8ac38 -r 26ac04a39e11 mercurial/commands.py --- a/mercurial/commands.py Sun Jun 26 17:16:57 2016 +0900 +++ b/mercurial/commands.py Fri Jun 24 11:25:55 2016 -0700 @@ -2300,6 +2300,8 @@ def debugdata(ui, repo, file_, rev=None, **opts): """dump the contents of a data file revision""" if opts.get('changelog') or opts.get('manifest'): + if rev is not None: + raise error.CommandError('debugdata', _('invalid arguments')) file_, rev = None, file_ elif rev is None: raise error.CommandError('debugdata', _('invalid arguments'))