comparison mercurial/patch.py @ 5481:003d1f174fe1

Fix Windows os.popen bug with interleaved stdout/stderr output See python bug 1366 "popen spawned process may not write to stdout under windows" for more details.
author Patrick Mezard <pmezard@gmail.com>
date Thu, 01 Nov 2007 12:05:14 +0100
parents bff41174563f
children e5eedd74e70f
comparison
equal deleted inserted replaced
5480:81bef3c355c5 5481:003d1f174fe1
247 returns whether patch was applied with fuzz factor.""" 247 returns whether patch was applied with fuzz factor."""
248 248
249 fuzz = False 249 fuzz = False
250 if cwd: 250 if cwd:
251 args.append('-d %s' % util.shellquote(cwd)) 251 args.append('-d %s' % util.shellquote(cwd))
252 fp = os.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip, 252 fp = util.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip,
253 util.shellquote(patchname))) 253 util.shellquote(patchname)))
254 254
255 for line in fp: 255 for line in fp:
256 line = line.rstrip() 256 line = line.rstrip()
257 ui.note(line + '\n') 257 ui.note(line + '\n')