[MERGE][0.15] regression fix: on win32 broken pipe sometimes produce IOError traceback (with errno=22)
Alexander Belchenko
bialix at ukr.net
Wed Feb 28 18:45:49 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
May be something wrong with my own system, may be with 'less' utility,
but similar error I have and with built-in 'more' command.
Actually this regression I see during last 2 weeks,
but only today I wrote the fix.
On both Windows 2000 and Windows XP Home when I run bzr log|less in bzr.dev
source tree and then quit from 'less' I almost every time have this traceback:
C:\work\Bazaar\sandbox\bzr.dev>bzr log|less
bzr: ERROR: [Errno 22] Invalid argument
Traceback (most recent call last):
File "bzr", line 107, in <module>
sys.stdout.flush()
IOError: [Errno 22] Invalid argument
Sometimes I don't see first line, but there is probably race condition.
Attached patch fix this problem.
It's really strange and weird problem. I propose to suppress this error,
mostly because at the moment when it occurs, user don't care about
sys.stdout output, because he/she anyway quit the pager program.
- --
Alexander
PS. Here actual traceback for first error caught by bzr:
bzr arguments: [u'log']
looking for plugins in C:\work\Bazaar\plugins.work
looking for plugins in C:\work\Bazaar\sandbox\bzr.dev\bzrlib\plugins
Plugin name __init__ already loaded
Plugin name __init__ already loaded
encoding stdout as sys.stdin encoding 'cp866'
got branch format Bazaar-NG Metadir branch format 5
Traceback (most recent call last):
File "C:\work\Bazaar\sandbox\bzr.dev\bzrlib\commands.py", line 650, in run_bzr_catch_errors
return run_bzr(argv)
File "C:\work\Bazaar\sandbox\bzr.dev\bzrlib\commands.py", line 612, in run_bzr
ret = run(*run_argv)
File "C:\work\Bazaar\sandbox\bzr.dev\bzrlib\commands.py", line 304, in run_argv_aliases
return self.run(**all_cmd_args)
File "C:\work\Bazaar\sandbox\bzr.dev\bzrlib\commands.py", line 622, in ignore_pipe
result = func(*args, **kwargs)
File "C:\work\Bazaar\sandbox\bzr.dev\bzrlib\builtins.py", line 1607, in run
search=message)
File "C:/work/bazaar/sandbox/bzr.dev\bzrlib\log.py", line 154, in show_log
start_revision, end_revision, search)
File "C:/work/bazaar/sandbox/bzr.dev\bzrlib\log.py", line 274, in _show_log
lf.show_merge_revno(rev, merge_depth, revno)
File "C:/work/bazaar/sandbox/bzr.dev\bzrlib\log.py", line 356, in show_merge_revno
indent=' '*merge_depth, merged=True, delta=None)
File "C:/work/bazaar/sandbox/bzr.dev\bzrlib\log.py", line 375, in _show_helper
rev.properties['branch-nick']
File "C:\Python25\lib\codecs.py", line 304, in write
self.stream.write(data)
IOError: [Errno 22] Invalid argument
return code 3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFF5c3dzYr338mxwCURAgdCAJ9a17+NyYXiAgrNEkGCifUlRvED4ACfW7TG
XryGLodVM2/Zf4buQHNGNk4=
=byey
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: suppress.ioerror.22.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20070228/eef890b0/attachment-0001.diff
More information about the bazaar
mailing list