Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 615:ad2999fad721
Output file of 'export' is opened as binary (other OS)
# HG changeset patch
# User thananck@yahoo.com
# Node ID 7a240687674e6cf5a8dfd45973d7e3978b89af79
# Parent d2994b5298fb20f87dc1d4747635b280db3c0526
Output file of 'export' is opened as binary (other OS)
author | thananck@yahoo.com |
---|---|
date | Mon, 04 Jul 2005 12:22:21 -0800 |
parents | 6bff574d639f |
children | 285965ddca41 |
comparison
equal
deleted
inserted
replaced
614:6bff574d639f | 615:ad2999fad721 |
---|---|
503 i += 1 | 503 i += 1 |
504 return ''.join(newname) | 504 return ''.join(newname) |
505 | 505 |
506 if opts['output'] and opts['output'] != '-': | 506 if opts['output'] and opts['output'] != '-': |
507 try: | 507 try: |
508 fp = open(expand(opts['output']), 'w') | 508 fp = open(expand(opts['output']), 'wb') |
509 except KeyError, inst: | 509 except KeyError, inst: |
510 ui.warn("error: invalid format spec '%%%s' in output file name\n" % | 510 ui.warn("error: invalid format spec '%%%s' in output file name\n" % |
511 inst.args[0]) | 511 inst.args[0]) |
512 sys.exit(1) | 512 sys.exit(1) |
513 else: | 513 else: |