Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-03-31 04:54:48 +0400
committerJunio C Hamano <junkio@cox.net>2007-03-31 12:11:13 +0400
commita6a15a9958cbd77e7181c2110e1e2568a808a204 (patch)
tree950cdf058f3a0fa5bf197785021d6254b5def52a /git-svn.perl
parent46efd2d93ce39fd5c1a91f0a2f918f2d8bbfdf92 (diff)
git-svn: avoid respewing similar error messages for missing paths
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> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl16
1 files changed, 11 insertions, 5 deletions
diff --git a/git-svn.perl b/git-svn.perl
index e0a48c2a8b..278f45d6d0 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2840,8 +2840,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
@@ -3213,9 +3212,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";