Mercurial > hg
comparison mercurial/commands.py @ 14291:1a791993ce59
cmdutil: make_file to makefileobj
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 10 May 2011 16:08:47 -0500 |
parents | 86e70956da4f |
children | 2daa5179e73f |
comparison
equal
deleted
inserted
replaced
14290:86e70956da4f | 14291:1a791993ce59 |
---|---|
746 """ | 746 """ |
747 ctx = cmdutil.revsingle(repo, opts.get('rev')) | 747 ctx = cmdutil.revsingle(repo, opts.get('rev')) |
748 err = 1 | 748 err = 1 |
749 m = cmdutil.match(repo, (file1,) + pats, opts) | 749 m = cmdutil.match(repo, (file1,) + pats, opts) |
750 for abs in ctx.walk(m): | 750 for abs in ctx.walk(m): |
751 fp = cmdutil.make_file(repo, opts.get('output'), ctx.node(), pathname=abs) | 751 fp = cmdutil.makefileobj(repo, opts.get('output'), ctx.node(), |
752 pathname=abs) | |
752 data = ctx[abs].data() | 753 data = ctx[abs].data() |
753 if opts.get('decode'): | 754 if opts.get('decode'): |
754 data = repo.wwritedata(abs, data) | 755 data = repo.wwritedata(abs, data) |
755 fp.write(data) | 756 fp.write(data) |
756 fp.close() | 757 fp.close() |