From: Eric Wong <normalperson@yhbt.net>
To: Junio C Hamano <junkio@cox.net>
Cc: Seth Falcon <sethfalcon@gmail.com>, git@vger.kernel.org
Subject: [PATCH] git-svn: avoid respewing similar error messages for missing paths
Date: Fri, 30 Mar 2007 17:54:48 -0700 [thread overview]
Message-ID: <20070331005448.GA6948@muzzle> (raw)
In-Reply-To: <m23b3qts11.fsf@ziti.fhcrc.org>
We ignore errors if the path we're tracking did not exist for
a particular revision range, but we still print out warnings
telling the user about that.
As pointed out by Seth Falcon, this amounts to a lot of warnings
that could confuse and worry users. I'm not entirely comfortable
completely silencing the warnings, but showing one warning per
path that we track should be reasonable.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
git-svn.perl | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index adc976c..d307d43 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2843,8 +2843,7 @@ package Git::SVN::Ra;
use vars qw/@ISA $config_dir $_log_window_size/;
use strict;
use warnings;
-my ($can_do_switch);
-my $RA;
+my ($can_do_switch, %ignored_err, $RA);
BEGIN {
# enforce temporary pool usage for some simple functions
@@ -3216,9 +3215,16 @@ sub skip_unknown_revs {
# 175007 - http(s):// (this repo required authorization, too...)
# More codes may be discovered later...
if ($errno == 175007 || $errno == 175002 || $errno == 160013) {
- warn "W: Ignoring error from SVN, path probably ",
- "does not exist: ($errno): ",
- $err->expanded_message,"\n";
+ my $err_key = $err->expanded_message;
+ # revision numbers change every time, filter them out
+ $err_key =~ s/\d+/\0/g;
+ $err_key = "$errno\0$err_key";
+ unless ($ignored_err{$err_key}) {
+ warn "W: Ignoring error from SVN, path probably ",
+ "does not exist: ($errno): ",
+ $err->expanded_message,"\n";
+ $ignored_err{$err_key} = 1;
+ }
return;
}
die "Error from SVN, ($errno): ", $err->expanded_message,"\n";
--
Eric Wong
next prev parent reply other threads:[~2007-03-31 0:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-26 17:02 git svn fetch spewing warnings Seth Falcon
2007-03-27 19:00 ` Eric Wong
2007-03-27 19:17 ` Seth Falcon
2007-03-31 0:54 ` Eric Wong [this message]
2007-04-02 10:30 ` [PATCH] git-svn: avoid respewing similar error messages for missing paths Seth Falcon
2007-04-02 18:46 ` Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070331005448.GA6948@muzzle \
--to=normalperson@yhbt.net \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=sethfalcon@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.