# HG changeset patch # User Benoit Boissinot # Date 1143152201 -3600 # Node ID 0541768fa558bed3a5df26aedb4fca44b5ee84bf # Parent 18a3e63696004ac7ba8f916349d11986a893a5f5 ignore EPIPE in ui.err_write It avoids not being able to abort a transaction when a push via ssh fails. Maybe some other place should ignore EPIPE too. diff -r 18a3e6369600 -r 0541768fa558 mercurial/ui.py --- a/mercurial/ui.py Tue Mar 21 23:31:04 2006 -0800 +++ b/mercurial/ui.py Thu Mar 23 23:16:41 2006 +0100 @@ -8,7 +8,7 @@ import ConfigParser from i18n import gettext as _ from demandload import * -demandload(globals(), "os re socket sys util tempfile") +demandload(globals(), "errno os re socket sys tempfile util") class ui(object): def __init__(self, verbose=False, debug=False, quiet=False, @@ -179,9 +179,13 @@ sys.stdout.write(str(a)) def write_err(self, *args): - if not sys.stdout.closed: sys.stdout.flush() - for a in args: - sys.stderr.write(str(a)) + try: + if not sys.stdout.closed: sys.stdout.flush() + for a in args: + sys.stderr.write(str(a)) + except IOError, inst: + if inst.errno != errno.EPIPE: + raise def flush(self): try: