For complicated historical reasons, Mercurial doesn't handle errors upon
writes to stdout or stderr correctly.

You can test this on a Linux box very easily. Correct behaviour involves
trying to print an error message, followed by an error exit:

$ /bin/echo a > /dev/full
/bin/echo: write error: No space left on device

Meanwhile, Mercurial goes "what, me worry?":

$ hg status >/dev/full
$ echo $?
0

Eek!

I have a patch series that purports to fix this, but /dev/full is a
Linux-specific thing, and I am scratching my head over how to test the fix
portably.

So far, the "best" idea I have is to create a fake file object that raises
an ENOSPC IOError upon flush, but by the time I can use the extension
mechanism to cram this into place, the early dispatch code already has the
stdio handles stuffed away the request object, which extension code can't
get at.

If you have any better ideas, I'm all ... eyes?
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to