mercurial/commands.py
changeset 14291 1a791993ce59
parent 14290 86e70956da4f
child 14297 2daa5179e73f
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()