[Svnmerge] svnmerge.py breaks in cron

nick aschberger nick.aschberger at gmail.com
Wed Oct 24 18:48:05 PDT 2007


If it is stdout that you are examining through stty, then shouldn't the
command be:

"stty -a -F /dev/stdout"

Although, that's semantics I guess - I'd be interested to see if anyone
could get the columns field to be different between stdin and stdout on a
terminal.

:)

cheers

Nick


On 25/10/2007, Dustin J. Mitchell <dustin at zmanda.com> wrote:
>
> On 10/24/07, Giovanni Bajo <rasky at develer.com> 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
>
> _______________________________________________
> Svnmerge mailing list
> Svnmerge at orcaware.com
> http://www.orcaware.com/mailman/listinfo/svnmerge
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/svnmerge/attachments/20071025/64cd8036/attachment.html>


More information about the Svnmerge mailing list