On 10/24/2007 8:46 PM, Dustin J. Mitchell wrote: > On 10/24/07, Alan Barrett <[EMAIL PROTECTED]> wrote: >> 1. This needs to be in a try/except block, in case popen fails or stty >> exits with an error, or something. >> >> 2. It's possible for TERM to be defined even if there's no terminal >> available. I'd suggest using os.isatty(), or simply relying on >> try/except to catch any error (and not bothering with any sort of >> pre-test). >> >> 3. You should probably set LC_ALL="C". (Or is that already done at a >> higher level?) >> >> 4. Even if stty works, there's no guarantee that it the output will >> include the number of columns. I see that you are already handling >> that case. > > All fair points. Patch attached
sys.stdin.isatty() is clearer IMO. All in all, maybe only try/except is sufficient though... 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? -- Giovanni Bajo _______________________________________________ Svnmerge mailing list [email protected] http://www.orcaware.com/mailman/listinfo/svnmerge
