comparison mercurial/debugcommands.py @ 36586:ff6b8484400b

debugcommands: add an r prefix to make file mode for fdopen a sysstr # skip-blame just an r prefix Differential Revision: https://phab.mercurial-scm.org/D2562
author Augie Fackler <augie@google.com>
date Fri, 02 Mar 2018 14:10:34 -0500
parents 149fd142f498
children dfcf589a4031
comparison
equal deleted inserted replaced
36585:26a6b62919e2 36586:ff6b8484400b
2255 if opts['logiofd'] and opts['logiofile']: 2255 if opts['logiofd'] and opts['logiofile']:
2256 raise error.Abort(_('cannot use both --logiofd and --logiofile')) 2256 raise error.Abort(_('cannot use both --logiofd and --logiofile'))
2257 2257
2258 if opts['logiofd']: 2258 if opts['logiofd']:
2259 # Line buffered because output is line based. 2259 # Line buffered because output is line based.
2260 logfh = os.fdopen(int(opts['logiofd']), 'ab', 1) 2260 logfh = os.fdopen(int(opts['logiofd']), r'ab', 1)
2261 elif opts['logiofile']: 2261 elif opts['logiofile']:
2262 logfh = open(opts['logiofile'], 'ab', 1) 2262 logfh = open(opts['logiofile'], 'ab', 1)
2263 2263
2264 s = wireprotoserver.sshserver(ui, repo, logfh=logfh) 2264 s = wireprotoserver.sshserver(ui, repo, logfh=logfh)
2265 s.serve_forever() 2265 s.serve_forever()