* [PATCH] git-cvsimport.perl: Print "UNKNOWN LINE..." on stderr, not stdout.
@ 2008-08-05 14:54 Jim Meyering
2008-08-05 15:28 ` Jeff King
0 siblings, 1 reply; 4+ messages in thread
From: Jim Meyering @ 2008-08-05 14:54 UTC (permalink / raw)
To: git list
Signed-off-by: Jim Meyering <meyering@redhat.com>
---
I'm used to filtering git-cvsimport's noisy stderr, but this
diagnostic appears on stdout. Looks like an oversight.
Now that I'm using cvsps-2.2b1, I see tons of these.
git-cvsimport.perl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index e2664ef..e439202 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -952,7 +952,7 @@ while (<CVS>) {
} elsif (/^-+$/) { # end of unknown-line processing
$state = 1;
} elsif ($state != 11) { # ignore stuff when skipping
- print "* UNKNOWN LINE * $_\n";
+ print STDERR "* UNKNOWN LINE * $_\n";
}
}
commit() if $branch and $state != 11;
--
1.6.0.rc1.36.g5ff70
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] git-cvsimport.perl: Print "UNKNOWN LINE..." on stderr, not stdout.
2008-08-05 14:54 [PATCH] git-cvsimport.perl: Print "UNKNOWN LINE..." on stderr, not stdout Jim Meyering
@ 2008-08-05 15:28 ` Jeff King
2008-08-05 15:35 ` Jeff King
2008-08-05 15:44 ` Jim Meyering
0 siblings, 2 replies; 4+ messages in thread
From: Jeff King @ 2008-08-05 15:28 UTC (permalink / raw)
To: Jim Meyering; +Cc: git list
On Tue, Aug 05, 2008 at 04:54:42PM +0200, Jim Meyering wrote:
> I'm used to filtering git-cvsimport's noisy stderr, but this
> diagnostic appears on stdout. Looks like an oversight.
> Now that I'm using cvsps-2.2b1, I see tons of these.
There are a ton of things that go to stdout:
$ perl -ne '/print (\S+)/ && print "$1\n" git-cvsimport.perl |
grep '^#' | wc -l
18
though many are only activated via "-v". Maybe it is worth putting all
of them to stderr? I really don't see why cvsimport should ever produce
any output on stdout.
-Peff
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] git-cvsimport.perl: Print "UNKNOWN LINE..." on stderr, not stdout.
2008-08-05 15:28 ` Jeff King
@ 2008-08-05 15:35 ` Jeff King
2008-08-05 15:44 ` Jim Meyering
1 sibling, 0 replies; 4+ messages in thread
From: Jeff King @ 2008-08-05 15:35 UTC (permalink / raw)
To: Jim Meyering; +Cc: git list
On Tue, Aug 05, 2008 at 11:28:36AM -0400, Jeff King wrote:
> $ perl -ne '/print (\S+)/ && print "$1\n" git-cvsimport.perl |
> grep '^#' | wc -l
Urgh, somehow I managed to get a typo into my cut and paste. It should be
grep '^"'
(i.e., we are getting rid of "print STDERR" and "print $fh"; this is
admittedly not very robust, but I just wanted an approximation of how
many there were).
-Peff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] git-cvsimport.perl: Print "UNKNOWN LINE..." on stderr, not stdout.
2008-08-05 15:28 ` Jeff King
2008-08-05 15:35 ` Jeff King
@ 2008-08-05 15:44 ` Jim Meyering
1 sibling, 0 replies; 4+ messages in thread
From: Jim Meyering @ 2008-08-05 15:44 UTC (permalink / raw)
To: Jeff King; +Cc: git list
Jeff King <peff@peff.net> wrote:
> On Tue, Aug 05, 2008 at 04:54:42PM +0200, Jim Meyering wrote:
>
>> I'm used to filtering git-cvsimport's noisy stderr, but this
>> diagnostic appears on stdout. Looks like an oversight.
>> Now that I'm using cvsps-2.2b1, I see tons of these.
>
> There are a ton of things that go to stdout:
>
> $ perl -ne '/print (\S+)/ && print "$1\n" git-cvsimport.perl |
> grep '^#' | wc -l
> 18
>
> though many are only activated via "-v". Maybe it is worth putting all
> of them to stderr? I really don't see why cvsimport should ever produce
> any output on stdout.
A quick scan (post-patch)
$ grep 'print ' git-cvsimport.perl|grep -vE 'STDERR|opt_v'
print $f "$_=$conv_author_name{$_} <$conv_author_email{$_}>\n";
print $fh $line;
print $fh $buf;
print $cvspsfh $_;
print $fh
print "SKIPPING $fn v $rev\n";
suggests that if you don't count the "SKIPPING..." diagnostic you'd get
for each "-S REGEXP"-skipped name, the "UNKNOWN LINE" diagnostic is the
only one that goes to stdout but that is not protected by an $opt_v guard.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-08-05 15:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-05 14:54 [PATCH] git-cvsimport.perl: Print "UNKNOWN LINE..." on stderr, not stdout Jim Meyering
2008-08-05 15:28 ` Jeff King
2008-08-05 15:35 ` Jeff King
2008-08-05 15:44 ` Jim Meyering
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox