debugdata: disallow trailing option with -c/-m
Before this change, "hg debugdata -c 0 foo" was allowed.
--- 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'))