mercurial/debugcommands.py
changeset 36615 ff6b8484400b
parent 36607 149fd142f498
child 36616 dfcf589a4031
equal deleted inserted replaced
36614:26a6b62919e2 36615: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()