##// END OF EJS Templates
windows: fix incorrect detection of broken pipe when writing to pager...
windows: fix incorrect detection of broken pipe when writing to pager Paging e.g. hg incoming on Windows and quitting the pager before the output is consumed will print 'abort: Invalid argument'. This is because the windows error 0xE8 (ERROR_NO_DATA) is mapped to EINVAL even though it is documented as 'The pipe is being closed'. Note that this fix assumes that Windows' last error code is still valid in the exception handler. It works correctly in all my tests. A simpler fix would be to just map EINVAL to EPIPE, like was done is flush previously, but that would be less precise. This error was not observed previously, when pager was an extension.

File last commit:

r19613:4bfd3c71 default
r38575:3a0f322a stable
Show More
9mail
26 lines | 277 B | text/plain | TextLexer
Jeff Sickel
9mail: new script to add support for Plan 9 upas/marshal email wrapper
r19613 #!/bin/rc
# 9mail - Mercurial email wrapper for upas/marshal
fn usage {
echo >[1=2] usage: mercurial/9mail -f from to [cc]
exit usage
}
from=()
cc=()
to=()
switch($1){
case -f
from=$2
case *
usage
}
to=($3)
if(~ $#* 4)
cc=(-C $4)
upasname=$from
upas/marshal $cc $to