On 10/24/07, Giovanni Bajo <[EMAIL PROTECTED]> wrote: > sys.stdin.isatty() is clearer IMO. All in all, maybe only try/except is > sufficient though...
Well, first, stdin isn't what we want -- stdout is. Second, sys.stdout is not necessarily fd 1, which is what stty will look at. Third, svnmerge_test.py replaces stdout with a cStringIO object, which doesn't have an isatty method. As for just using try/except: os.popen doesn't trap stderr, so ideally we'll avoid running stty in cases where we know it will fail, to avoid dumping spurious messages to the user's terminal. > os.putenv() changes also the environment for the whole svnmerge process > (it would be better to modify it only for the child process, but that > can be done only with subprocess.py). Is that really required? Don't we > do already the same for controlling the output of "svn" itself? Yes, sorry. I'll remove that. Dustin -- Storage Software Engineer http://www.zmanda.com
stty-term.patch
Description: Binary data
_______________________________________________ Svnmerge mailing list [email protected] http://www.orcaware.com/mailman/listinfo/svnmerge
