comparison 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
comparison
equal deleted inserted replaced
6093:f5b00b6e426a 6094:3998c1b0828f
465 err = 1 465 err = 1
466 for src, abs, rel, exact in cmdutil.walk(repo, (file1,) + pats, opts, 466 for src, abs, rel, exact in cmdutil.walk(repo, (file1,) + pats, opts,
467 ctx.node()): 467 ctx.node()):
468 fp = cmdutil.make_file(repo, opts['output'], ctx.node(), pathname=abs) 468 fp = cmdutil.make_file(repo, opts['output'], ctx.node(), pathname=abs)
469 data = ctx.filectx(abs).data() 469 data = ctx.filectx(abs).data()
470 if opts['decode']: 470 if opts.get('decode'):
471 data = repo.wwritedata(abs, data) 471 data = repo.wwritedata(abs, data)
472 fp.write(data) 472 fp.write(data)
473 err = 0 473 err = 0
474 return err 474 return err
475 475
2766 _('hg bundle [-f] [-r REV]... [--base REV]... FILE [DEST]')), 2766 _('hg bundle [-f] [-r REV]... [--base REV]... FILE [DEST]')),
2767 "cat": 2767 "cat":
2768 (cat, 2768 (cat,
2769 [('o', 'output', '', _('print output to file with formatted name')), 2769 [('o', 'output', '', _('print output to file with formatted name')),
2770 ('r', 'rev', '', _('print the given revision')), 2770 ('r', 'rev', '', _('print the given revision')),
2771 ('d', 'decode', None, _('apply any matching decode filter')), 2771 ('', 'decode', None, _('apply any matching decode filter')),
2772 ] + walkopts, 2772 ] + walkopts,
2773 _('hg cat [OPTION]... FILE...')), 2773 _('hg cat [OPTION]... FILE...')),
2774 "^clone": 2774 "^clone":
2775 (clone, 2775 (clone,
2776 [('U', 'noupdate', None, _('do not update the new working directory')), 2776 [('U', 'noupdate', None, _('do not update the new working directory')),