Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 6094:3998c1b0828f
cat --decode: Drop short option, use opts.get() instead of opts[]
- hg archive --no-decode has no short option, too, and maybe both could use
-d in the future to select revisions by date.
- opts.get makes python scripts calling cat() happy, because they don't have
to pass the new option.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Thu, 14 Feb 2008 11:25:30 +0100 |
parents | f5b00b6e426a |
children | cb2f7652ad1b |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Feb 09 13:05:22 2008 -0500 +++ b/mercurial/commands.py Thu Feb 14 11:25:30 2008 +0100 @@ -467,7 +467,7 @@ ctx.node()): fp = cmdutil.make_file(repo, opts['output'], ctx.node(), pathname=abs) data = ctx.filectx(abs).data() - if opts['decode']: + if opts.get('decode'): data = repo.wwritedata(abs, data) fp.write(data) err = 0 @@ -2768,7 +2768,7 @@ (cat, [('o', 'output', '', _('print output to file with formatted name')), ('r', 'rev', '', _('print the given revision')), - ('d', 'decode', None, _('apply any matching decode filter')), + ('', 'decode', None, _('apply any matching decode filter')), ] + walkopts, _('hg cat [OPTION]... FILE...')), "^clone":