##// END OF EJS Templates
cat --decode: Drop short option, use opts.get() instead of opts[]...
Thomas Arendsen Hein -
r6094:3998c1b0 default
parent child Browse files
Show More
@@ -467,7 +467,7 b' def cat(ui, 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
@@ -2768,7 +2768,7 b' table = {'
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":
@@ -21,7 +21,7 b' options:'
21
21
22 -o --output print output to file with formatted name
22 -o --output print output to file with formatted name
23 -r --rev print the given revision
23 -r --rev print the given revision
24 -d --decode apply any matching decode filter
24 --decode apply any matching decode filter
25 -I --include include names matching the given patterns
25 -I --include include names matching the given patterns
26 -X --exclude exclude names matching the given patterns
26 -X --exclude exclude names matching the given patterns
27
27
@@ -35,8 +35,8 b' gunzip < a.gz'
35
35
36 echo %% check hg cat operation
36 echo %% check hg cat operation
37 hg cat a.gz
37 hg cat a.gz
38 hg cat -d a.gz | gunzip
38 hg cat --decode a.gz | gunzip
39 mkdir subdir
39 mkdir subdir
40 cd subdir
40 cd subdir
41 hg -R .. cat ../a.gz
41 hg -R .. cat ../a.gz
42 hg -R .. cat -d ../a.gz | gunzip
42 hg -R .. cat --decode ../a.gz | gunzip
General Comments 0
You need to be logged in to leave comments. Login now