comparison hgext/record.py @ 23270:41c03b7592ed

util.system: use ui.system() in place of optional ui.fout parameter
author Yuya Nishihara <yuya@tcha.org>
date Sat, 08 Nov 2014 13:06:22 +0900
parents 75e7d4a0f135
children 486a1fe09422
comparison
equal deleted inserted replaced
23269:d9d8d2e0f701 23270:41c03b7592ed
326 chunk.write(f) 326 chunk.write(f)
327 f.write('\n'.join(['# ' + i for i in phelp.splitlines()])) 327 f.write('\n'.join(['# ' + i for i in phelp.splitlines()]))
328 f.close() 328 f.close()
329 # Start the editor and wait for it to complete 329 # Start the editor and wait for it to complete
330 editor = ui.geteditor() 330 editor = ui.geteditor()
331 util.system("%s \"%s\"" % (editor, patchfn), 331 ui.system("%s \"%s\"" % (editor, patchfn),
332 environ={'HGUSER': ui.username()}, 332 environ={'HGUSER': ui.username()},
333 onerr=util.Abort, errprefix=_("edit failed"), 333 onerr=util.Abort, errprefix=_("edit failed"))
334 out=ui.fout)
335 # Remove comment lines 334 # Remove comment lines
336 patchfp = open(patchfn) 335 patchfp = open(patchfn)
337 ncpatchfp = cStringIO.StringIO() 336 ncpatchfp = cStringIO.StringIO()
338 for line in patchfp: 337 for line in patchfp:
339 if not line.startswith('#'): 338 if not line.startswith('#'):