[p4] Why does 'p4 add' put its errors on stdout and not stderr?

Maurice Meyer maurice.meyer at openwave.com
Fri Jan 4 10:02:14 PST 2002


You may have already tried this or discounted it for other reasons but there
is the -s option:

        The -s flag causes the p4 client program to prefix each line of
        output with a tag (error, warning, info, text, exit) so as to make
        it amenable to scripting.

Perhaps the tagging gets it right even if it's not sent to STDERR.

Maurice

-----Original Message-----
From: perforce-user-admin at perforce.com
[mailto:perforce-user-admin at perforce.com]On Behalf Of Robert Cowham
Sent: Friday, January 04, 2002 1:33 AM
To: perforce-user at perforce.com
Subject: RE: [p4] Why does 'p4 add' put its errors on stdout and not
stderr?


Report it to support. Error handling in Perforce (for scripts etc) is not
easy (nor always consistent in my experience/opinion as this example shows).
You need to parse the output for all cases and work out how to deal with
them.

I hear rumours from time to time that they are looking at improving it, but
I am sure it's not a straight forward job.

Robert

> -----Original Message-----
> From: perforce-user-admin at perforce.com
> [mailto:perforce-user-admin at perforce.com]On Behalf Of Schmidgall, Jay
> Sent: Thursday, January 03, 2002 09:50
> To: perforce-user at perforce.com
> Subject: [p4] Why does 'p4 add' put its errors on stdout and not stderr?
>
>
> I just got bit by a case sensitivity issue between our Unix dev box
> and our Windows Perforce server.
>
> Although case sensitivity was the underlying cause, the error would
> have been detected had 'p4 add' issued the warning:
>
> //depot/bar.java - can't add existing file
>
> to stderrr rather than to stdout, as say 'p4 edit' does.
>
> Is there a particular reason why p4 add doesn't send its errors to
> stderr?
>
> : jay
>

_______________________________________________
perforce-user mailing list  -  perforce-user at perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user







More information about the perforce-user mailing list