Il giorno mar, 17/07/2007 alle 10.09 +0200, Henry Nestler ha scritto:
> In vcpx/shwrap.py found this bad news (Tue Jul 10 18:13:09 CEST 2007):
> @@ -87,6 +89,8 @@ class ExternalCommand:
>           r = '$'+repr(self)
>           if self.cwd:
>               r = self.cwd + ' ' + r
> +        if self.capture_stderr:
> +            r = r + ' 2>&1'
>           return r
> 
>       def __repr__(self):
> @@ -137,6 +141,11 @@ class ExternalCommand:
> 
>           from cStringIO import StringIO
> 
> +        if kwargs.get('stderr'):
> +            self.capture_stderr = True
> +        else:
> +            self.capture_stderr = False
> +
>           if len(args) == 1 and type(args[0]) == type([]):
>               allargs = list(args[0])
>           else:
> <<< end diff <<<
> 
> I think, the 'capture_stderr' should only TRUE, if the parameter is
> 'stderr=STDOUT'? (found on vcpx/repository/cvs.py:618)
> 

I think you misunderstood the change: its *only* effect is visual for
the user, that is, when the *caller* explicitly asks for stderr, the
__str__() method of the class appends a " 2>&1" to the *visual
representation* of the command that will be printed in the log. The
"self.capture_stderr" flag is used only in the __str__() method.

I was tired of receiving incomplete CVS logs, because people kept
cut&pasting the command from the project.log file, because tailor did
not use to print the exact "shell" command there...

So to repeat: the change in question does not (or better *should* not,
glad if you can spot an error!) alter the previous behaviour in any way.

> With the changes below can't differ error and data any more - very bad. 
> Please change it back without "2>&1", if "stderr=PIPE" is given.

Please, reread the patch, it does not seem hurthing in any way...

ciao, lele.

_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor

Reply via email to