RESOLVED FIXED 38047
svn-apply: suppress misleading "error: pathspec ..." message when adding binary file
https://bugs.webkit.org/show_bug.cgi?id=38047
Summary svn-apply: suppress misleading "error: pathspec ..." message when adding bina...
Chris Jerdonek
Reported 2010-04-23 09:26:20 PDT
See here for an example of the misleading "error: pathspec" message: https://bugs.webkit.org/show_bug.cgi?id=37044#c12 To solve this, console output should be suppressed in this method of svn-apply: sub scmKnowsOfFile($) { my ($path) = @_; if (isSVN()) { ... } elsif (isGit()) { `git ls-files --error-unmatch -- $path`; <-- Suppress console output. my $exitCode = $? >> 8; return $exitCode == 0; } }
Attachments
Proposed patch (3.30 KB, patch)
2010-05-08 08:12 PDT, Chris Jerdonek
cjerdonek: commit-queue-
Proposed patch (4.05 KB, patch)
2010-05-08 08:18 PDT, Chris Jerdonek
cjerdonek: commit-queue-
Proposed patch 3 (4.05 KB, patch)
2010-05-08 08:21 PDT, Chris Jerdonek
dbates: review+
cjerdonek: commit-queue-
Chris Jerdonek
Comment 1 2010-05-08 08:12:28 PDT
Created attachment 55475 [details] Proposed patch
Chris Jerdonek
Comment 2 2010-05-08 08:18:46 PDT
Created attachment 55476 [details] Proposed patch Corrected ChangeLog.
Chris Jerdonek
Comment 3 2010-05-08 08:21:46 PDT
Created attachment 55477 [details] Proposed patch 3 Fixed a code comment: STDOUT -> STDERR.
Daniel Bates
Comment 4 2010-05-08 18:19:06 PDT
Comment on attachment 55477 [details] Proposed patch 3 We should add a comment to reference the Perldocs about this. > +sub callSilently($@) { > + my ($func, @args) = @_; > + > + open(OLDERR, ">&STDERR"); > + close(STDERR); > + my @returnValue = &$func(@args); > + open(STDERR, ">&OLDERR"); > + close(OLDERR); # FIXME: Is this necessary? > + > + return @returnValue; > +} > + We should probably change this to use exitStatus. We can do this in another patch, but then we should add a FIXME comment. > +sub gitKnowsOfFile($) > +{ > + my $path = shift; > + > + `git ls-files --error-unmatch -- $path`; > + my $exitCode = $? >> 8; > + return $exitCode == 0; > +} r=me.
Chris Jerdonek
Comment 5 2010-05-08 19:39:14 PDT
Note You need to log in before you can comment on or make changes to this bug.